1 # Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
3 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License, or (at your option) any later version.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 import SHAPERSTUDY_ORB__POA
25 from SHAPERSTUDY_utils import getEngine
27 class SHAPERSTUDY_BaseObject(SHAPERSTUDY_ORB__POA.BaseObject):
29 Construct an instance of SHAPER_BaseObject.
31 def __init__ ( self, *args):
36 Get name of the object associated with this object.
42 Get internal (unique) entry of the object in the component's data tree.
48 Get internal type of operation created this object.
49 In SMESH is used to find out if an object is GROUP (type == 37)
55 Get value of a modification counter of the object
59 def GetStudyEntry( self ):
61 Get a Study entry where this object was published.
67 Return true if geom object representes a shape.
68 For example, method return false for GEOM_MARKER
72 def IsSame( self, other ):
74 Return true if passed object is identical to this object
80 Return the engine creating this object
88 class SHAPERSTUDY_Object(SHAPERSTUDY_ORB__POA.SHAPER_Object):
90 Construct an instance of SHAPERSTUDY Object.
92 def __init__ ( self, *args):
95 def GetShapeType( self ):
97 Get a GEOM.shape_type of the object value.
101 def IsMainShape( self ):
103 Returns True if this object is not a sub-shape of another object.
107 def GetSubShapeIndices( self ):
109 Get a list of ID's of sub-shapes in the main shape.
113 def GetMainShape( self ):
115 Get a main shape object to which this object is a sub-shape.
119 def getShape( self ):
121 Get the TopoDS_Shape, for colocated case only.
122 Called by GEOM_Client to get TopoDS_Shape pointer
126 def GetShapeStream( self ):
128 Get geometric shape of the object as a byte stream in BRep format
132 def SetShapeByStream(self, theStream):
134 Sets geometric shape content of the object as a byte stream in BRep format