Added option ShapeFix_Solid::FixShellOrientationMode allowing to switch off analysis and fixing of orientations of shell(s) in solid.
Options FixVertexToleranceMode, FixShellOrientationMode, FixFaceOrientationMode are added to Shepe Processing resource file so that they can be manipulated.
ShapeFix_Shell.lxx
ShapeFix_Solid.cxx
ShapeFix_Solid.hxx
-ShapeFix_Solid.lxx
ShapeFix_SplitCommonVertex.cxx
ShapeFix_SplitCommonVertex.hxx
ShapeFix_SplitTool.cxx
{
myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
myFixShellMode = -1;
+ myFixShellOrientationMode = -1;
myFixShell = new ShapeFix_Shell;
myCreateOpenSolidMode = Standard_False;
}
{
myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK);
myFixShellMode = -1;
+ myFixShellOrientationMode = -1;
myFixShell = new ShapeFix_Shell;
myCreateOpenSolidMode = Standard_False;
Init(solid);
status = Standard_True;
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE1 );
}
- NbShells+= myFixShell->NbShells();
+ NbShells += myFixShell->NbShells();
}
// Halt algorithm in case of user's abort
if ( !aPSentryFixShell.More() )
return Standard_False;
- }
+ }
else
{
NbShells = aNbShells;
// Switch to the second stage
aPSentry.Next();
-
+
+ if (!NeedFix(myFixShellOrientationMode))
+ {
+ myShape = Context()->Apply(myShape);
+ return status;
+ }
+
if(NbShells ==1) {
TopoDS_Shape tmpShape = Context()->Apply(myShape);
TopExp_Explorer aExp(tmpShape,TopAbs_SHELL);
Standard_EXPORT TopoDS_Shape Solid() const;
//! Returns tool for fixing shells.
- Handle(ShapeFix_Shell) FixShellTool() const;
+ Handle(ShapeFix_Shell) FixShellTool() const
+ {
+ return myFixShell;
+ }
//! Sets message registrator
Standard_EXPORT virtual void SetMsgRegistrator (const Handle(ShapeExtend_BasicMsgRegistrator)& msgreg) Standard_OVERRIDE;
//! Returns (modifiable) the mode for applying fixes of
//! ShapeFix_Shell, by default True.
- Standard_Integer& FixShellMode();
+ Standard_Integer& FixShellMode()
+ {
+ return myFixShellMode;
+ }
+
+ //! Returns (modifiable) the mode for applying analysis and fixes of
+ //! orientation of shells in the solid; by default True.
+ Standard_Integer& FixShellOrientationMode()
+ {
+ return myFixShellOrientationMode;
+ }
//! Returns (modifiable) the mode for creation of solids.
//! If mode myCreateOpenSolidMode is equal to true
//! solids are created from open shells
//! else solids are created from closed shells only.
//! ShapeFix_Shell, by default False.
- Standard_Boolean& CreateOpenSolidMode();
+ Standard_Boolean& CreateOpenSolidMode()
+ {
+ return myCreateOpenSolidMode;
+ }
//! In case of multiconnexity returns compound of fixed solids
//! else returns one solid.
Standard_EXPORT TopoDS_Shape Shape();
-
-
-
DEFINE_STANDARD_RTTIEXT(ShapeFix_Solid,ShapeFix_Root)
protected:
-
-
TopoDS_Shape mySolid;
Handle(ShapeFix_Shell) myFixShell;
Standard_Integer myStatus;
Standard_Integer myFixShellMode;
-
-
-private:
-
-
+ Standard_Integer myFixShellOrientationMode;
Standard_Boolean myCreateOpenSolidMode;
-
-
};
-
-#include <ShapeFix_Solid.lxx>
-
-
-
-
-
#endif // _ShapeFix_Solid_HeaderFile
sfs->FixSameParameterMode() = ctx->IntegerVal ( "FixSameParameterMode", -1 );
sfs->FixSolidMode() = ctx->IntegerVal ( "FixSolidMode", -1 );
sfs->FixVertexPositionMode() = ctx->IntegerVal ( "FixVertexPositionMode", 0 );
+ sfs->FixVertexTolMode() = ctx->IntegerVal ( "FixVertexToleranceMode", -1 );
sfs->FixSolidTool()->FixShellMode() = ctx->IntegerVal ( "FixShellMode", -1 );
+ sfs->FixSolidTool()->FixShellOrientationMode() = ctx->IntegerVal ( "FixShellOrientationMode", -1 );
sfs->FixSolidTool()->CreateOpenSolidMode() = ctx->BooleanVal ( "CreateOpenSolidMode", Standard_True );
sfs->FixShellTool()->FixFaceMode() = ctx->IntegerVal ( "FixFaceMode", -1 );
+ sfs->FixShellTool()->FixOrientationMode() = ctx->IntegerVal ( "FixFaceOrientationMode", -1 );
//parameters for ShapeFix_Face
sff->FixWireMode() = ctx->IntegerVal ( "FixWireMode", -1 );
FromIGES.FixShape.FixFreeFaceMode : -1
FromIGES.FixShape.FixFreeWireMode : -1
FromIGES.FixShape.FixSameParameterMode : -1
+
FromIGES.FixShape.FixSolidMode : -1
+FromSTEP.FixShape.FixShellOrientationMode : -1
FromIGES.FixShape.CreateOpenSolidMode : 1
+
FromIGES.FixShape.FixShellMode : -1
+FromSTEP.FixShape.FixFaceOrientationMode : -1
+
FromIGES.FixShape.FixFaceMode : -1
FromIGES.FixShape.FixWireMode : -1
FromIGES.FixShape.FixOrientationMode : -1
FromIGES.FixShape.FixSelfIntersectingEdgeMode : -1
FromIGES.FixShape.FixIntersectingEdgesMode : -1
FromIGES.FixShape.FixNonAdjacentIntersectingEdgesMode : -1
+
FromIGES.FixShape.FixVertexPositionMode : 0
+FromIGES.FixShape.FixVertexToleranceMode : -1
FromSTEP.FixShape.FixFreeFaceMode : -1
FromSTEP.FixShape.FixFreeWireMode : -1
FromSTEP.FixShape.FixSameParameterMode : -1
+
FromSTEP.FixShape.FixSolidMode : -1
+FromSTEP.FixShape.FixShellOrientationMode : -1
FromSTEP.FixShape.CreateOpenSolidMode : 0
+
FromSTEP.FixShape.FixShellMode : -1
+FromSTEP.FixShape.FixFaceOrientationMode : -1
+
FromSTEP.FixShape.FixFaceMode : -1
FromSTEP.FixShape.FixWireMode : -1
FromSTEP.FixShape.FixOrientationMode : -1
FromSTEP.FixShape.FixSelfIntersectingEdgeMode : -1
FromSTEP.FixShape.FixIntersectingEdgesMode : -1
FromSTEP.FixShape.FixNonAdjacentIntersectingEdgesMode : -1
+
FromSTEP.FixShape.FixVertexPositionMode : 0
+FromSTEP.FixShape.FixVertexToleranceMode : -1