Salome HOME
Implement all methods of GEOM_Object because they can be accidentally called from...
authoreap <eap@opencascade.com>
Fri, 8 May 2020 10:53:14 +0000 (13:53 +0300)
committereap <eap@opencascade.com>
Fri, 8 May 2020 10:53:14 +0000 (13:53 +0300)
src/PY/SHAPERSTUDY_Object.py
test/testBuilder.py

index 91bddef2c5ad833a73bb099d9c0720ace199697b..6324cecb748e5be04cdca6e503438f9522486ca5 100755 (executable)
@@ -330,6 +330,22 @@ class SHAPERSTUDY_Object(SHAPERSTUDY_ORB__POA.SHAPER_Object,
         if not self.data:
           self.data = StudyData_Swig.StudyData_Object()
         self.data.SetShapeByPointer(theShape)
+        return
+
+    ### unnecessary methods that can be accidentally called from any module
+    def GetTopologyType(self, *args): return GEOM.SHAPE
+    def GetMinShapeType(self, *args): return GEOM.SHAPE
+    def GetMaxShapeType(self, *args): return GEOM.SHAPE
+    def GetSubShapeName(self, *args): return ""
+    def SetColor(self, *args): return
+    def GetColor(self, *args): import SALOMEDS; return SALOMEDS.Color( 0,0,0 )
+    def SetAutoColor(self, *args): return 
+    def GetAutoColor(self, *args): return False
+    def SetMarkerStd(self, *args): return 
+    def SetMarkerTexture(self, *args): return 
+    def GetMarkerType(self, *args): return GEOM.MT_NONE
+    def GetMarkerSize(self, *args): return GEOM.MS_NONE
+    def GetMarkerTexture(self, *args): return 0
 
     pass
 
@@ -633,3 +649,4 @@ class SHAPER_BoolFieldStep(SHAPERSTUDY_ORB__POA.SHAPER_BoolFieldStep, SHAPER_Fie
         return aResult
 
     pass
+
index e0552df883998fc28f8eddcd1bf8c7eded4d5fa5..b13028edfbaa5be3fa6448f6240311cebcce1325 100644 (file)
@@ -35,7 +35,7 @@ anExportFeature = Part_1_doc.addFeature("PublishToStudy")
 model.end()
 
 
-face = salome.myStudy.FindObjectByPath("/ShaperStudy/Face_1_1").GetObject()
+face = salome.myStudy.FindObjectByPath("/ShaperResults/Face_1_1").GetObject()
 
 shaper = face.GetGen()
 print(shaper.ComponentDataType())
@@ -93,6 +93,24 @@ smeshBuilder.AssureGeomPublished( meshOnFace, ee[0] )
 #GetVertexByIndex()
 algo = meshOnFace.Segment()
 l = algo.ReversedEdgeIndices([(ee[0],vv[0])])
-    
+
+
+### unnecessary methods that can be accidentally called from any module
+import SALOMEDS
+face.GetTopologyType()
+face.GetMinShapeType()
+face.GetMaxShapeType()
+face.GetSubShapeName(1)
+face.SetColor(SALOMEDS.Color( 0,0,0 ))
+face.GetColor()
+face.SetAutoColor(0)
+face.GetAutoColor()
+face.SetMarkerStd(GEOM.MT_NONE, GEOM.MS_NONE)
+face.SetMarkerTexture(0)
+face.GetMarkerType()
+face.GetMarkerSize()
+face.GetMarkerTexture()
+
+
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser()