mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-22 02:25:37 +05:00
0020012: EDF 831 GEOM : API for points representation in 3D viewer
This commit is contained in:
parent
e5173e644b
commit
a9632ce4b6
@ -29,7 +29,7 @@ CREATE_SUBDIRS = NO
|
|||||||
OUTPUT_LANGUAGE = English
|
OUTPUT_LANGUAGE = English
|
||||||
USE_WINDOWS_ENCODING = NO
|
USE_WINDOWS_ENCODING = NO
|
||||||
BRIEF_MEMBER_DESC = YES
|
BRIEF_MEMBER_DESC = YES
|
||||||
REPEAT_BRIEF = NO
|
REPEAT_BRIEF = YES
|
||||||
ALWAYS_DETAILED_SEC = YES
|
ALWAYS_DETAILED_SEC = YES
|
||||||
INLINE_INHERITED_MEMB = YES
|
INLINE_INHERITED_MEMB = YES
|
||||||
FULL_PATH_NAMES = NO
|
FULL_PATH_NAMES = NO
|
||||||
|
@ -38,5 +38,5 @@ for k in dir(geom):
|
|||||||
if k[0] == '_':continue
|
if k[0] == '_':continue
|
||||||
globals()[k]=getattr(geom,k)
|
globals()[k]=getattr(geom,k)
|
||||||
del k
|
del k
|
||||||
from geompyDC import ShapeType,GEOM,kind, info
|
from geompyDC import ShapeType,GEOM,kind, info, PackData, ReadTexture
|
||||||
|
|
||||||
|
@ -170,12 +170,14 @@ def ParseSketcherCommand(command):
|
|||||||
|
|
||||||
## Helper function which can be used to pack the passed string to the byte data.
|
## Helper function which can be used to pack the passed string to the byte data.
|
||||||
## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
|
## Only '1' an '0' symbols are valid for the string. The missing bits are replaced by zeroes.
|
||||||
## If the string contains invalid symbol (neither '1' not '0'), the function raises an exception.
|
## If the string contains invalid symbol (neither '1' nor '0'), the function raises an exception.
|
||||||
## For example,
|
## For example,
|
||||||
## \code
|
## \code
|
||||||
## val = PackData("10001110") # val = 0xAE
|
## val = PackData("10001110") # val = 0xAE
|
||||||
## val = PackData("1") # val = 0x80
|
## val = PackData("1") # val = 0x80
|
||||||
## \endcode
|
## \endcode
|
||||||
|
## @param data unpacked data - a string containing '1' and '0' symbols
|
||||||
|
## @return data packed to the byte stream
|
||||||
## @ingroup l1_geompy_auxiliary
|
## @ingroup l1_geompy_auxiliary
|
||||||
def PackData(data):
|
def PackData(data):
|
||||||
bytes = len(data)/8
|
bytes = len(data)/8
|
||||||
@ -212,6 +214,8 @@ def PackData(data):
|
|||||||
## texture = geompy.AddTexture(*texture)
|
## texture = geompy.AddTexture(*texture)
|
||||||
## obj.SetMarkerTexture(texture)
|
## obj.SetMarkerTexture(texture)
|
||||||
## \endcode
|
## \endcode
|
||||||
|
## @param fname texture file name
|
||||||
|
## @return sequence of tree values: texture's width, height in pixels and its byte stream
|
||||||
## @ingroup l1_geompy_auxiliary
|
## @ingroup l1_geompy_auxiliary
|
||||||
def ReadTexture(fname):
|
def ReadTexture(fname):
|
||||||
try:
|
try:
|
||||||
@ -3957,6 +3961,8 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
## Load marker texture from the file
|
## Load marker texture from the file
|
||||||
|
# @param Path a path to the texture file
|
||||||
|
# @return unique texture identifier
|
||||||
# @ingroup l1_geompy_auxiliary
|
# @ingroup l1_geompy_auxiliary
|
||||||
def LoadTexture(self, Path):
|
def LoadTexture(self, Path):
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
@ -3964,12 +3970,17 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
RaiseIfFailed("LoadTexture", self.InsertOp)
|
RaiseIfFailed("LoadTexture", self.InsertOp)
|
||||||
return ID
|
return ID
|
||||||
|
|
||||||
## Add marker texture. \a Width and \a Height parameters
|
## Add marker texture. @a Width and @a Height parameters
|
||||||
# specify width and height of the texture in pixels.
|
# specify width and height of the texture in pixels.
|
||||||
# If \a RowData is True, \a Texture parameter should represent texture data
|
# If @a RowData is @c True, @a Texture parameter should represent texture data
|
||||||
# packed into the byte array. If \a RowData is False (default), \a Texture
|
# packed into the byte array. If @a RowData is @c False (default), @a Texture
|
||||||
# parameter should be unpacked string, in which '1' symbols represent opaque
|
# parameter should be unpacked string, in which '1' symbols represent opaque
|
||||||
# pixels and '0' represent transparent pixels of the texture bitmap.
|
# pixels and '0' represent transparent pixels of the texture bitmap.
|
||||||
|
#
|
||||||
|
# @param Width texture width in pixels
|
||||||
|
# @param Height texture height in pixels
|
||||||
|
# @param Texture texture data
|
||||||
|
# @param RowData if @c True, @a Texture data are packed in the byte stream
|
||||||
# @ingroup l1_geompy_auxiliary
|
# @ingroup l1_geompy_auxiliary
|
||||||
def AddTexture(self, Width, Height, Texture, RowData=False):
|
def AddTexture(self, Width, Height, Texture, RowData=False):
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
|
Loading…
Reference in New Issue
Block a user