From 2a846428fe8fd5e824d16a8b83aa26b4e828f2df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Luis=20Cerc=C3=B3s=20pita?= Date: Tue, 1 May 2012 17:08:07 +0200 Subject: [PATCH] Removed shape duplicities. --- src/Mod/Ship/Instance.py | 4 ++-- src/Mod/Ship/shipCreateShip/TaskPanel.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/Ship/Instance.py b/src/Mod/Ship/Instance.py index 104d2f24e..16d77f868 100644 --- a/src/Mod/Ship/Instance.py +++ b/src/Mod/Ship/Instance.py @@ -46,7 +46,7 @@ class Ship: obj.addProperty("App::PropertyLength","Beam","Ship", str(Translator.translate("Ship beam (B) [m]"))).Beam=0.0 obj.addProperty("App::PropertyLength","Draft","Ship", str(Translator.translate("Ship draft (T) [m]"))).Draft=0.0 # Add shapes - obj.addProperty("Part::PropertyPartShape","Shape","Ship", str(Translator.translate("Ship surfaces"))).Shape = Part.makeShell(faces) + obj.Shape = Part.makeShell(faces) obj.Proxy = self self.obj = obj @@ -54,7 +54,7 @@ class Ship: ''' Print the name of the property that has changed ''' # FreeCAD.Console.PrintMessage("Change property: " + str(prop) + "\n") if prop == "Length" or prop == "Beam" or prop == "Draft": - fp.Shape = Part.makeShell(obj.Shape.Faces) + pass def execute(self, obj): ''' Print a short message when doing a recomputation, this method is mandatory ''' diff --git a/src/Mod/Ship/shipCreateShip/TaskPanel.py b/src/Mod/Ship/shipCreateShip/TaskPanel.py index bec74302a..cbb5319c8 100644 --- a/src/Mod/Ship/shipCreateShip/TaskPanel.py +++ b/src/Mod/Ship/shipCreateShip/TaskPanel.py @@ -49,6 +49,7 @@ class TaskPanel: obj.Draft = self.form.draft.value() # Discretize it ship.discretize(self.form.nSections.value(), self.form.nPoints.value()) + App.ActiveDocument.recompute() return True def reject(self):