return aResult;
}
+
+//=======================================================================
+// function : ChangeHealingParams
+// purpose :
+//=======================================================================
+void DE_ShapeFixConfigurationNode::ChangeHealingParams()
+{
+}
//! @return result resource string
Standard_EXPORT virtual TCollection_AsciiString Save() const Standard_OVERRIDE;
+ //! Redefined some healing parameters, depending on format
+ Standard_EXPORT virtual void ChangeHealingParams();
+
public:
DE_ShapeFixParameters HealingParameters; //!< Shape healing parameters
--- /dev/null
+// 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 <DE_ShapeFixParameters.hxx>
+#include <NCollection_DataMap.hxx>
+#include <NCollection_Shared.hxx>
+#include <TCollection_AsciiString.hxx>
+
+//! Fill healing parameters map
+void DE_ShapeFixParameters::FillParamsMap(DE_ShapeFixParameters::HealingParamMap& theMap)
+{
+ theMap.Bind("Tolerance3d", TCollection_AsciiString(Tolerance3d));
+ theMap.Bind("MinTolerance3d", TCollection_AsciiString(MinTolerance3d));
+ theMap.Bind("MaxTolerance3d", TCollection_AsciiString(MaxTolerance3d));
+ theMap.Bind("FixFreeShellMode", TCollection_AsciiString(static_cast<int>(FixFreeShellMode)));
+ theMap.Bind("FixFreeFaceMode", TCollection_AsciiString(static_cast<int>(FixFreeFaceMode)));
+ theMap.Bind("FixFreeFaceMode", TCollection_AsciiString(static_cast<int>(FixFreeFaceMode)));
+ theMap.Bind("FixFreeWireMode", TCollection_AsciiString(static_cast<int>(FixFreeWireMode)));
+ theMap.Bind("FixSameParameterMode", TCollection_AsciiString(static_cast<int>(FixSameParameterMode)));
+ theMap.Bind("FixSolidMode", TCollection_AsciiString(static_cast<int>(FixSolidMode)));
+ theMap.Bind("FixShellOrientationMode", TCollection_AsciiString(static_cast<int>(FixShellOrientationMode)));
+ theMap.Bind("CreateOpenSolidMode", TCollection_AsciiString(static_cast<int>(CreateOpenSolidMode)));
+ theMap.Bind("FixShellMode", TCollection_AsciiString(static_cast<int>(FixShellMode)));
+ theMap.Bind("FixFaceOrientationMode", TCollection_AsciiString(static_cast<int>(FixFaceOrientationMode)));
+ theMap.Bind("FixFaceMode", TCollection_AsciiString(static_cast<int>(FixFaceMode)));
+ theMap.Bind("FixWireMode", TCollection_AsciiString(static_cast<int>(FixWireMode)));
+ theMap.Bind("FixOrientationMode", TCollection_AsciiString(static_cast<int>(FixOrientationMode)));
+ theMap.Bind("FixAddNaturalBoundMode", TCollection_AsciiString(static_cast<int>(FixAddNaturalBoundMode)));
+ theMap.Bind("FixMissingSeamMode", TCollection_AsciiString(static_cast<int>(FixMissingSeamMode)));
+ theMap.Bind("FixSmallAreaWireMode", TCollection_AsciiString(static_cast<int>(FixSmallAreaWireMode)));
+ theMap.Bind("RemoveSmallAreaFaceMode", TCollection_AsciiString(static_cast<int>(RemoveSmallAreaFaceMode)));
+ theMap.Bind("FixIntersectingWiresMode", TCollection_AsciiString(static_cast<int>(FixIntersectingWiresMode)));
+ theMap.Bind("FixLoopWiresMode", TCollection_AsciiString(static_cast<int>(FixLoopWiresMode)));
+ theMap.Bind("FixSplitFaceMode", TCollection_AsciiString(static_cast<int>(FixSplitFaceMode)));
+ theMap.Bind("AutoCorrectPrecisionMode", TCollection_AsciiString(static_cast<int>(AutoCorrectPrecisionMode)));
+ theMap.Bind("ModifyTopologyMode", TCollection_AsciiString(static_cast<int>(ModifyTopologyMode)));
+ theMap.Bind("ClosedWireMode", TCollection_AsciiString(static_cast<int>(ClosedWireMode)));
+ theMap.Bind("PreferencePCurveMode", TCollection_AsciiString(static_cast<int>(PreferencePCurveMode)));
+ theMap.Bind("FixReorderMode", TCollection_AsciiString(static_cast<int>(FixReorderMode)));
+ theMap.Bind("FixSmallMode", TCollection_AsciiString(static_cast<int>(FixSmallMode)));
+ theMap.Bind("FixConnectedMode", TCollection_AsciiString(static_cast<int>(FixConnectedMode)));
+ theMap.Bind("FixEdgeCurvesMode", TCollection_AsciiString(static_cast<int>(FixEdgeCurvesMode)));
+ theMap.Bind("FixDegeneratedMode", TCollection_AsciiString(static_cast<int>(FixDegeneratedMode)));
+ theMap.Bind("FixLackingMode", TCollection_AsciiString(static_cast<int>(FixLackingMode)));
+ theMap.Bind("FixSelfIntersectionMode", TCollection_AsciiString(static_cast<int>(FixSelfIntersectionMode)));
+ theMap.Bind("RemoveLoopMode", TCollection_AsciiString(static_cast<int>(RemoveLoopMode)));
+ theMap.Bind("FixReversed2dMode", TCollection_AsciiString(static_cast<int>(FixReversed2dMode)));
+ theMap.Bind("FixRemovePCurveMode", TCollection_AsciiString(static_cast<int>(FixRemovePCurveMode)));
+ theMap.Bind("FixRemoveCurve3dMode", TCollection_AsciiString(static_cast<int>(FixRemoveCurve3dMode)));
+ theMap.Bind("FixAddPCurveMode", TCollection_AsciiString(static_cast<int>(FixAddPCurveMode)));
+ theMap.Bind("FixAddCurve3dMode", TCollection_AsciiString(static_cast<int>(FixAddCurve3dMode)));
+ theMap.Bind("FixSeamMode", TCollection_AsciiString(static_cast<int>(FixSeamMode)));
+ theMap.Bind("FixShiftedMode", TCollection_AsciiString(static_cast<int>(FixShiftedMode)));
+ theMap.Bind("FixEdgeSameParameterMode", TCollection_AsciiString(static_cast<int>(FixEdgeSameParameterMode)));
+ theMap.Bind("FixNotchedEdgesMode", TCollection_AsciiString(static_cast<int>(FixNotchedEdgesMode)));
+ theMap.Bind("FixTailMode", TCollection_AsciiString(static_cast<int>(FixTailMode)));
+ theMap.Bind("MaxTailAngle", TCollection_AsciiString(static_cast<int>(MaxTailAngle)));
+ theMap.Bind("MaxTailWidth", TCollection_AsciiString(static_cast<int>(MaxTailWidth)));
+ theMap.Bind("FixSelfIntersectingEdgeMode", TCollection_AsciiString(static_cast<int>(FixSelfIntersectingEdgeMode)));
+ theMap.Bind("FixIntersectingEdgesMode", TCollection_AsciiString(static_cast<int>(FixIntersectingEdgesMode)));
+ theMap.Bind("FixNonAdjacentIntersectingEdgesMode", TCollection_AsciiString(static_cast<int>(FixNonAdjacentIntersectingEdgesMode)));
+ theMap.Bind("FixVertexPositionMode", TCollection_AsciiString(static_cast<int>(FixVertexPositionMode)));
+ theMap.Bind("FixVertexToleranceMode", TCollection_AsciiString(static_cast<int>(FixVertexToleranceMode)));
+}
#ifndef _DE_ShapeFixParameters_HeaderFile
#define _DE_ShapeFixParameters_HeaderFile
+#include <NCollection_DataMap.hxx>
+#include <NCollection_Shared.hxx>
+#include <TCollection_AsciiString.hxx>
+
//! Struct for shape healing parameters storage
struct DE_ShapeFixParameters
{
+ typedef NCollection_Shared<NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString>> HealingParamMap;
+
//! Enum, classifying a type of value for parameters
enum class FixMode : char
{
FixMode FixIntersectingWiresMode = FixMode::FixOrNot;
FixMode FixLoopWiresMode = FixMode::FixOrNot;
FixMode FixSplitFaceMode = FixMode::FixOrNot;
- FixMode AutoCorrectPrecisionMode = FixMode::FixOrNot;
+ FixMode AutoCorrectPrecisionMode = FixMode::Fix;
FixMode ModifyTopologyMode = FixMode::NotFix;
FixMode ModifyGeometryMode = FixMode::Fix;
FixMode ClosedWireMode = FixMode::Fix;
FixMode FixNonAdjacentIntersectingEdgesMode = FixMode::FixOrNot;
FixMode FixVertexPositionMode = FixMode::NotFix;
FixMode FixVertexToleranceMode = FixMode::FixOrNot;
+
+ //! Fill healing parameters map
+ Standard_EXPORT void DE_ShapeFixParameters::FillParamsMap(DE_ShapeFixParameters::HealingParamMap& theMap);
+
};
#endif // _DE_ShapeFixParameters_HeaderFile
DE_Provider.hxx
DE_ShapeFixConfigurationNode.cxx
DE_ShapeFixConfigurationNode.hxx
+DE_ShapeFixParameters.cxx
DE_ShapeFixParameters.hxx
DE_Wrapper.cxx
DE_Wrapper.hxx
#include <IGESCAFControl_Provider.hxx>
#include <NCollection_Buffer.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(IGESCAFControl_ConfigurationNode, DE_ConfigurationNode)
+IMPLEMENT_STANDARD_RTTIEXT(IGESCAFControl_ConfigurationNode, DE_ShapeFixConfigurationNode)
namespace
{
// purpose :
//=======================================================================
IGESCAFControl_ConfigurationNode::IGESCAFControl_ConfigurationNode() :
- DE_ConfigurationNode()
-{}
+ DE_ShapeFixConfigurationNode()
+{
+ ChangeHealingParams();
+}
//=======================================================================
// function : IGESCAFControl_ConfigurationNode
// purpose :
//=======================================================================
IGESCAFControl_ConfigurationNode::IGESCAFControl_ConfigurationNode(const Handle(IGESCAFControl_ConfigurationNode)& theNode)
- :DE_ConfigurationNode(theNode)
+ :DE_ShapeFixConfigurationNode(theNode)
{
InternalParameters = theNode->InternalParameters;
+ ChangeHealingParams();
}
//=======================================================================
}
return false;
}
+
+//=======================================================================
+// function : ChangeHealingParams
+// purpose :
+//=======================================================================
+void IGESCAFControl_ConfigurationNode::ChangeHealingParams()
+{
+ HealingParameters.CreateOpenSolidMode = DE_ShapeFixParameters::FixMode::Fix;
+}
#ifndef _IGESCAFControl_ConfigurationNode_HeaderFile
#define _IGESCAFControl_ConfigurationNode_HeaderFile
-#include <DE_ConfigurationNode.hxx>
+#include <DE_ShapeFixConfigurationNode.hxx>
#include <UnitsMethods_LengthUnit.hxx>
//! The purpose of this class is to configure the transfer process for IGES format
//! The supported CAD extensions are ".igs", ".iges"
//! The import process is supported.
//! The export process is supported.
-class IGESCAFControl_ConfigurationNode : public DE_ConfigurationNode
+class IGESCAFControl_ConfigurationNode : public DE_ShapeFixConfigurationNode
{
- DEFINE_STANDARD_RTTIEXT(IGESCAFControl_ConfigurationNode, DE_ConfigurationNode)
+ DEFINE_STANDARD_RTTIEXT(IGESCAFControl_ConfigurationNode, DE_ShapeFixConfigurationNode)
public:
//! Initializes all fields by default
//! @return Standard_True if file is supported by a current provider
Standard_EXPORT virtual bool CheckContent(const Handle(NCollection_Buffer)& theBuffer) const Standard_OVERRIDE;
+ //! Redefined some healing parameters, depending on format
+ Standard_EXPORT virtual void ChangeHealingParams() Standard_OVERRIDE;
+
public:
enum ReadMode_BSplineContinuity
#include <IGESControl_Controller.hxx>
#include <IGESData.hxx>
#include <IGESData_IGESModel.hxx>
+#include <IGESToBRep_Actor.hxx>
#include <Interface_Static.hxx>
#include <Message.hxx>
+#include <MoniTool_Macros.hxx>
#include <XCAFDoc_DocumentTool.hxx>
+#include <XSControl_TransferReader.hxx>
#include <XSControl_WorkSession.hxx>
#include <UnitsMethods.hxx>
IGESCAFControl_Reader aReader;
aReader.SetWS(theWS);
- aReader.SetReadVisible(aNode->InternalParameters.ReadOnlyVisible);
+ DE_ShapeFixParameters::HealingParamMap aMap = aReader.DEHealingParameters();
+ aNode->HealingParameters.FillParamsMap(aMap);
+ aReader.SetDEHealingParameters(aMap);
+ 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());
+ DeclareAndCast(IGESToBRep_Actor, anActor, aReader.WS()->TransferReader()->Actor());
+ anActor->SetDEHealingParameters(aMap);
if (aReadStat != IFSelect_RetDone)
{
Message::SendFail() << "Error in the IGESCAFControl_Provider during reading the file " <<
IGESControl_Reader aReader;
aReader.SetWS(theWS);
aReader.SetReadVisible(aNode->InternalParameters.ReadOnlyVisible);
+
+ DE_ShapeFixParameters::HealingParamMap aMap = aReader.DEHealingParameters();
+ aNode->HealingParameters.FillParamsMap(aMap);
+ aReader.SetDEHealingParameters(aMap);
+
IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid;
aReadStat = aReader.ReadFile(thePath.ToCString());
+ DeclareAndCast(IGESToBRep_Actor, anActor, aReader.WS()->TransferReader()->Actor());
+ anActor->SetDEHealingParameters(aMap);
if (aReadStat != IFSelect_RetDone)
{
Message::SendFail() << "Error in the IGESCAFControl_Provider during reading the file " <<
#include <TransferBRep_ShapeBinder.hxx>
#include <XSAlgo.hxx>
#include <XSAlgo_AlgoContainer.hxx>
+#include <XSAlgo_AlgoProcessShape.hxx>
IMPLEMENT_STANDARD_RTTIEXT(IGESToBRep_Actor,Transfer_ActorOfTransientProcess)
// fixing shape
Handle(Standard_Transient) info;
- shape = XSAlgo::AlgoContainer()->ProcessShape(shape, theeps, CAS.GetMaxTol(),
- "read.iges.resource.name",
- "read.iges.sequence",
- info, mymodel->ReShape(),
- aPS.Next(), false, TopAbs_EDGE);
+ XSAlgo_AlgoProcessShape aProcessShape;
+ aProcessShape.SetShape(shape);
+ aProcessShape.SetPrscfile("read.iges.resource.name");
+ aProcessShape.SetPseq("read.iges.sequence");
+ aProcessShape.SetInfo(info);
+ aProcessShape.SetDetalisationLevel(TopAbs_EDGE);
+ aProcessShape.SetProgressRange(aPS.Next());
+ aProcessShape.SetPrecision(theeps);
+ aProcessShape.SetMaxTol(CAS.GetMaxTol());
+ aProcessShape.SetReShape(mymodel->ReShape());
+ shape = aProcessShape.ProcessShape();
XSAlgo::AlgoContainer()->MergeTransferInfo(TP, info, nbTPitems);
}
#include <Standard.hxx>
#include <Standard_Type.hxx>
+#include <DE_ShapeFixParameters.hxx>
#include <Standard_Integer.hxx>
#include <Transfer_ActorOfTransientProcess.hxx>
#include <Message_ProgressRange.hxx>
//! the file or from statics
Standard_EXPORT Standard_Real UsedTolerance() const;
+ //! Returns healing parameters map
+ Standard_EXPORT DE_ShapeFixParameters::HealingParamMap DEHealingParameters() const { return myDEHealingParameters; }
+ //! Sets healing parameters map
+ Standard_EXPORT void SetDEHealingParameters(DE_ShapeFixParameters::HealingParamMap theDEHealingParams) { myDEHealingParameters = theDEHealingParams; }
DEFINE_STANDARD_RTTIEXT(IGESToBRep_Actor,Transfer_ActorOfTransientProcess)
Handle(Interface_InterfaceModel) themodel;
Standard_Integer thecontinuity;
Standard_Real theeps;
-
+ DE_ShapeFixParameters::HealingParamMap myDEHealingParameters;
};
#include <TransferBRep.hxx>
#include <XSAlgo.hxx>
#include <XSAlgo_AlgoContainer.hxx>
+#include <XSAlgo_AlgoProcessShape.hxx>
#include <stdio.h>
//#include <ShapeCustom.hxx>
// shape = XSAlgo::AlgoContainer()->PerformFixShape ( shape, theProc, eps*CAS.GetUnitFactor(), CAS.GetMaxTol() );
Handle(Standard_Transient) info;
- shape = XSAlgo::AlgoContainer()->ProcessShape( shape, eps*CAS.GetUnitFactor(), CAS.GetMaxTol(),
- "read.iges.resource.name",
- "read.iges.sequence", info,
- aPS.Next(), false, TopAbs_EDGE);
+ XSAlgo_AlgoProcessShape aProcessShape;
+ aProcessShape.SetShape(shape);
+ aProcessShape.SetPrscfile("read.iges.resource.name");
+ aProcessShape.SetPseq("read.iges.sequence");
+ aProcessShape.SetInfo(info);
+ aProcessShape.SetDetalisationLevel(TopAbs_EDGE);
+ aProcessShape.SetProgressRange(theProgress);
+ aProcessShape.SetPrecision(eps * CAS.GetUnitFactor());
+ aProcessShape.SetMaxTol(CAS.GetMaxTol());
+ shape = aProcessShape.ProcessShape();
+
if (aPS.UserBreak())
return Standard_False;
#include <STEPCAFControl_ConfigurationNode.hxx>
#include <DE_ConfigurationContext.hxx>
+#include <DE_ShapeFixConfigurationNode.hxx>
#include <DE_PluginHolder.hxx>
#include <NCollection_Buffer.hxx>
#include <STEPCAFControl_Provider.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_ConfigurationNode, DE_ConfigurationNode)
+IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_ConfigurationNode, DE_ShapeFixConfigurationNode)
namespace
{
// purpose :
//=======================================================================
STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode() :
- DE_ConfigurationNode()
-{}
+ DE_ShapeFixConfigurationNode()
+{
+}
//=======================================================================
// function : STEPCAFControl_ConfigurationNode
// purpose :
//=======================================================================
STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode(const Handle(STEPCAFControl_ConfigurationNode)& theNode)
- :DE_ConfigurationNode(theNode),
+ :DE_ShapeFixConfigurationNode(theNode),
InternalParameters(theNode->InternalParameters)
-{}
+{
+}
//=======================================================================
// function : Load
#ifndef _STEPCAFControl_ConfigurationNode_HeaderFile
#define _STEPCAFControl_ConfigurationNode_HeaderFile
-#include <DE_ConfigurationNode.hxx>
+#include <DE_ShapeFixConfigurationNode.hxx>
#include <STEPControl_StepModelType.hxx>
#include <StepData_ConfParameters.hxx>
#include <Resource_FormatType.hxx>
//! The supported CAD extensions are ".stp", ".step", ".stpz"
//! The import process is supported.
//! The export process is supported.
-class STEPCAFControl_ConfigurationNode : public DE_ConfigurationNode
+class STEPCAFControl_ConfigurationNode : public DE_ShapeFixConfigurationNode
{
- DEFINE_STANDARD_RTTIEXT(STEPCAFControl_ConfigurationNode, DE_ConfigurationNode)
+ DEFINE_STANDARD_RTTIEXT(STEPCAFControl_ConfigurationNode, DE_ShapeFixConfigurationNode)
public:
//! Initializes all field by default
#include <STEPCAFControl_Provider.hxx>
#include <BinXCAFDrivers.hxx>
+#include <DE_ShapeFixParameters.hxx>
#include <Interface_Static.hxx>
#include <Message.hxx>
#include <StepData_StepModel.hxx>
#include <STEPCAFControl_Reader.hxx>
#include <STEPCAFControl_Writer.hxx>
#include <XCAFDoc_DocumentTool.hxx>
+#include <XSAlgo.hxx>
+#include <XSAlgo_AlgoContainer.hxx>
#include <XSControl_WorkSession.hxx>
#include <UnitsMethods.hxx>
personizeWS(theWS);
XCAFDoc_DocumentTool::SetLengthUnit(theDocument, aNode->GlobalParameters.LengthUnit, UnitsMethods_LengthUnit_Millimeter);
STEPCAFControl_Reader aReader;
+ DE_ShapeFixParameters aParameters;
+ DE_ShapeFixParameters::HealingParamMap aDEHealingParams = aReader.ChangeReader().DEHealingParameters();
+ aNode->HealingParameters.FillParamsMap(aDEHealingParams);
+ aReader.ChangeReader().SetDEHealingParameters(aDEHealingParams);
aReader.Init(theWS);
aReader.SetColorMode(aNode->InternalParameters.ReadColor);
aReader.SetNameMode(aNode->InternalParameters.ReadName);
aReader.SetLayerMode(aNode->InternalParameters.ReadLayer);
aReader.SetPropsMode(aNode->InternalParameters.ReadProps);
aReader.SetMetaMode(aNode->InternalParameters.ReadMetadata);
+ aReader.SetDEHealingParameters(aReader.ChangeReader().DEHealingParameters());
IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid;
StepData_ConfParameters aParams;
personizeWS(theWS);
STEPControl_Reader aReader;
aReader.SetWS(theWS);
+ DE_ShapeFixParameters::HealingParamMap aDEHealingParams = aReader.DEHealingParameters();
+ aNode->HealingParameters.FillParamsMap(aDEHealingParams);
+ aReader.SetDEHealingParameters(aDEHealingParams);
IFSelect_ReturnStatus aReadstat = IFSelect_RetVoid;
StepData_ConfParameters aParams;
aReadstat = aReader.ReadFile(thePath.ToCString(), aParams);
#include <HeaderSection_FileSchema.hxx>
#include <Interface_Static.hxx>
#include <Message_ProgressScope.hxx>
+#include <MoniTool_Macros.hxx>
#include <NCollection_DataMap.hxx>
#include <OSD_Path.hxx>
#include <Quantity_ColorRGBA.hxx>
void readAnnotation(const Handle(XSControl_TransferReader)& theTR,
const Handle(Standard_Transient)& theGDT,
const Handle(Standard_Transient)& theDimObject,
- const StepData_Factors& theLocalFactors)
+ const StepData_Factors& theLocalFactors,
+ DE_ShapeFixParameters::HealingParamMap theDEParams)
{
if (theGDT.IsNull() || theDimObject.IsNull())
return;
Handle(StepVisual_DraughtingModel)::DownCast(aDMIA->UsedRepresentation());
XSAlgo::AlgoContainer()->PrepareForTransfer();
STEPControl_ActorRead anActor(aTP->Model());
+ anActor.SetDEHealingParameters(theDEParams);
StepData_Factors aLocalFactors = theLocalFactors;
anActor.PrepareUnits(aDModel, aTP, aLocalFactors);
Standard_Real aFact = aLocalFactors.LengthFactor();
void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR,
const Handle(Standard_Transient)& theGDT,
const Handle(XCAFDimTolObjects_DimensionObject)& theDimObject,
- const StepData_Factors& theLocalFactors)
+ const StepData_Factors& theLocalFactors,
+ DE_ShapeFixParameters::HealingParamMap theDEParams)
{
if (theGDT.IsNull() || theDimObject.IsNull())
return;
{
XSAlgo::AlgoContainer()->PrepareForTransfer();
STEPControl_ActorRead anActor(theTR->Model());
+ anActor.SetDEHealingParameters(theDEParams);
StepData_Factors aLocalFactors = theLocalFactors;
anActor.PrepareUnits(aSDR, aTP, aLocalFactors);
aFact = aLocalFactors.LengthFactor();
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, theLocalFactors);
+ readAnnotation(aTR, aSAR->RelatingShapeAspect(), aDatObj, theLocalFactors, myDEParameters);
}
// Collect shape labels
= Handle(StepGeom_Axis2Placement3d)::DownCast(aSRWP->ItemsValue(j));
XSAlgo::AlgoContainer()->PrepareForTransfer();
STEPControl_ActorRead anActor(aTP->Model());
+ anActor.SetDEHealingParameters(myDEParameters);
StepData_Factors aLocalFactors = theLocalFactors;
anActor.PrepareUnits(aSRWP, aTP, aLocalFactors);
Handle(Geom_Axis2Placement) anAxis = StepToGeom::MakeAxis2Placement(anAx, aLocalFactors);
aDGTTool->SetDatumToGeomTol(aDatL, theGDTL);
aDatTargetObj->IsDatumTarget(Standard_True);
aDatTargetObj->SetDatumTargetNumber(aDT->TargetId()->IntegerValue());
- readAnnotation(aTR, aDT, aDatTargetObj, theLocalFactors);
+ readAnnotation(aTR, aDT, aDatTargetObj, theLocalFactors, myDEParameters);
aDat->SetObject(aDatTargetObj);
isExistDatumTarget = Standard_True;
}
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, theLocalFactors);
+ readAnnotation(aTR, theDat, aDatObj, theLocalFactors, myDEParameters);
}
aDat->SetObject(aDatObj);
}
const TDF_Label& aDimL,
const Handle(TDocStd_Document)& theDoc,
const Handle(XSControl_WorkSession)& theWS,
- const StepData_Factors& theLocalFactors)
+ const StepData_Factors& theLocalFactors,
+ DE_ShapeFixParameters::HealingParamMap theUseDEHealingParams)
{
Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main());
Handle(XCAFDoc_DimTolTool) aDGTTool = XCAFDoc_DocumentTool::DimTolTool(theDoc->Main());
if (aDimL.FindAttribute(XCAFDoc_Dimension::GetID(), aDim))
{
- readAnnotation(aTR, theEnt, aDimObj, theLocalFactors);
- readConnectionPoints(aTR, theEnt, aDimObj, theLocalFactors);
+ readAnnotation(aTR, theEnt, aDimObj, theLocalFactors, theUseDEHealingParams);
+ readConnectionPoints(aTR, theEnt, aDimObj, theLocalFactors, theUseDEHealingParams);
aDim->SetObject(aDimObj);
}
}
const TDF_Label& theTolL,
const Handle(TDocStd_Document)& theDoc,
const Handle(XSControl_WorkSession)& theWS,
- const StepData_Factors& theLocalFactors)
+ const StepData_Factors& theLocalFactors,
+ DE_ShapeFixParameters::HealingParamMap theUseDEHealingParams)
{
Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main());
Handle(XCAFDoc_DimTolTool) aDGTTool = XCAFDoc_DocumentTool::DimTolTool(theDoc->Main());
aTolObj->SetMaxValueModifier(aVal);
}
- readAnnotation(aTR, theEnt, aTolObj, theLocalFactors);
+ readAnnotation(aTR, theEnt, aTolObj, theLocalFactors, theUseDEHealingParams);
aGTol->SetObject(aTolObj);
}
TDF_Label aGDTL = createGDTObjectInXCAF(anEnt, theDoc, theWS, theLocalFactors);
if (!aGDTL.IsNull()) {
if (anEnt->IsKind(STANDARD_TYPE(StepDimTol_GeometricTolerance))) {
- setGeomTolObjectToXCAF(anEnt, aGDTL, theDoc, theWS, theLocalFactors);
+ setGeomTolObjectToXCAF(anEnt, aGDTL, theDoc, theWS, theLocalFactors, myDEParameters);
}
else {
- setDimObjectToXCAF(anEnt, aGDTL, theDoc, theWS, theLocalFactors);
+ setDimObjectToXCAF(anEnt, aGDTL, theDoc, theWS, theLocalFactors, myDEParameters);
}
}
}
{
XSAlgo::AlgoContainer()->PrepareForTransfer();
STEPControl_ActorRead anActor(aModel);
+ anActor.SetDEHealingParameters(myDEParameters);
Handle(Transfer_TransientProcess) aTP = aTR->TransientProcess();
anActor.PrepareUnits(aDMIA->UsedRepresentation(), aTP, aLocalFactors);
aFact = aLocalFactors.LengthFactor();
{
XSAlgo::AlgoContainer()->PrepareForTransfer();
STEPControl_ActorRead anActor(aTP->Model());
+ anActor.SetDEHealingParameters(myDEParameters);
anActor.PrepareUnits(aDModel, aTP, aLocalFactors);
}
#ifndef _STEPCAFControl_Reader_HeaderFile
#define _STEPCAFControl_Reader_HeaderFile
+#include <DE_ShapeFixParameters.hxx>
#include <STEPControl_Reader.hxx>
#include <StepData_Factors.hxx>
#include <IFSelect_ReturnStatus.hxx>
//! Get View mode
Standard_EXPORT Standard_Boolean GetViewMode() const;
+ //! Returns healing parameters map
+ Standard_EXPORT DE_ShapeFixParameters::HealingParamMap DEHealingParameters() const { return myDEParameters; }
+
+ //! Sets healing parameters map
+ Standard_EXPORT void SetDEHealingParameters(DE_ShapeFixParameters::HealingParamMap theDEHealingParams) { myDEParameters = theDEHealingParams; }
+
+
const XCAFDoc_DataMapOfShapeLabel& GetShapeLabelMap() const { return myMap; }
protected:
Standard_Boolean myMatMode;
Standard_Boolean myViewMode;
NCollection_DataMap<Handle(Standard_Transient), TDF_Label> myGDTMap;
+ DE_ShapeFixParameters::HealingParamMap myDEParameters;
};
#include <UnitsMethods.hxx>
#include <XSAlgo.hxx>
#include <XSAlgo_AlgoContainer.hxx>
+#include <XSAlgo_AlgoProcessShape.hxx>
#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
#include <StepRepr_MechanicalDesignAndDraughtingRelationship.hxx>
Handle(Standard_Transient) info;
// IMPORTANT: any fixing on non-manifold topology must be done after the shape is transferred from STEP
- TopoDS_Shape fixedResult =
- XSAlgo::AlgoContainer()->ProcessShape( comp, myPrecision, myMaxTol,
- "read.step.resource.name",
- "read.step.sequence", info,
- aPS1.Next(), Standard_True);
+ XSAlgo_AlgoProcessShape aProcessShape;
+ aProcessShape.SetShape(comp);
+ aProcessShape.SetPrscfile("read.step.resource.name");
+ aProcessShape.SetPseq("read.step.sequence");
+ aProcessShape.SetInfo(info);
+ aProcessShape.SetNonManifold(Standard_True);
+ aProcessShape.SetProgressRange(theProgress);
+ aProcessShape.SetPrecision(myPrecision);
+ aProcessShape.SetMaxTol(myMaxTol);
+ TopoDS_Shape fixedResult = aProcessShape.ProcessShape();
XSAlgo::AlgoContainer()->MergeTransferInfo(TP, info, nbTPitems);
if (fixedResult.ShapeType() == TopAbs_COMPOUND)
if (isManifold && aHasGeom)
{
Handle(Standard_Transient) info;
- mappedShape =
- XSAlgo::AlgoContainer()->ProcessShape( mappedShape, myPrecision, myMaxTol,
- "read.step.resource.name",
- "read.step.sequence", info,
- aPS.Next());
+ XSAlgo_AlgoProcessShape aProcessShape;
+ aProcessShape.SetShape(mappedShape);
+ aProcessShape.SetPrscfile("read.step.resource.name");
+ aProcessShape.SetPseq("read.step.sequence");
+ aProcessShape.SetInfo(info);
+ aProcessShape.SetProgressRange(aPS.Next());
+ aProcessShape.SetPrecision(myPrecision);
+ aProcessShape.SetMaxTol(myMaxTol);
+ mappedShape = aProcessShape.ProcessShape();
XSAlgo::AlgoContainer()->MergeTransferInfo(TP, info, nbTPitems);
}
}
TopoDS_Shape S = sb->Result();
Handle(Standard_Transient) info;
- TopoDS_Shape shape = XSAlgo::AlgoContainer()->ProcessShape(S, myPrecision, myMaxTol,
- "read.step.resource.name",
- "read.step.sequence", info,
- theProgress);
+ XSAlgo_AlgoProcessShape aProcessShape;
+ aProcessShape.SetShape(S);
+ aProcessShape.SetPrscfile("read.step.resource.name");
+ aProcessShape.SetPseq("read.step.sequence");
+ aProcessShape.SetInfo(info);
+ aProcessShape.SetProgressRange(theProgress);
+ aProcessShape.SetPrecision(myPrecision);
+ aProcessShape.SetMaxTol(myMaxTol);
+ TopoDS_Shape shape = aProcessShape.ProcessShape();
// TopoDS_Shape shape = XSAlgo::AlgoContainer()->PerformFixShape( S, TP, myPrecision, myMaxTol );
if (shape != S)
sb->SetResult(shape);
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <Message_ProgressRange.hxx>
#include <Interface_InterfaceModel.hxx>
+#include <DE_ShapeFixParameters.hxx>
class StepRepr_Representation;
class Standard_Transient;
gp_Trsf& Trsf,
const StepData_Factors& theLocalFactors = StepData_Factors());
+ //! Returns healing parameters map
+ Standard_EXPORT DE_ShapeFixParameters::HealingParamMap DEHealingParameters() const { return myDEParameters; }
+ //! Sets healing parameters map
+ Standard_EXPORT void SetDEHealingParameters(DE_ShapeFixParameters::HealingParamMap theDEHealingParams) { myDEParameters = theDEHealingParams; }
DEFINE_STANDARD_RTTIEXT(STEPControl_ActorRead,Transfer_ActorOfTransientProcess)
Standard_Real myMaxTol;
Handle(StepRepr_Representation) mySRContext;
Handle(Interface_InterfaceModel) myModel;
+ DE_ShapeFixParameters::HealingParamMap myDEParameters;
};
if (hasGeometry(aShape))
{
Standard_Real maxTol = aStepModel->InternalParameters.ReadMaxPrecisionVal;
-
aShape = XSAlgo::AlgoContainer()->ProcessShape(xShape, Tol, maxTol,
"write.step.resource.name",
"write.step.sequence", info,
WS()->InitTransferReader(4);
return status;
}
-
+#include <STEPControl_ActorRead.hxx>
+#include <MoniTool_Macros.hxx>
//=======================================================================
//function : ReadFile
//purpose :
WS()->SetModel(aStepModel);
WS()->SetLoadedFile(filename);
WS()->InitTransferReader(4);
+ //DeclareAndCast(STEPControl_ActorRead, anActor, WS()->TransferReader()->Actor());
+ //anActor->SetDEHealingParameters(DEHealingParameters());
return status;
}
//purpose :
//=======================================================================
XSAlgo_AlgoContainer::XSAlgo_AlgoContainer()
- : myDEHealingParamsUsage(false)
{
myTC = new XSAlgo_ToolContainer;
}
aProcessShape.SetPrscfile(thePrscfile);
aProcessShape.SetPseq(thePseq);
aProcessShape.SetInfo(theInfo);
- aProcessShape.SetHealingParamsFlag(myDEHealingParamsUsage);
- aProcessShape.SetHealingParameters(myHealingParameters);
aProcessShape.SetDetalisationLevel(theDetalisationLevel);
aProcessShape.SetNonManifold(theNonManifold);
aProcessShape.SetProgressRange(theProgress);
//! Sets ToolContainer
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;
Standard_EXPORT virtual void MergeTransferInfo (const Handle(Transfer_FinderProcess)& FP, const Handle(Standard_Transient)& info) const;
-
-
DEFINE_STANDARD_RTTIEXT(XSAlgo_AlgoContainer,Standard_Transient)
protected:
private:
- bool myDEHealingParamsUsage;
Handle(XSAlgo_ToolContainer) myTC;
- DE_ShapeFixParameters myHealingParameters;
-
};
myMaxTol(1.),
myNonManifold(false),
myDetalisationLevel(TopAbs_VERTEX),
- myDEHealingParamsUsage(false),
myProgressRange(Message_ProgressRange())
{
}
return myShape;
}
+ if (myReShape.IsNull())
+ {
+ myReShape = new ShapeBuild_ReShape();
+ }
+
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 (myDEParameters.IsEmpty())
+ {
+ if (!aContext->ResourceManager()->IsInitialized())
{
// If resource file wasn't found, use static values instead
Interface_Static::FillMap(aContext->ResourceManager()->GetMap());
return aContext->Result();
}
-
-//=======================================================================
-//function : FillMap
-//purpose :
-//=======================================================================
-void XSAlgo_AlgoProcessShape::FillMap(NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString>& 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<int>(myHealingParameters.FixFreeShellMode)));
- theMap.Bind("FixFreeFaceMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixFreeFaceMode)));
- theMap.Bind("FixFreeFaceMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixFreeFaceMode)));
- theMap.Bind("FixFreeWireMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixFreeWireMode)));
- theMap.Bind("FixSameParameterMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixSameParameterMode)));
- theMap.Bind("FixSolidMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixSolidMode)));
- theMap.Bind("FixShellOrientationMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixShellOrientationMode)));
- theMap.Bind("CreateOpenSolidMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.CreateOpenSolidMode)));
- theMap.Bind("FixShellMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixShellMode)));
- theMap.Bind("FixFaceOrientationMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixFaceOrientationMode)));
- theMap.Bind("FixFaceMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixFaceMode)));
- theMap.Bind("FixWireMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixWireMode)));
- theMap.Bind("FixOrientationMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixOrientationMode)));
- theMap.Bind("FixAddNaturalBoundMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixAddNaturalBoundMode)));
- theMap.Bind("FixMissingSeamMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixMissingSeamMode)));
- theMap.Bind("FixSmallAreaWireMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixSmallAreaWireMode)));
- theMap.Bind("RemoveSmallAreaFaceMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.RemoveSmallAreaFaceMode)));
- theMap.Bind("FixIntersectingWiresMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixIntersectingWiresMode)));
- theMap.Bind("FixLoopWiresMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixLoopWiresMode)));
- theMap.Bind("FixSplitFaceMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixSplitFaceMode)));
- theMap.Bind("AutoCorrectPrecisionMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.AutoCorrectPrecisionMode)));
- theMap.Bind("ModifyTopologyMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.ModifyTopologyMode)));
- theMap.Bind("ClosedWireMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.ClosedWireMode)));
- theMap.Bind("PreferencePCurveMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.PreferencePCurveMode)));
- theMap.Bind("FixReorderMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixReorderMode)));
- theMap.Bind("FixSmallMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixSmallMode)));
- theMap.Bind("FixConnectedMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixConnectedMode)));
- theMap.Bind("FixEdgeCurvesMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixEdgeCurvesMode)));
- theMap.Bind("FixDegeneratedMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixDegeneratedMode)));
- theMap.Bind("FixLackingMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixLackingMode)));
- theMap.Bind("FixSelfIntersectionMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixSelfIntersectionMode)));
- theMap.Bind("RemoveLoopMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.RemoveLoopMode)));
- theMap.Bind("FixReversed2dMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixReversed2dMode)));
- theMap.Bind("FixRemovePCurveMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixRemovePCurveMode)));
- theMap.Bind("FixRemoveCurve3dMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixRemoveCurve3dMode)));
- theMap.Bind("FixAddPCurveMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixAddPCurveMode)));
- theMap.Bind("FixAddCurve3dMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixAddCurve3dMode)));
- theMap.Bind("FixSeamMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixSeamMode)));
- theMap.Bind("FixShiftedMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixShiftedMode)));
- theMap.Bind("FixEdgeSameParameterMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixEdgeSameParameterMode)));
- theMap.Bind("FixNotchedEdgesMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixNotchedEdgesMode)));
- theMap.Bind("FixTailMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixTailMode)));
- theMap.Bind("MaxTailAngle", TCollection_AsciiString(static_cast<int>(myHealingParameters.MaxTailAngle)));
- theMap.Bind("MaxTailWidth", TCollection_AsciiString(static_cast<int>(myHealingParameters.MaxTailWidth)));
- theMap.Bind("FixSelfIntersectingEdgeMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixSelfIntersectingEdgeMode)));
- theMap.Bind("FixIntersectingEdgesMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixIntersectingEdgesMode)));
- theMap.Bind("FixNonAdjacentIntersectingEdgesMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixNonAdjacentIntersectingEdgesMode)));
- theMap.Bind("FixVertexPositionMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixVertexPositionMode)));
- theMap.Bind("FixVertexToleranceMode", TCollection_AsciiString(static_cast<int>(myHealingParameters.FixVertexToleranceMode)));
-}
//! Shape processing with specified tolerances
Standard_EXPORT TopoDS_Shape ProcessShape();
- //! Fill map from DE shape healing parameters
- void FillMap(NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString>& theMap) const;
-
//! Get shape for processing
const TopoDS_Shape& GetShape() { return myShape; }
//! 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 tool to record the modifications of input shape
void SetReShape(const Handle(ShapeBuild_ReShape)& theReShape) { myReShape = theReShape; }
+ //! Returns healing parameters map
+ DE_ShapeFixParameters::HealingParamMap DEHealingParameters() const { return myDEParameters; }
+
+ //! Sets healing parameters map
+ void SetDEHealingParameters(DE_ShapeFixParameters::HealingParamMap theDEHealingParams) { myDEParameters = theDEHealingParams; }
+
DEFINE_STANDARD_RTTIEXT(XSAlgo_AlgoProcessShape, Standard_Transient)
private:
double myMaxTol;
bool myNonManifold;
TopAbs_ShapeEnum myDetalisationLevel;
- bool myDEHealingParamsUsage;
- DE_ShapeFixParameters myHealingParameters;
Message_ProgressRange myProgressRange;
Handle(Standard_Transient) myInfo;
Handle(ShapeBuild_ReShape) myReShape;
+ DE_ShapeFixParameters::HealingParamMap myDEParameters;
};
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
+#include <DE_ShapeFixParameters.hxx>
#include <TColStd_SequenceOfTransient.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <Standard_CString.hxx>
//! Gives statistics about Transfer
Standard_EXPORT void GetStatsTransfer (const Handle(TColStd_HSequenceOfTransient)& list, Standard_Integer& nbMapped, Standard_Integer& nbWithResult, Standard_Integer& nbWithFail) const;
+ //! Returns healing parameters map
+ Standard_EXPORT DE_ShapeFixParameters::HealingParamMap DEHealingParameters() const { return myDEParameters; }
+ //! Sets healing parameters map
+ Standard_EXPORT void SetDEHealingParameters(DE_ShapeFixParameters::HealingParamMap theDEHealingParams) { myDEParameters = theDEHealingParams; }
protected:
Handle(XSControl_WorkSession) thesession;
TopTools_SequenceOfShape theshapes;
+ DE_ShapeFixParameters::HealingParamMap myDEParameters;
};
Standard_Integer onlyVisible = Interface_Static::IVal("read.iges.onlyvisible");
aReader.SetReadVisible(onlyVisible == 1);
+ DE_ShapeFixParameters aParameters;
+ DE_ShapeFixParameters::HealingParamMap aDEHealingParams = aReader.DEHealingParameters();
+ aParameters.FillParamsMap(aDEHealingParams);
+ aReader.SetDEHealingParameters(aDEHealingParams);
+
if (theNbArgs == 4)
{
Standard_Boolean mode = Standard_True;
#include <DDF.hxx>
#include <DDocStd.hxx>
#include <DDocStd_DrawDocument.hxx>
+#include <DE_ShapeFixParameters.hxx>
#include <Draw.hxx>
#include <Draw_Interpretor.hxx>
#include <Draw_PluginMacro.hxx>
}
STEPCAFControl_Reader aReader(XSDRAW::Session(), isFileMode);
+ DE_ShapeFixParameters aParameters;
+ DE_ShapeFixParameters::HealingParamMap aDEHealingParams = aReader.ChangeReader().DEHealingParameters();
+ aParameters.FillParamsMap(aDEHealingParams);
+ aReader.ChangeReader().SetDEHealingParameters(aDEHealingParams);
+
if (!aModeStr.IsEmpty())
{
Standard_Boolean aMode = Standard_True;