Version: 8.3.0
Home
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
GEOM_IInsertOperations Interface Reference

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

import "GEOM_Gen.idl";

Data Structures

struct  TransferDatum
 Non-topological information transfer datum. More...
 

Public Types

typedef sequence< TransferDatumListOfTransferDatum
 Sequence of non-topological information tranfer data. More...
 

Public Member Functions

GEOM_Object MakeCopy (in GEOM_Object theOriginal)
 Create a copy of the given object. More...
 
void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName)
 Deprecated method. Use Export<FormatName> (from the corresponding plugin) instead; here <FormatName> is a name of format. More...
 
ListOfGBO ImportFile (in string theFileName, in string theFormatName)
 Deprecated method. Use Import<FormatName> (from the corresponding plugin) instead; here <FormatName> is a name of format. More...
 
string ReadValue (in string theFileName, in string theFormatName, in string theParameterName)
 Deprecated method. Use ReadValue (from the corresponding plugin) instead. More...
 
GEOM_Object RestoreShape (in SALOMEDS::TMPFile theStream)
 Read a shape from the binary stream, containing its bounding representation (BRep). More...
 
long LoadTexture (in string theTextureFile)
 Load texture from file. More...
 
long AddTexture (in long theWidth, in long theHeight, in SALOMEDS::TMPFile theTexture)
 Add texture to the study. More...
 
SALOMEDS::TMPFile GetTexture (in long theID, out long theWidth, out long theHeight)
 Get previously loaded texture data. More...
 
ListOfLong GetAllTextures ()
 Get list of all avaiable texture IDs. More...
 
boolean TransferData (in GEOM_Object theObjectFrom, in GEOM_Object theObjectTo, in find_shape_method theFindMethod, out ListOfTransferDatum theResult)
 Transfer non-topological data from one object to another. More...
 
boolean IsDone ()
 To know, if the operation was successfully performed. More...
 
void SetErrorCode (in string theErrorID)
 Set the operation error code. More...
 
string GetErrorCode ()
 Get the operation error code. More...
 
long GetStudyID ()
 Get ID of study, where the operation is defined. More...
 
void StartOperation ()
 Opens a new transaction. More...
 
void FinishOperation ()
 Closes the previously opened trasaction. More...
 
void AbortOperation ()
 Aborts the previously opened transaction. More...
 

Detailed Description

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

Member Typedef Documentation

Sequence of non-topological information tranfer data.

Member Function Documentation

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 
)

Deprecated method. Use Export<FormatName> (from the corresponding plugin) instead; here <FormatName> is a name of format.

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.
ListOfGBO ImportFile ( in string  theFileName,
in string  theFormatName 
)

Deprecated method. Use Import<FormatName> (from the corresponding plugin) instead; here <FormatName> is a name of format.

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

Parameters
theFileNameThe file, containing the shape.
theFormatNameSpecify format for the file reading. If format 'IGES_SCALE' is used instead of 'IGES' or format 'STEP_SCALE' is used instead of 'STEP', file length unit will be ignored (set to 'meter') and result model will be scaled.
Returns
List of GEOM_Object, containing the created shape and groups of materials.
string ReadValue ( in string  theFileName,
in string  theFormatName,
in string  theParameterName 
)

Deprecated method. Use ReadValue (from the corresponding plugin) instead.

Read a value of parameter from a file, containing a shape.

Parameters
theFileNameThe file, containing the shape.
theFormatNameSpecify format for the file reading.
theParameterNameSpecify the parameter. For example, pass "LEN_UNITS" to obtain length units, in which the file is written.
Returns
Value of requested parameter in form of text string.
GEOM_Object RestoreShape ( in SALOMEDS::TMPFile  theStream)

Read a shape from the binary stream, containing its bounding representation (BRep).

Note
GEOM_Object::GetShapeStream() method can be used to obtain the shape's BRep stream.
Parameters
theStreamThe BRep binary stream.
Returns
New GEOM_Object, containing the shape, read from theStream.
long LoadTexture ( in string  theTextureFile)

Load texture from file.

Parameters
theTextureFiletexture file name
Returns
unique texture identifier
long 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 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 GetAllTextures ( )

Get list of all avaiable texture IDs.

Returns
list of all texture IDs avaiable for the current study
boolean TransferData ( in GEOM_Object  theObjectFrom,
in GEOM_Object  theObjectTo,
in find_shape_method  theFindMethod,
out ListOfTransferDatum  theResult 
)

Transfer non-topological data from one object to another.

Parameters
theObjectFromthe source object of non-topological data
theObjectTothe destination object of non-topological data
theFindMethodmethod to search sub-shapes of theObjectFrom in shape theObjectTo. Possible values are: GEOM::FSM_GetInPlace, GEOM::FSM_GetInPlaceByHistory and GEOM::FSM_GetInPlace_Old. Other values of GEOM::find_shape_method are not supported.
theResultstatistics of the operation. Output parameter. It represents a sequence of Transfer Datum. A datum has the type (string code), the total number of items of this type and the number of transfered items.
Returns
true in case of success; otherwise false.
boolean IsDone ( )
inherited

To know, if the operation was successfully performed.

void 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 GetErrorCode ( )
inherited

Get the operation error code.

long GetStudyID ( )
inherited

Get ID of study, where the operation is defined.

void StartOperation ( )
inherited

Opens a new transaction.

void FinishOperation ( )
inherited

Closes the previously opened trasaction.

void AbortOperation ( )
inherited

Aborts the previously opened transaction.