mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-03-17 08:30:11 +05:00
"Dump Python". Same modifications as have been done in geompy.py
This commit is contained in:
parent
1c8a9815d0
commit
0b1f9bb3a1
@ -36,8 +36,32 @@ while step < 50 and g == None:
|
|||||||
step = step + 1
|
step = step + 1
|
||||||
time.sleep(4)
|
time.sleep(4)
|
||||||
geom = g._narrow( GEOM.GEOM_Gen )
|
geom = g._narrow( GEOM.GEOM_Gen )
|
||||||
myBuilder = myStudy.NewBuilder()
|
|
||||||
|
|
||||||
|
myBuilder = None
|
||||||
|
myStudyId = 0
|
||||||
|
father = None
|
||||||
|
|
||||||
|
BasicOp = None
|
||||||
|
CurvesOp = None
|
||||||
|
PrimOp = None
|
||||||
|
ShapesOp = None
|
||||||
|
HealOp = None
|
||||||
|
InsertOp = None
|
||||||
|
BoolOp = None
|
||||||
|
TrsfOp = None
|
||||||
|
LocalOp = None
|
||||||
|
MeasuOp = None
|
||||||
|
BlocksOp = None
|
||||||
|
GroupOp = None
|
||||||
|
|
||||||
|
def init_geom(theStudy):
|
||||||
|
|
||||||
|
global myStudy, myBuilder, myStudyId, BasicOp, CurvesOp, PrimOp, ShapesOp, HealOp
|
||||||
|
global InsertOp, BoolOp, TrsfOp, LocalOp, MeasuOp, BlocksOp, GroupOp, father
|
||||||
|
|
||||||
|
myStudy = theStudy
|
||||||
|
myStudyId = myStudy._get_StudyId()
|
||||||
|
myBuilder = myStudy.NewBuilder()
|
||||||
father = myStudy.FindComponent("GEOM")
|
father = myStudy.FindComponent("GEOM")
|
||||||
if father is None:
|
if father is None:
|
||||||
father = myBuilder.NewComponent("GEOM")
|
father = myBuilder.NewComponent("GEOM")
|
||||||
@ -48,6 +72,27 @@ if father is None:
|
|||||||
aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
|
aPixmap = A2._narrow(SALOMEDS.AttributePixMap)
|
||||||
aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
|
aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry")
|
||||||
myBuilder.DefineComponentInstance(father,geom)
|
myBuilder.DefineComponentInstance(father,geom)
|
||||||
|
pass
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Assign Operations Interfaces
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
BasicOp = geom.GetIBasicOperations (myStudyId)
|
||||||
|
CurvesOp = geom.GetICurvesOperations (myStudyId)
|
||||||
|
PrimOp = geom.GetI3DPrimOperations (myStudyId)
|
||||||
|
ShapesOp = geom.GetIShapesOperations (myStudyId)
|
||||||
|
HealOp = geom.GetIHealingOperations (myStudyId)
|
||||||
|
InsertOp = geom.GetIInsertOperations (myStudyId)
|
||||||
|
BoolOp = geom.GetIBooleanOperations (myStudyId)
|
||||||
|
TrsfOp = geom.GetITransformOperations(myStudyId)
|
||||||
|
LocalOp = geom.GetILocalOperations (myStudyId)
|
||||||
|
MeasuOp = geom.GetIMeasureOperations (myStudyId)
|
||||||
|
BlocksOp = geom.GetIBlocksOperations (myStudyId)
|
||||||
|
GroupOp = geom.GetIGroupOperations (myStudyId)
|
||||||
|
pass
|
||||||
|
|
||||||
|
init_geom(myStudy)
|
||||||
|
|
||||||
# * Get name for sub-shape aSubObj of shape aMainObj
|
# * Get name for sub-shape aSubObj of shape aMainObj
|
||||||
#
|
#
|
||||||
@ -82,23 +127,6 @@ def addToStudyInFather(aFather, aShape, aName):
|
|||||||
|
|
||||||
ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
|
ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8}
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Get Operations Interfaces
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
BasicOp = geom.GetIBasicOperations (myStudyId)
|
|
||||||
CurvesOp = geom.GetICurvesOperations (myStudyId)
|
|
||||||
PrimOp = geom.GetI3DPrimOperations (myStudyId)
|
|
||||||
ShapesOp = geom.GetIShapesOperations (myStudyId)
|
|
||||||
HealOp = geom.GetIHealingOperations (myStudyId)
|
|
||||||
InsertOp = geom.GetIInsertOperations (myStudyId)
|
|
||||||
BoolOp = geom.GetIBooleanOperations (myStudyId)
|
|
||||||
TrsfOp = geom.GetITransformOperations(myStudyId)
|
|
||||||
LocalOp = geom.GetILocalOperations (myStudyId)
|
|
||||||
MeasuOp = geom.GetIMeasureOperations (myStudyId)
|
|
||||||
BlocksOp = geom.GetIBlocksOperations (myStudyId)
|
|
||||||
GroupOp = geom.GetIGroupOperations (myStudyId)
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Basic primitives
|
# Basic primitives
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user