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 | Date | |
---|---|---|---|
|
b005f9065c |
@@ -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();
|
||||
@@ -3055,7 +3056,7 @@ Handle(IFSelect_Selection) IFSelect_WorkSession::GiveSelection
|
||||
}
|
||||
|
||||
Handle(IFSelect_Selection) sel;
|
||||
if (np >= 0)
|
||||
if (np >= 0)
|
||||
{
|
||||
nomsel[np] = 0;
|
||||
}
|
||||
|
@@ -52,14 +52,18 @@ void RWStepVisual_RWPresentationLayerAssignment::ReadStep
|
||||
Handle(StepVisual_HArray1OfLayeredItem) aAssignedItems;
|
||||
StepVisual_LayeredItem aAssignedItemsItem;
|
||||
Standard_Integer nsub3;
|
||||
if (data->ReadSubList (num,3,"assigned_items",ach,nsub3)) {
|
||||
Standard_Integer nb3 = data->NbParams(nsub3);
|
||||
aAssignedItems = new StepVisual_HArray1OfLayeredItem (1, nb3);
|
||||
for (Standard_Integer i3 = 1; i3 <= nb3; i3 ++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
if (data->ReadEntity (nsub3,i3,"assigned_items",ach,aAssignedItemsItem))
|
||||
aAssignedItems->SetValue(i3,aAssignedItemsItem);
|
||||
}
|
||||
if (data->ReadSubList(num, 3, "assigned_items", ach, nsub3)) {
|
||||
Standard_Integer nb3 = data->NbParams(nsub3);
|
||||
if (nb3)
|
||||
{
|
||||
|
||||
aAssignedItems = new StepVisual_HArray1OfLayeredItem(1, nb3);
|
||||
for (Standard_Integer i3 = 1; i3 <= nb3; i3++) {
|
||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
|
||||
if (data->ReadEntity(nsub3, i3, "assigned_items", ach, aAssignedItemsItem))
|
||||
aAssignedItems->SetValue(i3, aAssignedItemsItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--- Initialisation of the read entity ---
|
||||
|
@@ -141,11 +141,22 @@ void StepData_StepModel::SetIdentLabel
|
||||
Standard_Integer num = Number(ent);
|
||||
if (!num)
|
||||
return;
|
||||
Standard_Integer nbEnt = NbEntities();
|
||||
if(theidnums.IsNull())
|
||||
{
|
||||
theidnums = new TColStd_HArray1OfInteger(1, NbEntities());
|
||||
theidnums = new TColStd_HArray1OfInteger(1,nbEnt);
|
||||
theidnums->Init(0);
|
||||
}
|
||||
else if(nbEnt > theidnums->Length())
|
||||
{
|
||||
Standard_Integer prevLength = theidnums->Length();
|
||||
Handle(TColStd_HArray1OfInteger) idnums1 = new TColStd_HArray1OfInteger(1,nbEnt);
|
||||
idnums1->Init(0);
|
||||
Standard_Integer k =1;
|
||||
for( ; k <= prevLength; k++)
|
||||
idnums1->SetValue(k , theidnums->Value(k));
|
||||
theidnums = idnums1;
|
||||
}
|
||||
theidnums->SetValue(num,ident);
|
||||
|
||||
}
|
||||
|
@@ -996,8 +996,8 @@ Standard_Boolean StepData_StepReaderData::ReadReal(const Standard_Integer num,
|
||||
Handle(String) errmess; // Null si pas d erreur
|
||||
if (nump > 0 && nump <= NbParams(num)) {
|
||||
const Interface_FileParameter& FP = Param(num,nump);
|
||||
if (FP.ParamType() == Interface_ParamReal) val =
|
||||
Interface_FileReaderData::Fastof(FP.CValue());
|
||||
if (FP.ParamType() == Interface_ParamReal || FP.ParamType() == Interface_ParamInteger)
|
||||
val = Interface_FileReaderData::Fastof(FP.CValue());
|
||||
else errmess = new String("Parameter n0.%d (%s) not a Real");
|
||||
}
|
||||
else errmess = new String("Parameter n0.%d (%s) absent");
|
||||
|
@@ -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);
|
||||
|
@@ -70,5 +70,5 @@ StepVisual_LayeredItem StepVisual_PresentationLayerAssignment::AssignedItemsValu
|
||||
|
||||
Standard_Integer StepVisual_PresentationLayerAssignment::NbAssignedItems () const
|
||||
{
|
||||
return assignedItems->Length();
|
||||
return (assignedItems.IsNull() ? 0 : assignedItems->Length());
|
||||
}
|
||||
|
Reference in New Issue
Block a user