IGESControl
OCCT package IGESControl: IGESControl_ActorWrite, IGESControl_AlgoContainer, IGESControl_Controller, IGESControl_IGESBoundary, and 3 more bound classes.
IGESControl_ActorWrite
Actor to write Shape to IGES.
Constructors(1)
Static methods(2)
- get_type_name(): string
Instance methods(3)
- Recognize(start: Transfer_Finder): boolean
Recognizes a ShapeMapper.
Parameters (1)start
- Transfer(start: Transfer_Finder, TP: Transfer_FinderProcess, theProgress?: Message_ProgressRange): Transfer_Binder
Transfers Shape to IGES Entities.
ModeTrans may be : 0 -> groups of Faces or 1 -> BRepParameters (3)startTPtheProgress
IGESControl_AlgoContainer
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(1)
IGESControl_Controller
Controller for IGES-5.1.
Constructors(1)
- constructor(modefnes?: boolean): IGESControl_Controller
Initializes the use of IGES Norm (the first time) and returns a Controller for IGES-5.1 If <modefnes> is True, sets it to internal FNES format.
Parameters (1)modefnes
Static methods(3)
- Init(): boolean
StandardInitialisation. It creates a Controller for IGES and records it to various names, available to select it later Returns True when done, False if could not be done Also, it creates and records an Adaptor for FNES. - get_type_name(): string
Instance methods(5)
Creates a new empty Model ready to receive data of the Norm. It is taken from IGES Template Model.
Returns the Actor for Read attached to the pair (norm,appli) It is an Actor from
IGESToBRep, adapted from an IGESModel : Unit, tolerances.Parameters (1)model
- TransferWriteShape(shape: TopoDS_Shape, FP: Transfer_FinderProcess, model: Interface_InterfaceModel, modetrans?: number, theProgress?: Message_ProgressRange): IFSelect_ReturnStatus
Takes one Shape and transfers it to the InterfaceModel (already created by NewModel for instance) <modetrans> is to be interpreted by each kind of XstepAdaptor Returns a status : 0 OK 1 No result 2 Fail -1 bad modeshape -2 bad model (requires an IGESModel) modeshape : 0 group of face (version < 5.1) 1 BREP-version 5.1 of IGES.
Parameters (5)shapeFPmodelmodetranstheProgress
- Customise(): { WS: XSControl_WorkSession; [Symbol.dispose](): void }
Customises a WorkSession, by adding to it the recorded items (by AddSessionItem).
ReturnsA result object with fields:
WS: owned by the returned envelope.
Dispose the returned envelope to release owned Handle fields.
IGESControl_IGESBoundary
Translates IGES boundary entity (types 141, 142 and 508) in Advanced Data Exchange. Redefines translation and treatment methods from inherited open class IGESToBRep_IGESBoundary.
Constructors(2)
Creates an object and calls inherited constructor.
Creates an object and calls inherited constructor.
Parameters (1)CS
Static methods(2)
- get_type_name(): string
Instance methods(2)
- Check(result: boolean, checkclosure: boolean, okCurve3d: boolean, okCurve2d: boolean): void
Checks result of translation of IGES boundary entities (types 141, 142 or 508). Checks consistency of 2D and 3D representations and keeps only one if they are inconsistent. Checks the closure of resulting wire and if it is not closed, checks 2D and 3D representation and updates the resulting wire to contain only closed representation.
Parameters (4)resultcheckclosureokCurve3dokCurve2d
IGESControl_Reader
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 true or 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 true or 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);.
Constructors(2)
Creates a Reader from scratch.
- constructor(WS: XSControl_WorkSession, scratch?: boolean): IGESControl_Reader
Creates a Reader from an already existing Session.
Parameters (2)WSscratch
Instance methods(4)
- GetReadVisible(): boolean
Returns the model as a IGESModel. It can then be consulted (header, product).
- NbRootsForTransfer(): number
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.
- PrintTransferInfo(failwarn: IFSelect_PrintFail, mode: IFSelect_PrintCount): void
Prints Statistics and check list for Transfer.
Parameters (2)failwarnmode
IGESControl_ToolContainer
Constructors(1)
Empty constructor.
Static methods(2)
- get_type_name(): string
Instance methods(2)
Returns
IGESControl_IGESBoundary.
IGESControl_Writer
This class creates and writes IGES files from CAS.CADE models. An IGES file can be written to an existing IGES file or to a new one. The translation can be performed in one or several operations. Each translation operation outputs a distinct root entity in the IGES file. To write an IGES file it is possible to use the following sequence: To modify the IGES file header or to change translation parameters it is necessary to use class Interface_Static (see IGESParameters and GeneralParameters).
Constructors(3)
Creates a writer object with the default unit (millimeters) and write mode (Face).
IGESControl_Writer(const char* const unit, const int modecr = 0);.- constructor(theUnit: string, theModecr?: number): IGESControl_Writer
Creates a writer with given values for units and for write mode. theUnit may be any unit that is accepted by the IGES standard. By default, it is the millimeter. theModecr defines the write mode and may be:
- 0: Faces (default)
- 1: BRep.
Parameters (2)theUnittheModecr
- constructor(theModel: IGESData_IGESModel, theModecr?: number): IGESControl_Writer
Creates a writer object with the prepared IGES model theModel in write mode. theModecr defines the write mode and may be:
- 0: Faces (default)
- 1: BRep.
Parameters (2)theModeltheModecr
Instance methods(11)
- SetTransferProcess(TP: Transfer_FinderProcess): void
Returns/Sets the TransferProcess : it contains final results and if some, check messages.
Parameters (1)TP
- AddShape(sh: TopoDS_Shape, theProgress?: Message_ProgressRange): boolean
Translates a Shape to IGES Entities and adds them to the model Returns True if done, False if Shape not suitable for IGES or null.
Parameters (2)shtheProgress
- AddGeom(geom: Standard_Transient): boolean
Translates a Geometry (Surface or Curve) to IGES Entities and adds them to the model Returns True if done, False if geom is neither a Surface or a Curve suitable for IGES or is null.
Parameters (1)geom
- AddEntity(ent: IGESData_IGESEntity): boolean
Adds an IGES entity (and the ones it references) to the model.
Parameters (1)ent
- ComputeModel(): void
Computes the entities found in the model, which is ready to be written. This contrasts with the default computation of headers only.
- Write(file: string, fnes: boolean): boolean
Computes then writes the model to an OStream Returns True when done, false in case of error.
Parameters (2)filefnes
- SetShapeFixParameters(theParameters: NCollection_DataMap_TCollection_AsciiString_TCollection_AsciiString): void
Sets parameters for shape processing.
Parameters (1)theParameters—the parameters for shape processing.
Returns parameters for shape processing that was set by SetParameters() method.
Returnsthe parameters for shape processing. Empty map if no parameters were set.
- SetShapeProcessFlags(theFlags: any): void
Sets flags defining operations to be performed on shapes.
Parameters (1)theFlags—The flags defining operations to be performed on shapes.
- GetShapeProcessFlags(): any
Returns flags defining operations to be performed on shapes.
ReturnsThe flags defining operations to be performed on shapes.