1 """Part Feature Interface
2 Author: Daniel Brunier-Coulin
3 Copyright (C) 2014-20xx CEA/DEN, EDF R&D
8 from model.roots import Interface
12 """Add a Part feature to the Part and return Part.
15 partset (ModelAPI_Document): partset document
20 feature = partset.addFeature("Part")
23 def duplicatePart(part):
24 """Create a copy of the Part.
27 part (ModelAPI_Document): part document
32 feature = part.addFeature("Duplicate")
40 part (ModelAPI_Document): part document
42 feature = part.addFeature("Remove")
46 class Part(Interface):
47 """Interface class for Part feature.
49 .. function:: Part(feature)
51 Create interface for the feature without initialization.
54 def __init__(self, feature):
55 """x.__init__(...) initializes x; see x.__class__.__doc__ for signature"""
56 Interface.__init__(self, feature)
57 assert(self._feature.getKind() == "Part")
63 """Returns the Part document created by this feature."""
64 result_part = ModelAPI.modelAPI_ResultPart(self._feature.firstResult())
65 return result_part.partDoc()