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

Compare commits

...

1 Commits

Author SHA1 Message Date
gka
655a2bda62 0029270: Added possibility to load in the STEP model a few step files.
if in the method  XSControl_Reader::SetWS(const Handle(XSControl_WorkSession)& WS,const Standard_Boolean scratch) flag scratch is equal to false then entities from loaded step files were added in the existing STEP model.
2019-09-12 10:51:24 +03:00
2 changed files with 13 additions and 4 deletions

View File

@@ -212,7 +212,7 @@ IFSelect_ReturnStatus IFSelect_WorkSession::ReadFile
{
if (thelibrary.IsNull()) return IFSelect_RetVoid;
if (theprotocol.IsNull()) return IFSelect_RetVoid;
Handle(Interface_InterfaceModel) model;
Handle(Interface_InterfaceModel) model =myModel;
IFSelect_ReturnStatus status = IFSelect_RetVoid;
try {
OCC_CATCH_SIGNALS
@@ -1701,11 +1701,12 @@ Standard_Integer IFSelect_WorkSession::RunTransformer
{
Standard_Integer effect = 0;
if (transf.IsNull() || !IsLoaded()) return effect;
Handle(Interface_InterfaceModel) newmod; // Null au depart
Interface_CheckIterator checks;
checks.SetName("X-STEP WorkSession : RunTransformer");
Standard_Boolean res = transf->Perform
(thegraph->Graph(),theprotocol,checks,newmod);
(thegraph->Graph(),theprotocol,checks,myModel);
if (!checks.IsEmpty(Standard_False)) {
Handle(Message_Messenger) sout = Message::DefaultMessenger();

View File

@@ -70,8 +70,16 @@ Standard_Integer StepSelect_WorkLibrary::ReadFile
long status = 1;
DeclareAndCast(StepData_Protocol,stepro,protocol);
if (stepro.IsNull()) return 1;
Handle(StepData_StepModel) stepmodel = new StepData_StepModel;
model = stepmodel;
Handle(StepData_StepModel) stepmodel;
if(!model.IsNull())
stepmodel = Handle(StepData_StepModel)::DownCast(model);
if(stepmodel.IsNull())
{
stepmodel = new StepData_StepModel;
model = stepmodel;
}
StepFile_ReadTrace (0);
char *pName=(char *)name;
status = StepFile_Read (pName,stepmodel,stepro);