1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Data Exchange - Losing attributes on NonManifold STEP #284

Move step related processing from XSBase to STP module.
Added history apply after reading of NonManifold
This commit is contained in:
dpasukhi
2025-01-24 01:20:44 +00:00
parent a0401c7872
commit dbba6f1289
6 changed files with 157 additions and 64 deletions

View File

@@ -45,9 +45,11 @@
#include <STEPSelections_SelectForTransfer.hxx>
#include <STEPSelections_SelectGSCurves.hxx>
#include <STEPSelections_SelectInstances.hxx>
#include <ShapeUpgrade_RemoveLocations.hxx>
#include <TopoDS_Shape.hxx>
#include <Transfer_ActorOfTransientProcess.hxx>
#include <XSAlgo.hxx>
#include <XSAlgo_ShapeProcessor.hxx>
#include <XSControl_WorkSession.hxx>
IMPLEMENT_STANDARD_RTTIEXT(STEPControl_Controller,XSControl_Controller)
@@ -437,10 +439,22 @@ IFSelect_ReturnStatus STEPControl_Controller::TransferWriteShape
Handle(STEPControl_ActorWrite) ActWrite =
Handle(STEPControl_ActorWrite)::DownCast(myAdaptorWrite);
// A PRESENT ON PASSE PAR LE PROFILE
Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(model);
if (!ActWrite.IsNull())
ActWrite->SetGroupMode (Handle(StepData_StepModel)::DownCast(model)->InternalParameters.WriteAssembly);
return XSControl_Controller::TransferWriteShape(shape, FP, model, modeshape, theProgress);
ActWrite->SetGroupMode (aModel->InternalParameters.WriteAssembly);
TopoDS_Shape aShape = shape;
TopTools_DataMapOfShapeShape aModifedMap;
if (aModel->InternalParameters.WriteNonmanifold)
{
ShapeUpgrade_RemoveLocations aRemLoc;
aRemLoc.SetRemoveLevel(TopAbs_COMPOUND);
aRemLoc.Remove(aShape);
aShape = aRemLoc.GetResult();
aModifedMap = aRemLoc.GetModifiedShapesMap();
}
const IFSelect_ReturnStatus aStatus = XSControl_Controller::TransferWriteShape(aShape, FP, model, modeshape, theProgress);
XSAlgo_ShapeProcessor::MergeShapeTransferInfo(FP, aModifedMap, Handle(ShapeExtend_MsgRegistrator)());
return aStatus;
}
Standard_Boolean STEPControl_Controller::Init ()