Salome HOME
Add construction plugin without tests.
[modules/shaper.git] / src / PythonAPI / model / 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 model     # 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._feature = partset.addFeature("Part")
14     self._feature.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 model.activeDocument()