Salome HOME
Construction of vertices/edges/faces on the base of sketch: clear list attribute...
[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   """Class for Part feature"""
11   
12   def __init__ (self, partset):
13     """Adds a new Part to the given Partset and activates the Part."""
14     ### Create the feature
15     self.my = partset.addFeature("Part")
16     self.my.execute()
17
18   def document (self):
19     """Returns the Part document created by this feature."""
20     #TODO: Get the document referenced by this feature
21     return modeler.activeDocument()