Salome HOME
Synchronize displayed objects if Viewer was opened after displaying
[modules/shaper.git] / src / PythonAPI / modeler / part.py
1 """Part Feature Interface
2 Author: Daniel Brunier-Coulin
3 Copyright (C) 2014-20xx CEA/DEN, EDF R&D
4 """
5
6 import modeler     # Required by the temporary implementation of result member function
7
8
9 class Part():
10
11   def __init__ (self, partset):
12     """Adds a new Part to the given Partset and activates the Part."""
13     self.my = partset.addFeature("Part")
14     self.my.execute()
15
16   def document (self):
17     """Returns the Part document created by this feature."""
18     #TODO: Get the document referenced by this feature
19     return modeler.activeDocument()