Pass all args to Import __init__ function.
"""
+ assert(args)
feature = part.addFeature("Import")
return Import(feature, *args)
Pass all args to Export __init__ function.
"""
+ assert(args)
feature = part.addFeature("Export")
return Export(feature, *args)
from model.roots import Interface
-def addAddition(part, object, tool):
+def addAddition(part, *args):
"""Inserts an addition to the given Part and executes the operation.
This operation adds tool to the given object.
"""
+ assert(args)
+ object, tool = args
feature = part.addFeature("Boolean")
return Boolean(feature, object, tool, GeomAlgoAPI_Boolean.BOOL_FUSE)
-def addSubtraction(part, object, tool):
+def addSubtraction(part, *args):
"""Inserts a subtraction to the given Part and executes the operation.
This operation subtracts tool to the given object.
"""
+ assert(args)
+ object, tool = args
feature = part.addFeature("Boolean")
return Boolean(feature, object, tool, GeomAlgoAPI_Boolean.BOOL_CUT)
-def addIntersection(part, object, tool):
+def addIntersection(part, *args):
"""Inserts an intersection to the given Part and executes the operation.
This operation intersects tool to the given object.
"""
+ assert(args)
+ object, tool = args
feature = part.addFeature("Boolean")
return Boolean(feature, object, tool, GeomAlgoAPI_Boolean.BOOL_COMMON)
Pass all args to Parameter __init__ function.
"""
+ assert(args)
feature = part.addFeature("Parameter")
return Parameter(feature, *args)
Interface.__init__(self, feature)
assert(self._feature.getKind() == "Parameter")
- self._variable = self._feature.data().selection("variable")
- self._expression = self._feature.data().real("expression")
+ self._variable = self._feature.data().string("variable")
+ self._expression = self._feature.data().string("expression")
assert(self._variable)
assert(self._expression)