OCC Main Page | DataExchange | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

# DataExchange
TKIGES
IGESControl

# IGESControl_Reader Class Reference

Reads IGES files, checks them and translates their contents into Open CASCADE models.
The IGES data can be that of a whole model or that of a specific list of entities in the model.
As in XSControl_Reader, you specify the list using a selection.
For translation of iges files it is possible to use the following sequence:
To change parameters of translation
class Interface_Static should be used before the beginning of translation
(see IGES Parameters and General Parameters)
Creation of reader
IGESControl_Reader reader;
To load a file in a model use method:
reader.ReadFile("filename.igs")
To check a loading file use method Check:
reader.Check(failsonly); where failsonly is equal to Standard_True or
Standard_False;
To print the results of load:
reader.PrintCheckLoad(failsonly,mode) where mode is equal to the value of
enumeration IFSelect_PrintCount
To transfer entities from a model the following methods can be used:
for the whole model
reader.TransferRoots(onlyvisible); where onlyvisible is equal to
Standard_True or Standard_False;
To transfer a list of entities:
reader.TransferList(list);
To transfer one entity
reader.TransferEntity(ent) or reader.Transfer(num);
To obtain a result the following method can be used:
reader.IsDone()
reader.NbShapes() and reader.Shape(num); or reader.OneShape();
To print the results of transfer use method:
reader.PrintTransferInfo(failwarn,mode); where printfail is equal to the
value of enumeration IFSelect_PrintFail, mode see above.
Gets correspondence between an IGES entity and a result shape obtained therefrom.
reader.TransientProcess();
TopoDS_Shape shape =
TransferBRep::ShapeResult(reader.TransientProcess(),ent);
.

`#include <IGESControl_Reader.hxx>`

Inheritance diagram for IGESControl_Reader:

[legend]

## Public Member Functions
void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT | IGESControl_Reader ()
| Creates a Reader from scratch .
Standard_EXPORT | IGESControl_Reader (const Handle(XSControl_WorkSession)&WS, const Standard_Boolean scratch=Standard_True)
| Creates a Reader from an already existing Session .
void | SetReadVisible (const Standard_Boolean ReadRoot)
| Set the transion of ALL Roots (if theReadOnlyVisible is False) or of Visible Roots (if theReadOnlyVisible is True) .
Standard_Boolean | GetReadVisible () const
Standard_EXPORT Handle_IGESData_IGESModel | IGESModel () const
| Returns the model as a IGESModel. It can then be consulted (header, product) .
virtual Standard_EXPORT Standard_Integer | NbRootsForTransfer ()
| Determines the list of root entities from Model which are candidate for a transfer to a Shape (type of entities is PRODUCT) <thereadonlyvisible> is taken into account to define roots .
Standard_EXPORT void | PrintTransferInfo (const IFSelect_PrintFail failwarn, const IFSelect_PrintCount mode) const
| Prints Statistics and check list for Transfer .
## Private Attributes
Standard_Boolean | theReadOnlyVisible

## Constructor & Destructor Documentation

Standard_EXPORT IGESControl_Reader::IGESControl_Reader | ( |  | ) |

Standard_EXPORT IGESControl_Reader::IGESControl_Reader | ( | const Handle(XSControl_WorkSession)& | WS,
|  | const Standard_Boolean | scratch = `Standard_True`
| ) |

## Member Function Documentation

Standard_Boolean IGESControl_Reader::GetReadVisible | ( |  | ) | const`[inline]`

Standard_EXPORT Handle_IGESData_IGESModel IGESControl_Reader::IGESModel | ( |  | ) | const

virtual Standard_EXPORT Standard_Integer IGESControl_Reader::NbRootsForTransfer | ( |  | ) | `[virtual]`

| Reimplemented from XSControl_Reader.

void IGESControl_Reader::operator delete | ( | void * | anAddress | ) | `[inline]`

| Reimplemented from XSControl_Reader. Reimplemented in IGESCAFControl_Reader.

void* IGESControl_Reader::operator new | ( | size_t | size | ) | `[inline]`

| Reimplemented from XSControl_Reader. Reimplemented in IGESCAFControl_Reader.

void* IGESControl_Reader::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

| Reimplemented from XSControl_Reader. Reimplemented in IGESCAFControl_Reader.

Standard_EXPORT void IGESControl_Reader::PrintTransferInfo | ( | const IFSelect_PrintFail | failwarn,
|  | const IFSelect_PrintCount | mode
| ) | const

void IGESControl_Reader::SetReadVisible | ( | const Standard_Boolean | ReadRoot | ) | `[inline]`

## Field Documentation

Standard_Boolean IGESControl_Reader::theReadOnlyVisible`[private]`

The documentation for this class was generated from the following files:

- IGESControl_Reader.hxx
- IGESControl_Reader.lxx