|
Open CASCADE Technology
6.7.1
|
A groundwork to convert a shape to data which complies
with a particular norm. This data can be that of a whole
model or that of a specific list of entities in the model.
You specify the list using a single selection or a
combination of selections. A selection is an operator which
computes a list of entities from a list given in input. To
specify the input, you can use:
More...
#include <XSControl_Reader.hxx>

Public Member Functions | |
| XSControl_Reader () | |
| Creates a Reader from scratch (creates an empty WorkSession) A WorkSession or a Controller must be provided before running More... | |
| XSControl_Reader (const Standard_CString norm) | |
| Creates a Reader from scratch, with a norm name which identifies a Controller More... | |
| XSControl_Reader (const Handle< XSControl_WorkSession > &WS, const Standard_Boolean scratch=Standard_True) | |
| Creates a Reader from an already existing Session, with a Controller already set //! Virtual destructor More... | |
| virtual | ~XSControl_Reader () |
| Standard_Boolean | SetNorm (const Standard_CString norm) |
| Sets a specific norm to <me> Returns True if done, False if <norm> is not available More... | |
| void | SetWS (const Handle< XSControl_WorkSession > &WS, const Standard_Boolean scratch=Standard_True) |
| Sets a specific session to <me> More... | |
| Handle_XSControl_WorkSession | WS () const |
| Returns the session used in <me> More... | |
| IFSelect_ReturnStatus | ReadFile (const Standard_CString filename) |
| Loads a file and returns the read status Zero for a Model which compies with the Controller More... | |
| Handle_Interface_InterfaceModel | Model () const |
| Returns the model. It can then be consulted (header, product) More... | |
| Handle_TColStd_HSequenceOfTransient | GiveList (const Standard_CString first="", const Standard_CString second="") |
Returns a list of entities from the IGES or STEP file <br> according to the following rules: | |
| Handle_TColStd_HSequenceOfTransient | GiveList (const Standard_CString first, const Handle< Standard_Transient > &ent) |
| Computes a List of entities from the model as follows <first> beeing a Selection, <ent> beeing an entity or a list of entities (as a HSequenceOfTransient) : the standard result of this selection applied to this list if <first> is erroneous, a null handle is returned More... | |
| virtual Standard_Integer | NbRootsForTransfer () |
| Determines the list of root entities which are candidate for a transfer to a Shape, and returns the number of entities in the list More... | |
| Handle_Standard_Transient | RootForTransfer (const Standard_Integer num=1) |
| Returns an IGES or STEP root entity for translation. The entity is identified by its rank in a list. More... | |
| Standard_Boolean | TransferOneRoot (const Standard_Integer num=1) |
| Translates a root identified by the rank num in the model. false is returned if no shape is produced. More... | |
| Standard_Boolean | TransferOne (const Standard_Integer num) |
| Translates an IGES or STEP entity identified by the rank num in the model. false is returned if no shape is produced. More... | |
| Standard_Boolean | TransferEntity (const Handle< Standard_Transient > &start) |
| Translates an IGES or STEP entity in the model. true is returned if a shape is produced; otherwise, false is returned. More... | |
| Standard_Integer | TransferList (const Handle< TColStd_HSequenceOfTransient > &list) |
| Translates a list of entities. Returns the number of IGES or STEP entities that were successfully translated. The list can be produced with GiveList. Warning - This function does not clear the existing output shapes. More... | |
| Standard_Integer | TransferRoots () |
| Translates all translatable roots and returns the number of successful translations. Warning - This function clears existing output shapes first. More... | |
| void | ClearShapes () |
| Clears the list of shapes that may have accumulated in calls to TransferOne or TransferRoot.C More... | |
| Standard_Integer | NbShapes () const |
| Returns the number of shapes produced by translation. More... | |
| TopoDS_Shape | Shape (const Standard_Integer num=1) const |
Returns the shape resulting <br> from a translation and identified by the rank num. | |
| TopoDS_Shape | OneShape () const |
Returns all of the results in <br> a single shape which is: | |
| void | PrintCheckLoad (const Standard_Boolean failsonly, const IFSelect_PrintCount mode) const |
| Prints the check list attached to loaded data, on the Standard Trace File (starts at cout) All messages or fails only, according to <failsonly> mode = 0 : per entity, prints messages mode = 1 : per message, just gives count of entities per check mode = 2 : also gives entity numbers More... | |
| void | PrintCheckTransfer (const Standard_Boolean failsonly, const IFSelect_PrintCount mode) const |
Displays check results for the <br> last translation of IGES or STEP entities to Open CASCADE | |
| void | PrintStatsTransfer (const Standard_Integer what, const Standard_Integer mode=0) const |
Displays the statistics for <br> the last translation. what defines the kind of | |
| void | GetStatsTransfer (const Handle< TColStd_HSequenceOfTransient > &list, Standard_Integer &nbMapped, Standard_Integer &nbWithResult, Standard_Integer &nbWithFail) const |
| Gives statistics about Transfer More... | |
Protected Member Functions | |
| TopTools_SequenceOfShape & | Shapes () |
| Returns a sequence of produced shapes More... | |
Protected Attributes | |
| Standard_Boolean | therootsta |
| TColStd_SequenceOfTransient | theroots |
A groundwork to convert a shape to data which complies
with a particular norm. This data can be that of a whole
model or that of a specific list of entities in the model.
You specify the list using a single selection or a
combination of selections. A selection is an operator which
computes a list of entities from a list given in input. To
specify the input, you can use:
| XSControl_Reader::XSControl_Reader | ( | ) |
Creates a Reader from scratch (creates an empty WorkSession)
A WorkSession or a Controller must be provided before running
| XSControl_Reader::XSControl_Reader | ( | const Standard_CString | norm | ) |
Creates a Reader from scratch, with a norm name which
identifies a Controller
| XSControl_Reader::XSControl_Reader | ( | const Handle< XSControl_WorkSession > & | WS, |
| const Standard_Boolean | scratch = Standard_True |
||
| ) |
Creates a Reader from an already existing Session, with a
Controller already set
//! Virtual destructor
|
inlinevirtual |
| void XSControl_Reader::ClearShapes | ( | ) |
Clears the list of shapes that
may have accumulated in calls to TransferOne or TransferRoot.C
| void XSControl_Reader::GetStatsTransfer | ( | const Handle< TColStd_HSequenceOfTransient > & | list, |
| Standard_Integer & | nbMapped, | ||
| Standard_Integer & | nbWithResult, | ||
| Standard_Integer & | nbWithFail | ||
| ) | const |
Gives statistics about Transfer
| Handle_TColStd_HSequenceOfTransient XSControl_Reader::GiveList | ( | const Standard_CString | first = "", |
| const Standard_CString | second = "" |
||
| ) |
Returns a list of entities from the IGES or STEP file <br>
according to the following rules:
| Handle_TColStd_HSequenceOfTransient XSControl_Reader::GiveList | ( | const Standard_CString | first, |
| const Handle< Standard_Transient > & | ent | ||
| ) |
Computes a List of entities from the model as follows
<first> beeing a Selection, <ent> beeing an entity or a list
of entities (as a HSequenceOfTransient) :
the standard result of this selection applied to this list
if <first> is erroneous, a null handle is returned
| Handle_Interface_InterfaceModel XSControl_Reader::Model | ( | ) | const |
Returns the model. It can then be consulted (header, product)
|
virtual |
Determines the list of root entities which are candidate for
a transfer to a Shape, and returns the number
of entities in the list
Reimplemented in STEPControl_Reader, and IGESControl_Reader.
| Standard_Integer XSControl_Reader::NbShapes | ( | ) | const |
Returns the number of shapes produced by translation.
| TopoDS_Shape XSControl_Reader::OneShape | ( | ) | const |
Returns all of the results in <br>
a single shape which is:
| void XSControl_Reader::PrintCheckLoad | ( | const Standard_Boolean | failsonly, |
| const IFSelect_PrintCount | mode | ||
| ) | const |
Prints the check list attached to loaded data, on the Standard
Trace File (starts at cout)
All messages or fails only, according to <failsonly>
mode = 0 : per entity, prints messages
mode = 1 : per message, just gives count of entities per check
mode = 2 : also gives entity numbers
| void XSControl_Reader::PrintCheckTransfer | ( | const Standard_Boolean | failsonly, |
| const IFSelect_PrintCount | mode | ||
| ) | const |
Displays check results for the <br>
last translation of IGES or STEP entities to Open CASCADE
entities. Only fail messages are displayed if failsonly is
true. All messages are displayed if failsonly is
false. mode determines the contents and the order of the
messages according to the terms of the IFSelect_PrintCount enumeration.
| void XSControl_Reader::PrintStatsTransfer | ( | const Standard_Integer | what, |
| const Standard_Integer | mode = 0 |
||
| ) | const |
Displays the statistics for <br>
the last translation. what defines the kind of
statistics that are displayed as follows:
| IFSelect_ReturnStatus XSControl_Reader::ReadFile | ( | const Standard_CString | filename | ) |
Loads a file and returns the read status
Zero for a Model which compies with the Controller
| Handle_Standard_Transient XSControl_Reader::RootForTransfer | ( | const Standard_Integer | num = 1 | ) |
Returns an IGES or STEP root
entity for translation. The entity is identified by its
rank in a list.
| Standard_Boolean XSControl_Reader::SetNorm | ( | const Standard_CString | norm | ) |
Sets a specific norm to <me>
Returns True if done, False if <norm> is not available
| void XSControl_Reader::SetWS | ( | const Handle< XSControl_WorkSession > & | WS, |
| const Standard_Boolean | scratch = Standard_True |
||
| ) |
Sets a specific session to <me>
| TopoDS_Shape XSControl_Reader::Shape | ( | const Standard_Integer | num = 1 | ) | const |
Returns the shape resulting <br>
from a translation and identified by the rank num.
num equals 1 by default. In other words, the first shape
resulting from the translation is returned.
|
protected |
Returns a sequence of produced shapes
| Standard_Boolean XSControl_Reader::TransferEntity | ( | const Handle< Standard_Transient > & | start | ) |
Translates an IGES or STEP
entity in the model. true is returned if a shape is
produced; otherwise, false is returned.
| Standard_Integer XSControl_Reader::TransferList | ( | const Handle< TColStd_HSequenceOfTransient > & | list | ) |
Translates a list of entities.
Returns the number of IGES or STEP entities that were
successfully translated. The list can be produced with GiveList.
Warning - This function does not clear the existing output shapes.
| Standard_Boolean XSControl_Reader::TransferOne | ( | const Standard_Integer | num | ) |
Translates an IGES or STEP
entity identified by the rank num in the model.
false is returned if no shape is produced.
| Standard_Boolean XSControl_Reader::TransferOneRoot | ( | const Standard_Integer | num = 1 | ) |
Translates a root identified by the rank num in the model.
false is returned if no shape is produced.
| Standard_Integer XSControl_Reader::TransferRoots | ( | ) |
Translates all translatable
roots and returns the number of successful translations.
Warning - This function clears existing output shapes first.
| Handle_XSControl_WorkSession XSControl_Reader::WS | ( | ) | const |
Returns the session used in <me>
|
protected |
|
protected |
1.8.5