MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #25280 All Revisions ] Back to Issue ]
Summary 0025280: Data Exchange - Interface_BitMap::Init crashes
Revision 2020-10-12 18:00 by kgv
Steps To Reproduce Just Call IFSelect_WorkSession::SendSelected with valid model and selection, e.g

IFSelect_ReturnStatus stat = reader.ReadFile(attached_step_file_or_another_one_with_solids);
Handle_XSControl_WorkSession RWS = reader.WS();

Handle_IFSelect_SelectPointed sp = new IFSelect_SelectPointed;

Handle_Interface_InterfaceModel Model = RWS->Model();

Handle_Standard_Type tGRI = STANDARD_TYPE(StepShape_SolidModel);
Standard_Integer nb = Model->NbEntities();

for (Standard_Integer i = 1; i <= nb; i ++) {
  Handle_Standard_Transient enti = Model->Value(i);
  if ( ! enti->IsKind ( tGRI) ) continue;
  Handle_StepGeom_GeometricRepresentationItem gri = 
    Handle_StepGeom_GeometricRepresentationItem::DownCast(enti);

  sp->SetEntity(gri);
  break;
}


STEPControl_Writer writer(RWS, Standard_False);
writer.WS()->WriteFile(valid_outfile, sp);
Revision 2014-09-27 00:37 by nikiml
Steps To Reproduce Just Call IFSelect_WorkSession::SendSelected with valid model and selection, e.g

IFSelect_ReturnStatus stat = reader.ReadFile(attached_step_file_or_another_one_with_solids);
Handle_XSControl_WorkSession RWS = reader.WS();

Handle_IFSelect_SelectPointed sp = new IFSelect_SelectPointed;

Handle_Interface_InterfaceModel Model = RWS->Model();

Handle_Standard_Type tGRI = STANDARD_TYPE(StepShape_SolidModel);
Standard_Integer nb = Model->NbEntities();

for (Standard_Integer i = 1; i <= nb; i ++) {
  Handle_Standard_Transient enti = Model->Value(i);
  if ( ! enti->IsKind ( tGRI) ) continue;
  Handle_StepGeom_GeometricRepresentationItem gri =
    Handle_StepGeom_GeometricRepresentationItem::DownCast(enti);

  sp->SetEntity(gri);
  break;
}


STEPControl_Writer writer(RWS, Standard_False);
writer.WS()->WriteFile(valid_outfile, sp);


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker