mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +03:00
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.
This commit is contained in:
@@ -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();
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user