Functions | |
def | ImportFile |
Import a shape from the BREP, IGES, STEP or other file (depends on given format) with given name. More... | |
def | Import |
Deprecated analog of ImportFile() More... | |
def | RestoreShape |
Read a shape from the binary stream, containing its bounding representation (BRep). More... | |
def | Export |
Export the given shape into a file with given name. More... | |
def | ExportSTL |
Export the given shape into a file with given name in STL format. More... | |
def | ImportSTL |
Import a shape from the STL file. More... | |
def | ExportBREP |
Export the given shape into a file with given name in BREP format. More... | |
def | ImportBREP |
Import a shape from the BREP file. More... | |
def | ExportSTEP |
Export the given shape into a file with given name in STEP format. More... | |
def | GetSTEPUnit |
Return length unit from given STEP file. More... | |
def | ImportSTEP |
Import a shape from the STEP file with given name. More... | |
def | ExportIGES |
Export the given shape into a file with given name in IGES format. More... | |
def | GetIGESUnit |
Return length unit from given IGES file. More... | |
def | ImportIGES |
Import a shape from the IGES file with given name. More... | |
def | ExportXAO |
Export a shape to XAO format. More... | |
def | ImportXAO |
Import a shape from XAO format. More... | |
def | ExportVTK |
Export the given shape into a file with given name in VTK format. More... | |
def ImportFile | ( | self, | |
theFileName, | |||
theFormatName, | |||
theName = None |
|||
) |
Import a shape from the BREP, IGES, STEP or other file (depends on given format) with given name.
Note: this function is deprecated, it is kept for backward compatibility only Use Import<FormatName> instead, where <FormatName> is a name of desirable format to import.
theFileName | The file, containing the shape. |
theFormatName | Specify format for the file reading. Available formats can be obtained with InsertOp.ImportTranslators() method. If format 'IGES_SCALE' is used instead of 'IGES' or format 'STEP_SCALE' is used instead of 'STEP', length unit will be set to 'meter' and result model will be scaled. |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder._autoPublish(), geomBuilder.InsertOp, and geomBuilder.RaiseIfFailed().
def Import | ( | self, | |
theFileName, | |||
theFormatName, | |||
theName = None |
|||
) |
Deprecated analog of ImportFile()
References geomBuilder.ImportFile(), and geomBuilder.ManageTransactions().
def RestoreShape | ( | self, | |
theStream, | |||
theName = None |
|||
) |
Read a shape from the binary stream, containing its bounding representation (BRep).
theStream | The BRep binary stream. |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder._autoPublish(), geomBuilder.InsertOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().
def Export | ( | self, | |
theObject, | |||
theFileName, | |||
theFormatName | |||
) |
Export the given shape into a file with given name.
Note: this function is deprecated, it is kept for backward compatibility only Use Export<FormatName> instead, where <FormatName> is a name of desirable format to export.
theObject | Shape to be stored in the file. |
theFileName | Name of the file to store the given shape in. |
theFormatName | Specify format for the shape storage. Available formats can be obtained with geompy.InsertOp.ExportTranslators()[0] method. |
References geomBuilder.ManageTransactions().
def ExportSTL | ( | self, | |
theObject, | |||
theFileName, | |||
theIsASCII = True , |
|||
theDeflection = 0.001 , |
|||
theIsRelative = True |
|||
) |
Export the given shape into a file with given name in STL format.
theObject | Shape to be stored in the file. |
theFileName | Name of the file to store the given shape in. |
theIsASCII | The format of the exported file (ASCII or Binary) |
theDeflection | Deflection of the given shape. |
theIsRelative | If True (default value), the deflection is calculated relatively to the size of the shape; if False, the user defined deflection is used. |
References geomBuilder.GetSTLPluginOperations().
def ImportSTL | ( | self, | |
theFileName, | |||
theName = None |
|||
) |
Import a shape from the STL file.
theFileName | The file, containing the shape. |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder._autoPublish(), geomBuilder.GetSTLPluginOperations(), and geomBuilder.RaiseIfFailed().
def ExportBREP | ( | self, | |
theObject, | |||
theFileName | |||
) |
Export the given shape into a file with given name in BREP format.
theObject | Shape to be stored in the file. |
theFileName | Name of the file to store the given shape in. |
References geomBuilder.GetBREPPluginOperations().
def ImportBREP | ( | self, | |
theFileName, | |||
theName = None |
|||
) |
Import a shape from the BREP file.
theFileName | The file, containing the shape. |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder._autoPublish(), geomBuilder.GetBREPPluginOperations(), and geomBuilder.RaiseIfFailed().
def ExportSTEP | ( | self, | |
theObject, | |||
theFileName, | |||
theUnit = GEOM.LU_METER |
|||
) |
Export the given shape into a file with given name in STEP format.
theObject | Shape to be stored in the file. |
theFileName | Name of the file to store the given shape in. |
theUnit | the length unit (see GEOM::length_unit). In meters by default. |
References geomBuilder.GetSTEPPluginOperations().
def GetSTEPUnit | ( | self, | |
theFileName | |||
) |
Return length unit from given STEP file.
theFileName | The file, containing the shape. |
References geomBuilder.GetSTEPPluginOperations(), and geomBuilder.ImportSTEP().
def ImportSTEP | ( | self, | |
theFileName, | |||
theIsIgnoreUnits = False , |
|||
IsCreateAssemblies = False , |
|||
theName = None |
|||
) |
Import a shape from the STEP file with given name.
theFileName | The file, containing the shape. |
theIsIgnoreUnits | If True, file length units will be ignored (set to 'meter') and result model will be scaled, if its units are not meters. If False (default), file length units will be taken into account. |
IsCreateAssemblies | If True, for each assembly compound is created in the result. If False Compounds that contain a single shape are eliminated from the result. |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder._autoPublish(), geomBuilder.GetSTEPPluginOperations(), and geomBuilder.RaiseIfFailed().
def ExportIGES | ( | self, | |
theObject, | |||
theFileName, | |||
theVersion = "5.1" |
|||
) |
Export the given shape into a file with given name in IGES format.
theObject | Shape to be stored in the file. |
theFileName | Name of the file to store the given shape in. |
theVersion | Version of IGES format which defines, whether to write only faces (5.1 IGES format) or shells and solids also (5.3 IGES format). |
References geomBuilder.GetIGESPluginOperations().
def GetIGESUnit | ( | self, | |
theFileName | |||
) |
Return length unit from given IGES file.
theFileName | The file, containing the shape. |
References geomBuilder.GetIGESPluginOperations().
def ImportIGES | ( | self, | |
theFileName, | |||
theIsIgnoreUnits = False , |
|||
theName = None |
|||
) |
Import a shape from the IGES file with given name.
theFileName | The file, containing the shape. |
theIsIgnoreUnits | If True, file length units will be ignored (set to 'meter') and result model will be scaled, if its units are not meters. If False (default), file length units will be taken into account. |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder._autoPublish(), geomBuilder.GetIGESPluginOperations(), and geomBuilder.RaiseIfFailed().
def ExportXAO | ( | self, | |
shape, | |||
groups, | |||
fields, | |||
author, | |||
fileName, | |||
shapeFileName = "" |
|||
) |
Export a shape to XAO format.
shape | The shape to export |
groups | The list of groups to export |
fields | The list of fields to export |
author | The author of the file |
fileName | The name of the file to export |
shapeFileName | The name of the BRep file to export |
References geomBuilder.GetXAOPluginOperations(), and geomBuilder.RaiseIfFailed().
def ImportXAO | ( | self, | |
fileName, | |||
theName = None |
|||
) |
Import a shape from XAO format.
fileName | The name of the file to import |
theName | Object name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name. |
References geomBuilder._autoPublish(), geomBuilder.GetXAOPluginOperations(), and geomBuilder.RaiseIfFailed().
def ExportVTK | ( | self, | |
theObject, | |||
theFileName, | |||
theDeflection = 0.001 |
|||
) |
Export the given shape into a file with given name in VTK format.
theObject | Shape to be stored in the file. |
theFileName | Name of the file to store the given shape in. |
theDeflection | Deflection of the given shape. |
References geomBuilder.GetVTKPluginOperations().