From a9ad14cc88c280360bc7f69db3cc3f602e5b51ce Mon Sep 17 00:00:00 2001 From: ichesnok Date: Fri, 16 Aug 2024 10:45:07 +0100 Subject: [PATCH] 0033799: Data Exchange - Shape Healing interface update ProcessShape() function contents were moved to XSAlgo_AlgoProcessShape class. --- src/DE/DE_ShapeFixParameters.hxx | 6 +- src/TKXSBase/EXTERNLIB | 1 + src/XSAlgo/FILES | 2 + src/XSAlgo/XSAlgo_AlgoContainer.cxx | 97 ++---------- src/XSAlgo/XSAlgo_AlgoContainer.hxx | 33 +++- src/XSAlgo/XSAlgo_AlgoProcessShape.cxx | 208 +++++++++++++++++++++++++ src/XSAlgo/XSAlgo_AlgoProcessShape.hxx | 145 +++++++++++++++++ 7 files changed, 405 insertions(+), 87 deletions(-) create mode 100644 src/XSAlgo/XSAlgo_AlgoProcessShape.cxx create mode 100644 src/XSAlgo/XSAlgo_AlgoProcessShape.hxx diff --git a/src/DE/DE_ShapeFixParameters.hxx b/src/DE/DE_ShapeFixParameters.hxx index 98c0dfd52c..5d61a8a867 100644 --- a/src/DE/DE_ShapeFixParameters.hxx +++ b/src/DE/DE_ShapeFixParameters.hxx @@ -21,11 +21,11 @@ struct DE_ShapeFixParameters 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 + NotFix = 0, //!< Procedure will be executed + Fix = 1 //!< Procedure will be executed anyway }; - double Tolerance3d = 1.e-6; + double Tolerance3d = 1.e-3; double MaxTolerance3d = 1.0; double MinTolerance3d = 1.e-7; FixMode FixFreeShellMode = FixMode::FixOrNot; diff --git a/src/TKXSBase/EXTERNLIB b/src/TKXSBase/EXTERNLIB index 69976d2ca0..cbf5e51883 100755 --- a/src/TKXSBase/EXTERNLIB +++ b/src/TKXSBase/EXTERNLIB @@ -1,3 +1,4 @@ +TKDE TKBRep TKernel TKMath diff --git a/src/XSAlgo/FILES b/src/XSAlgo/FILES index 9e535d2da9..8b63dda4ee 100644 --- a/src/XSAlgo/FILES +++ b/src/XSAlgo/FILES @@ -3,6 +3,8 @@ XSAlgo.hxx XSAlgo_AlgoContainer.cxx XSAlgo_AlgoContainer.hxx XSAlgo_AlgoContainer.lxx +XSAlgo_AlgoProcessShape.cxx +XSAlgo_AlgoProcessShape.hxx XSAlgo_Caller.hxx XSAlgo_ToolContainer.cxx XSAlgo_ToolContainer.hxx diff --git a/src/XSAlgo/XSAlgo_AlgoContainer.cxx b/src/XSAlgo/XSAlgo_AlgoContainer.cxx index d329d85a01..dfc20b26cb 100644 --- a/src/XSAlgo/XSAlgo_AlgoContainer.cxx +++ b/src/XSAlgo/XSAlgo_AlgoContainer.cxx @@ -56,6 +56,7 @@ #include #include #include +#include #include #include @@ -66,6 +67,7 @@ IMPLEMENT_STANDARD_RTTIEXT(XSAlgo_AlgoContainer,Standard_Transient) //purpose : //======================================================================= XSAlgo_AlgoContainer::XSAlgo_AlgoContainer() + : myDEHealingParamsUsage(false) { myTC = new XSAlgo_ToolContainer; } @@ -100,88 +102,21 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape(const TopoDS_Shape& theShape, return theShape; } - Handle(ShapeProcess_ShapeContext) aContext = Handle(ShapeProcess_ShapeContext)::DownCast(theInfo); - if (aContext.IsNull()) - { - Standard_CString aRscfile = Interface_Static::CVal(thePrscfile); - aContext = new ShapeProcess_ShapeContext(theShape, aRscfile); - if (!aContext->ResourceManager()->IsInitialized()) - { - // If resource file wasn't found, use static values instead - Interface_Static::FillMap(aContext->ResourceManager()->GetMap()); - } - aContext->SetDetalisation(theDetalisationLevel); - } - aContext->SetNonManifold(theNonManifold); - theInfo = aContext; + XSAlgo_AlgoProcessShape aProcessShape; + aProcessShape.SetShape(theShape); + aProcessShape.SetPrscfile(thePrscfile); + aProcessShape.SetPseq(thePseq); + aProcessShape.SetInfo(theInfo); + aProcessShape.SetHealingParamsFlag(myDEHealingParamsUsage); + aProcessShape.SetHealingParameters(myHealingParameters); + aProcessShape.SetDetalisationLevel(theDetalisationLevel); + aProcessShape.SetNonManifold(theNonManifold); + aProcessShape.SetProgressRange(theProgress); + aProcessShape.SetPrecision(thePrec); + aProcessShape.SetMaxTol(theMaxTol); + aProcessShape.SetReShape(theReShape); - 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) aRsc = aContext->ResourceManager(); - TCollection_AsciiString aStr(aSeq); - aStr += ".exec.op"; - if (!aRsc->Find(aStr.ToCString())) - { -#ifdef OCCT_DEBUG - { - 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(thePseq, "read.", 5)) - { - try { - OCC_CATCH_SIGNALS - 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) - { -#ifdef OCCT_DEBUG - std::cout << "Error: XSAlgo_AlgoContainer::ProcessShape(): Exception in ShapeFix::Shape" << std::endl; - anException.Print(std::cout); std::cout << std::endl; -#endif - (void)anException; - } - return aContext->Result(); - } - // for writing, define default sequence of DirectFaces - else if (!strncmp(thePseq, "write.", 6)) - { - aRsc->SetResource(aStr.ToCString(), "DirectFaces"); - } - } - - // Define runtime tolerances and do Shape Processing - aRsc->SetResource("Runtime.Tolerance", thePrec); - aRsc->SetResource("Runtime.MaxTolerance", theMaxTol); - - if (!ShapeProcess::Perform(aContext, aSeq, theProgress)) - return theShape; // return original shape - - return aContext->Result(); + return aProcessShape.ProcessShape(); } //======================================================================= diff --git a/src/XSAlgo/XSAlgo_AlgoContainer.hxx b/src/XSAlgo/XSAlgo_AlgoContainer.hxx index c4f33071c0..0716afaaf6 100644 --- a/src/XSAlgo/XSAlgo_AlgoContainer.hxx +++ b/src/XSAlgo/XSAlgo_AlgoContainer.hxx @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -46,10 +47,35 @@ public: Standard_EXPORT XSAlgo_AlgoContainer(); //! Sets ToolContainer - void SetToolContainer (const Handle(XSAlgo_ToolContainer)& TC); + void SetToolContainer (const Handle(XSAlgo_ToolContainer)& TC); + + //! Gets healing parameters flag + const bool GetHealingParameteresFlag() + { + return myDEHealingParamsUsage; + } + + //! Sets healing parameters flag + //! Uses defined DE healing parameters (if true) or parameters from resource file/Static_Interface + void SetHealingParametersFlag(const bool theHealingParamsFlag) + { + myDEHealingParamsUsage = theHealingParamsFlag; + } + + //! Gets healing parameters + const DE_ShapeFixParameters& GetHealingParameteres() + { + return myHealingParameters; + } + + //! Sets healing parameters + void SetHealingParameters(const DE_ShapeFixParameters& theHealingParams) + { + myHealingParameters = theHealingParams; + } //! Returns ToolContainer - Handle(XSAlgo_ToolContainer) ToolContainer() const; + Handle(XSAlgo_ToolContainer) ToolContainer() const; //! Performs actions necessary for preparing environment //! for transfer. Empty in Open version. @@ -122,8 +148,9 @@ protected: private: - + bool myDEHealingParamsUsage; Handle(XSAlgo_ToolContainer) myTC; + DE_ShapeFixParameters myHealingParameters; }; diff --git a/src/XSAlgo/XSAlgo_AlgoProcessShape.cxx b/src/XSAlgo/XSAlgo_AlgoProcessShape.cxx new file mode 100644 index 0000000000..2f895a35bd --- /dev/null +++ b/src/XSAlgo/XSAlgo_AlgoProcessShape.cxx @@ -0,0 +1,208 @@ +// Created on: 2000-01-19 +// 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 + +IMPLEMENT_STANDARD_RTTIEXT(XSAlgo_AlgoProcessShape, Standard_Transient) + +//======================================================================= +//function : XSAlgo_AlgoProcessShape +//purpose : +//======================================================================= +XSAlgo_AlgoProcessShape::XSAlgo_AlgoProcessShape() + : myPrscfile(""), + myPseq(""), + myPrecision(0.001), + myMaxTol(1.), + myNonManifold(false), + myDetalisationLevel(TopAbs_VERTEX), + myDEHealingParamsUsage(false), + myProgressRange(Message_ProgressRange()) +{ +} + +//======================================================================= +//function : ProcessShape +//purpose : +//======================================================================= +TopoDS_Shape XSAlgo_AlgoProcessShape::ProcessShape() +{ + if (myShape.IsNull()) + { + return myShape; + } + + Standard_CString aRscfile = ""; + Handle(ShapeProcess_ShapeContext) aContext = Handle(ShapeProcess_ShapeContext)::DownCast(myInfo); + if (aContext.IsNull()) + { + aRscfile = Interface_Static::CVal(myPrscfile); + aContext = new ShapeProcess_ShapeContext(myShape, aRscfile); + if (myDEHealingParamsUsage) + { + // Use defined shape healing parameters + FillMap(aContext->ResourceManager()->GetMap()); + } + else if (!aContext->ResourceManager()->IsInitialized()) + { + // If resource file wasn't found, use static values instead + Interface_Static::FillMap(aContext->ResourceManager()->GetMap()); + } + } + aContext->SetDetalisation(myDetalisationLevel); + aContext->SetNonManifold(myNonManifold); + myInfo = aContext; + + Standard_CString aSeq = Interface_Static::CVal(myPseq); + if (!aSeq) aSeq = myPseq; + + // if resource file is not loaded or does not define .exec.op, + // do default fixes + Handle(Resource_Manager) aRsc = aContext->ResourceManager(); + TCollection_AsciiString aStr(aSeq); + aStr += ".exec.op"; + if (strncmp(myPseq, "read.", 5) == 0) + { + aRsc->SetResource(aStr.ToCString(), "FixShape"); + try { + OCC_CATCH_SIGNALS + Handle(ShapeExtend_MsgRegistrator) aMsg = new ShapeExtend_MsgRegistrator; + Handle(ShapeFix_Shape) aSfs = ShapeAlgo::AlgoContainer()->ToolContainer()->FixShape(); + aSfs->Init(myShape); + aSfs->SetMsgRegistrator(aMsg); + aSfs->SetPrecision(myPrecision); + aSfs->SetMaxTolerance(myMaxTol); + aSfs->FixFaceTool()->FixWireTool()->FixSameParameterMode() = Standard_False; + if (strcmp(aRscfile, "IGES") == 0 || strcmp(aRscfile, "XT") == 0) + { + aSfs->FixSolidTool()->CreateOpenSolidMode() = Standard_True; + } + else + { + aSfs->FixSolidTool()->CreateOpenSolidMode() = Standard_False; + } + aSfs->SetContext(myReShape); + aSfs->Perform(myProgressRange); + + TopoDS_Shape aShape = aSfs->Shape(); + if (!aShape.IsNull() && aShape != myShape) + { + aContext->RecordModification(aSfs->Context(), aMsg); + aContext->SetResult(aShape); + } + } + catch (Standard_Failure const& anException) + { +#ifdef OCCT_DEBUG + std::cout << "Error: XSAlgo_AlgoContainer::ProcessShape(): Exception in ShapeFix::Shape" << std::endl; + anException.Print(std::cout); std::cout << std::endl; +#endif + (void)anException; + } + return aContext->Result(); + } + else if (strncmp(myPseq, "write.", 6) == 0) + { + if (strcmp(aRscfile, "STEP") == 0) + { + aRsc->SetResource(aStr.ToCString(), "SplitCommonVertex,DirectFaces"); + } + else + { + aRsc->SetResource(aStr.ToCString(), "DirectFaces"); + } + } + + // Define runtime tolerances and do Shape Processing + aRsc->SetResource("Runtime.Tolerance", myPrecision); + aRsc->SetResource("Runtime.MaxTolerance", myMaxTol); + + if (!ShapeProcess::Perform(aContext, aSeq, myProgressRange)) + return myShape; // return original shape + + return aContext->Result(); +} + +//======================================================================= +//function : FillMap +//purpose : +//======================================================================= +void XSAlgo_AlgoProcessShape::FillMap(NCollection_DataMap& theMap) const +{ + theMap.Clear(); + theMap.Bind("Tolerance3d", TCollection_AsciiString(myHealingParameters.Tolerance3d)); + theMap.Bind("MinTolerance3d", TCollection_AsciiString(myHealingParameters.MinTolerance3d)); + theMap.Bind("MaxTolerance3d", TCollection_AsciiString(myHealingParameters.MaxTolerance3d)); + theMap.Bind("FixFreeShellMode", TCollection_AsciiString(static_cast(myHealingParameters.FixFreeShellMode))); + theMap.Bind("FixFreeFaceMode", TCollection_AsciiString(static_cast(myHealingParameters.FixFreeFaceMode))); + theMap.Bind("FixFreeFaceMode", TCollection_AsciiString(static_cast(myHealingParameters.FixFreeFaceMode))); + theMap.Bind("FixFreeWireMode", TCollection_AsciiString(static_cast(myHealingParameters.FixFreeWireMode))); + theMap.Bind("FixSameParameterMode", TCollection_AsciiString(static_cast(myHealingParameters.FixSameParameterMode))); + theMap.Bind("FixSolidMode", TCollection_AsciiString(static_cast(myHealingParameters.FixSolidMode))); + theMap.Bind("FixShellOrientationMode", TCollection_AsciiString(static_cast(myHealingParameters.FixShellOrientationMode))); + theMap.Bind("CreateOpenSolidMode", TCollection_AsciiString(static_cast(myHealingParameters.CreateOpenSolidMode))); + theMap.Bind("FixShellMode", TCollection_AsciiString(static_cast(myHealingParameters.FixShellMode))); + theMap.Bind("FixFaceOrientationMode", TCollection_AsciiString(static_cast(myHealingParameters.FixFaceOrientationMode))); + theMap.Bind("FixFaceMode", TCollection_AsciiString(static_cast(myHealingParameters.FixFaceMode))); + theMap.Bind("FixWireMode", TCollection_AsciiString(static_cast(myHealingParameters.FixWireMode))); + theMap.Bind("FixOrientationMode", TCollection_AsciiString(static_cast(myHealingParameters.FixOrientationMode))); + theMap.Bind("FixAddNaturalBoundMode", TCollection_AsciiString(static_cast(myHealingParameters.FixAddNaturalBoundMode))); + theMap.Bind("FixMissingSeamMode", TCollection_AsciiString(static_cast(myHealingParameters.FixMissingSeamMode))); + theMap.Bind("FixSmallAreaWireMode", TCollection_AsciiString(static_cast(myHealingParameters.FixSmallAreaWireMode))); + theMap.Bind("RemoveSmallAreaFaceMode", TCollection_AsciiString(static_cast(myHealingParameters.RemoveSmallAreaFaceMode))); + theMap.Bind("FixIntersectingWiresMode", TCollection_AsciiString(static_cast(myHealingParameters.FixIntersectingWiresMode))); + theMap.Bind("FixLoopWiresMode", TCollection_AsciiString(static_cast(myHealingParameters.FixLoopWiresMode))); + theMap.Bind("FixSplitFaceMode", TCollection_AsciiString(static_cast(myHealingParameters.FixSplitFaceMode))); + theMap.Bind("AutoCorrectPrecisionMode", TCollection_AsciiString(static_cast(myHealingParameters.AutoCorrectPrecisionMode))); + theMap.Bind("ModifyTopologyMode", TCollection_AsciiString(static_cast(myHealingParameters.ModifyTopologyMode))); + theMap.Bind("ClosedWireMode", TCollection_AsciiString(static_cast(myHealingParameters.ClosedWireMode))); + theMap.Bind("PreferencePCurveMode", TCollection_AsciiString(static_cast(myHealingParameters.PreferencePCurveMode))); + theMap.Bind("FixReorderMode", TCollection_AsciiString(static_cast(myHealingParameters.FixReorderMode))); + theMap.Bind("FixSmallMode", TCollection_AsciiString(static_cast(myHealingParameters.FixSmallMode))); + theMap.Bind("FixConnectedMode", TCollection_AsciiString(static_cast(myHealingParameters.FixConnectedMode))); + theMap.Bind("FixEdgeCurvesMode", TCollection_AsciiString(static_cast(myHealingParameters.FixEdgeCurvesMode))); + theMap.Bind("FixDegeneratedMode", TCollection_AsciiString(static_cast(myHealingParameters.FixDegeneratedMode))); + theMap.Bind("FixLackingMode", TCollection_AsciiString(static_cast(myHealingParameters.FixLackingMode))); + theMap.Bind("FixSelfIntersectionMode", TCollection_AsciiString(static_cast(myHealingParameters.FixSelfIntersectionMode))); + theMap.Bind("RemoveLoopMode", TCollection_AsciiString(static_cast(myHealingParameters.RemoveLoopMode))); + theMap.Bind("FixReversed2dMode", TCollection_AsciiString(static_cast(myHealingParameters.FixReversed2dMode))); + theMap.Bind("FixRemovePCurveMode", TCollection_AsciiString(static_cast(myHealingParameters.FixRemovePCurveMode))); + theMap.Bind("FixRemoveCurve3dMode", TCollection_AsciiString(static_cast(myHealingParameters.FixRemoveCurve3dMode))); + theMap.Bind("FixAddPCurveMode", TCollection_AsciiString(static_cast(myHealingParameters.FixAddPCurveMode))); + theMap.Bind("FixAddCurve3dMode", TCollection_AsciiString(static_cast(myHealingParameters.FixAddCurve3dMode))); + theMap.Bind("FixSeamMode", TCollection_AsciiString(static_cast(myHealingParameters.FixSeamMode))); + theMap.Bind("FixShiftedMode", TCollection_AsciiString(static_cast(myHealingParameters.FixShiftedMode))); + theMap.Bind("FixEdgeSameParameterMode", TCollection_AsciiString(static_cast(myHealingParameters.FixEdgeSameParameterMode))); + theMap.Bind("FixNotchedEdgesMode", TCollection_AsciiString(static_cast(myHealingParameters.FixNotchedEdgesMode))); + theMap.Bind("FixTailMode", TCollection_AsciiString(static_cast(myHealingParameters.FixTailMode))); + theMap.Bind("MaxTailAngle", TCollection_AsciiString(static_cast(myHealingParameters.MaxTailAngle))); + theMap.Bind("MaxTailWidth", TCollection_AsciiString(static_cast(myHealingParameters.MaxTailWidth))); + theMap.Bind("FixSelfIntersectingEdgeMode", TCollection_AsciiString(static_cast(myHealingParameters.FixSelfIntersectingEdgeMode))); + theMap.Bind("FixIntersectingEdgesMode", TCollection_AsciiString(static_cast(myHealingParameters.FixIntersectingEdgesMode))); + theMap.Bind("FixNonAdjacentIntersectingEdgesMode", TCollection_AsciiString(static_cast(myHealingParameters.FixNonAdjacentIntersectingEdgesMode))); + theMap.Bind("FixVertexPositionMode", TCollection_AsciiString(static_cast(myHealingParameters.FixVertexPositionMode))); + theMap.Bind("FixVertexToleranceMode", TCollection_AsciiString(static_cast(myHealingParameters.FixVertexToleranceMode))); +} diff --git a/src/XSAlgo/XSAlgo_AlgoProcessShape.hxx b/src/XSAlgo/XSAlgo_AlgoProcessShape.hxx new file mode 100644 index 0000000000..dc1266616d --- /dev/null +++ b/src/XSAlgo/XSAlgo_AlgoProcessShape.hxx @@ -0,0 +1,145 @@ +// 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 _XSAlgo_AlgoProcessShape_HeaderFile +#define _XSAlgo_AlgoProcessShape_HeaderFile + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +class ShapeBuild_ReShape; +class XSAlgo_ToolContainer; +class TopoDS_Edge; +class TopoDS_Face; +class Transfer_TransientProcess; +class Transfer_FinderProcess; + +class XSAlgo_AlgoProcessShape; +DEFINE_STANDARD_HANDLE(XSAlgo_AlgoProcessShape, Standard_Transient) + +//! Class for shape processing +class XSAlgo_AlgoProcessShape : public Standard_Transient +{ + +public: + + //! Empty constructor + Standard_EXPORT XSAlgo_AlgoProcessShape(); + + //! Shape processing with specified tolerances + Standard_EXPORT TopoDS_Shape ProcessShape(); + + //! Fill map from DE shape healing parameters + void FillMap(NCollection_DataMap& theMap) const; + + //! Get shape for processing + const TopoDS_Shape& GetShape() { return myShape; } + + //! Set shape for processing + void SetShape(const TopoDS_Shape& theShape) { myShape = theShape; } + + //! Get name of the resource file + const Standard_CString& GetPrscfile() { return myPrscfile; } + + //! Set name of the resource file + void SetPrscfile(const Standard_CString& thePrscfile) { myPrscfile = thePrscfile; } + + //! Get name of the sequence of operators defined in the resource file for Shape Processing + const Standard_CString& GetPseq() { return myPseq; } + + //! Set name of the sequence of operators defined in the resource file for Shape Processing + void SetPseq(const Standard_CString& thePseq) { myPseq = thePseq; } + + //! Get information to be recorded in the translation map + const Handle(Standard_Transient)& GetInfo() { return myInfo; } + + //! Set information to be recorded in the translation map + void SetInfo(const Handle(Standard_Transient)& theInfo) { myInfo = theInfo; } + + //! Get flag of healing parameters + const bool GetHealingParamsFlag() { return myDEHealingParamsUsage; } + + //! Set flag of healing parameters + //! Uses defined DE healing parameters (if true) or parameters from resource file/Static_Interface + void SetHealingParamsFlag(const bool theHealingParamsFlag) { myDEHealingParamsUsage = theHealingParamsFlag; } + + //! Get healing parameters + const DE_ShapeFixParameters& GetHealingParameters() { return myHealingParameters; } + + //! Set healing parameters + void SetHealingParameters(const DE_ShapeFixParameters& theHealingParams) { myHealingParameters = theHealingParams; } + + //! Get flag to proceed with non-manifold topology + const bool GetNonManifold() { return myNonManifold; } + + //! Set flag to proceed with non-manifold topology + void SetNonManifold(const bool theNonManifold) { myNonManifold = theNonManifold; } + + //! Get detalisation level + const TopAbs_ShapeEnum GetDetalisationLevel() { return myDetalisationLevel; } + + //! Set detalisation level + void SetDetalisationLevel(const TopAbs_ShapeEnum theDetalisationLevel) { myDetalisationLevel = theDetalisationLevel; } + + //! Get progress indicator + const Message_ProgressRange& GetProgressRange() { return myProgressRange; } + + //! Set progress indicator + void SetProgressRange(const Message_ProgressRange& theProgressRange) { myProgressRange = theProgressRange; } + + //! Get maximum allowed tolerance + const double GetMaxTol() { return myMaxTol; } + + //! Set maximum allowed tolerance + void SetMaxTol(const double theMaxTol) { myMaxTol = theMaxTol; } + + //! Get basic precision + const double GetPrecision() { return myPrecision; } + + //! Set basic precision + void SetPrecision(const double thePrecision) { myPrecision = thePrecision; } + + //! Get tool to record the modifications of input shape + const Handle(ShapeBuild_ReShape)& GetReShape() { return myReShape; } + + //! Set tool to record the modifications of input shape + void SetReShape(const Handle(ShapeBuild_ReShape)& theReShape) { myReShape = theReShape; } + + DEFINE_STANDARD_RTTIEXT(XSAlgo_AlgoProcessShape, Standard_Transient) + +private: + + TopoDS_Shape myShape; + Standard_CString myPrscfile; + Standard_CString myPseq; + double myPrecision; + double myMaxTol; + bool myNonManifold; + TopAbs_ShapeEnum myDetalisationLevel; + bool myDEHealingParamsUsage; + DE_ShapeFixParameters myHealingParameters; + Message_ProgressRange myProgressRange; + Handle(Standard_Transient) myInfo; + Handle(ShapeBuild_ReShape) myReShape; + +}; + +#endif // _XSAlgo_AlgoProcessShape_HeaderFile