Version: 6.5.0
Home
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions
GEOM::GEOM_IInsertOperations Interface Reference

Interface for shape insert operations (like copy, import). More...

import "GEOM_Gen.idl";

Public Member Functions

GEOM_Object MakeCopy (in GEOM_Object theOriginal)
 Create a copy of the given object.
void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName)
 Export the given shape into a file with given name.
GEOM_Object ImportFile (in string theFileName, in string theFormatName)
 Import a shape from the BRep or IGES or STEP file (depends on given format) with given name.
void ImportTranslators (out string_array theFormats, out string_array thePatterns)
 Get the supported import formats and corresponding patterns for File dialog.
void ExportTranslators (out string_array theFormats, out string_array thePatterns)
 Get the supported export formats and corresponding patterns for File dialog.
long LoadTexture (in string theTextureFile)
 Load texture from file.
long AddTexture (in long theWidth, in long theHeight, in SALOMEDS::TMPFile theTexture)
 Add texture to the study.
SALOMEDS::TMPFile GetTexture (in long theID, out long theWidth, out long theHeight)
 Get previously loaded texture data.
ListOfLong GetAllTextures ()
 Get list of all avaiable texture IDs.
boolean IsDone ()
 To know, if the operation was successfully performed.
void SetErrorCode (in string theErrorID)
 Set the operation error code.
string GetErrorCode ()
 Get the operation error code.
long GetStudyID ()
 Get ID of study, where the operation is defined.
void StartOperation ()
 Opens a new transaction.
void FinishOperation ()
 Closes the previously opened trasaction.
void AbortOperation ()
 Aborts the previously opened transaction.

Detailed Description

Interface for shape insert operations (like copy, import).

Member Function Documentation

GEOM_Object GEOM::GEOM_IInsertOperations::MakeCopy ( in GEOM_Object  theOriginal)

Create a copy of the given object.

void GEOM::GEOM_IInsertOperations::Export ( in GEOM_Object  theObject,
in string  theFileName,
in string  theFormatName 
)

Export the given shape into a file with given name.

Parameters
theObjectShape to be stored in the file.
theFileNameName of the file to store the given shape in.
theFormatNameSpecify format for the shape storage. Available formats can be obtained with ImportTranslators() method.
GEOM_Object GEOM::GEOM_IInsertOperations::ImportFile ( in string  theFileName,
in string  theFormatName 
)

Import a shape from the BRep or IGES or STEP file (depends on given format) with given name.

Parameters
theFileNameThe file, containing the shape.
theFormatNameSpecify format for the file reading. Available formats can be obtained with ImportTranslators() method. If format 'IGES_SCALE' is used instead 'IGES' length unit will be set to 'meter' and result model will be scaled.
Returns
New GEOM_Object, containing the imported shape.
void GEOM::GEOM_IInsertOperations::ImportTranslators ( out string_array  theFormats,
out string_array  thePatterns 
)

Get the supported import formats and corresponding patterns for File dialog.

Parameters
theFormatsOutput. List of formats, available for import.
thePatternsOutput. List of file patterns, corresponding to available formats.
Returns
Returns available formats and patterns through the arguments.
void GEOM::GEOM_IInsertOperations::ExportTranslators ( out string_array  theFormats,
out string_array  thePatterns 
)

Get the supported export formats and corresponding patterns for File dialog.

Parameters
theFormatsOutput. List of formats, available for export.
thePatternsOutput. List of file patterns, corresponding to available formats.
Returns
Returns available formats and patterns through the arguments.
long GEOM::GEOM_IInsertOperations::LoadTexture ( in string  theTextureFile)

Load texture from file.

Parameters
theTextureFiletexture file name
Returns
unique texture identifier
long GEOM::GEOM_IInsertOperations::AddTexture ( in long  theWidth,
in long  theHeight,
in SALOMEDS::TMPFile  theTexture 
)

Add texture to the study.

Parameters
theWidthtexture width in pixels
theHeighttexture height in pixels
theTexturetexture byte array
Returns
unique texture identifier
SALOMEDS::TMPFile GEOM::GEOM_IInsertOperations::GetTexture ( in long  theID,
out long  theWidth,
out long  theHeight 
)

Get previously loaded texture data.

Parameters
theIDtexture identifier
theWidthtexture width in pixels
theHeighttexture height in pixels
Returns
texture byte array
ListOfLong GEOM::GEOM_IInsertOperations::GetAllTextures ( )

Get list of all avaiable texture IDs.

Returns
list of all texture IDs avaiable for the current study
boolean GEOM::GEOM_IOperations::IsDone ( )
inherited

To know, if the operation was successfully performed.

void GEOM::GEOM_IOperations::SetErrorCode ( in string  theErrorID)
inherited

Set the operation error code.

Parameters
theErrorIDis a string describing the error occured
Note
This method is supposed to be used only by interfaces inheriting from IOperations.
string GEOM::GEOM_IOperations::GetErrorCode ( )
inherited

Get the operation error code.

long GEOM::GEOM_IOperations::GetStudyID ( )
inherited

Get ID of study, where the operation is defined.

void GEOM::GEOM_IOperations::StartOperation ( )
inherited

Opens a new transaction.

void GEOM::GEOM_IOperations::FinishOperation ( )
inherited

Closes the previously opened trasaction.

void GEOM::GEOM_IOperations::AbortOperation ( )
inherited

Aborts the previously opened transaction.

Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS