Part: boolean splitt tools, add type property to the objects

This commit is contained in:
Bernd Hahnebach 2016-12-20 18:12:06 +01:00 committed by Yorik van Havre
parent ebfa179c0a
commit 6378ad3aa7
2 changed files with 6 additions and 0 deletions

View File

@ -121,6 +121,7 @@ class FeatureConnect:
obj.addProperty("App::PropertyLength","Tolerance","Connect","Tolerance when intersecting (fuzzy value). In addition to tolerances of the shapes.")
obj.Proxy = self
self.Type = "FeatureConnect"
def execute(self,selfobj):
rst = JoinAPI.connect([obj.Shape for obj in selfobj.Objects], selfobj.Tolerance)
@ -214,6 +215,7 @@ class FeatureEmbed:
obj.addProperty("App::PropertyLength","Tolerance","Embed","Tolerance when intersecting (fuzzy value). In addition to tolerances of the shapes.")
obj.Proxy = self
self.Type = "FeatureEmbed"
def execute(self,selfobj):
rst = JoinAPI.embed_legacy(selfobj.Base.Shape, selfobj.Tool.Shape, selfobj.Tolerance)
@ -308,6 +310,7 @@ class FeatureCutout:
obj.addProperty("App::PropertyLength","Tolerance","Cutout","Tolerance when intersecting (fuzzy value). In addition to tolerances of the shapes.")
obj.Proxy = self
self.Type = "FeatureCutout"
def execute(self,selfobj):
rst = JoinAPI.cutout_legacy(selfobj.Base.Shape, selfobj.Tool.Shape, selfobj.Tolerance)

View File

@ -75,6 +75,7 @@ class FeatureBooleanFragments:
obj.addProperty("App::PropertyLength","Tolerance","BooleanFragments","Tolerance when intersecting (fuzzy value). In addition to tolerances of the shapes.")
obj.Proxy = self
self.Type = "FeatureBooleanFragments"
def execute(self,selfobj):
shapes = [obj.Shape for obj in selfobj.Objects]
@ -203,6 +204,7 @@ class FeatureSlice:
obj.addProperty("App::PropertyLength","Tolerance","Slice","Tolerance when intersecting (fuzzy value). In addition to tolerances of the shapes.")
obj.Proxy = self
self.Type = "FeatureSlice"
def execute(self,selfobj):
if len(selfobj.Tools) < 1:
@ -327,6 +329,7 @@ class FeatureXOR:
obj.addProperty("App::PropertyLength","Tolerance","XOR","Tolerance when intersecting (fuzzy value). In addition to tolerances of the shapes.")
obj.Proxy = self
self.Type = "FeatureXOR"
def execute(self,selfobj):
shapes = [obj.Shape for obj in selfobj.Objects]