|
def | RaiseIfFailed (Method_name, Operation) |
| Raise an Error, containing the Method_name, if Operation is Failed. More...
|
|
def | ParseParameters (*parameters) |
| Return list of variables value from salome notebook. More...
|
|
def | ParseList (list) |
| Return list of variables value from salome notebook. More...
|
|
def | ParseSketcherCommand (command) |
| Return list of variables value from salome notebook. More...
|
|
def | PackData (data) |
| Helper function which can be used to pack the passed string to the byte data. More...
|
|
def | ReadTexture (fname) |
| Read bitmap texture from the text file. More...
|
|
def | EnumToLong (theItem) |
| Returns a long value from enumeration type Can be used for CORBA enumerator types like GEOM.shape_type. More...
|
|
def | init_geom (self) |
|
def | GetPluginOperations (self, libraryName) |
|
def | DumpPython (self, theIsPublished=True, theIsMultiFile=True) |
| Dump component to the Python script This method overrides IDL function to allow default values for the parameters. More...
|
|
def | SubShapeName (self, aSubObj, aMainObj) |
| Get name for sub-shape aSubObj of shape aMainObj. More...
|
|
def | hideInStudy (self, obj) |
| Unpublish object in study. More...
|
|
def | MakeCopy (self, theOriginal, theName=None) |
| Create a copy of the given object. More...
|
|
def | addPath (self, Path) |
| Add Path to load python scripts from. More...
|
|
def | LoadTexture (self, Path) |
| Load marker texture from the file. More...
|
|
def | getObjectID (self, obj) |
| Get internal name of the object based on its study entry. More...
|
|
def | AddTexture (self, Width, Height, Texture, RowData=False) |
| Add marker texture. More...
|
|
def | TransferData (self, theObjectFrom, theObjectTo, theFindMethod=GEOM.FSM_GetInPlace) |
| Transfer not topological data from one GEOM object to another. More...
|
|
def geomBuilder.ReadTexture |
( |
|
fname | ) |
|
Read bitmap texture from the text file.
In that file, any non-zero symbol represents '1' opaque pixel of the bitmap. A zero symbol ('0') represents transparent pixel of the texture bitmap. The function returns width and height of the pixmap in pixels and byte stream representing texture bitmap itself.
This function can be used to read the texture to the byte stream in order to pass it to the AddTexture() function of geomBuilder class. For example,
from salome.geom import geomBuilder
texture = geompy.readtexture('mytexture.dat')
texture = geompy.AddTexture(*texture)
obj.SetMarkerTexture(texture)
def New(instance=None)
Create a new geomBuilder instance.The geomBuilder class provides the Python interface to GEOM operati...
Definition: tmp/geomBuilder.py:8755
- Parameters
-
- Returns
- sequence of tree values: texture's width, height in pixels and its byte stream
References geomBuilder.PackData().
def AddTexture |
( |
|
self, |
|
|
|
Width, |
|
|
|
Height, |
|
|
|
Texture, |
|
|
|
RowData = False |
|
) |
| |
Add marker texture.
Width and Height parameters specify width and height of the texture in pixels. If RowData is True
, Texture parameter should represent texture data packed into the byte array. If RowData is False
(default), Texture parameter should be unpacked string, in which '1' symbols represent opaque pixels and '0' represent transparent pixels of the texture bitmap.
- Parameters
-
Width | texture width in pixels |
Height | texture height in pixels |
Texture | texture data |
RowData | if True , Texture data are packed in the byte stream |
- Returns
- unique texture identifier
References geomBuilder.InsertOp, geomBuilder.PackData(), and geomBuilder.RaiseIfFailed().