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.
14 Pass all args to Part __init__ function.
16 feature = partset.addFeature("Part")
19 def duplicatePart(part):
20 """Create a copy of the Part."""
21 feature = part.addFeature("Duplicate")
26 """Remove the Part."""
27 feature = part.addFeature("Remove")
31 class Part(Interface):
33 def __init__(self, feature):
34 """Adds a new Part to the given Partset and activates the Part."""
35 Interface.__init__(self, feature)
36 assert(self._feature.getKind() == "Part")
40 """Returns the Part document created by this feature."""
41 result_part = ModelAPI.modelAPI_ResultPart(self._feature.firstResult())
42 return result_part.partDoc()