diff --git a/InitGui.py b/InitGui.py index da5080e..7e9c234 100644 --- a/InitGui.py +++ b/InitGui.py @@ -34,7 +34,7 @@ global main_smWB_Icon main_smWB_Icon = os.path.join( smWB_icons_path , 'SMLogo.svg') -SHEETMETALWB_VERSION = 'V0.2.43' +SHEETMETALWB_VERSION = 'V0.2.44' class SMWorkbench (Workbench): diff --git a/README.md b/README.md index cc886b5..f807e9d 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,8 @@ Starting from FreeCAD 0.17 it can be installed via the [Addon Manager](https://g * FreeCAD Forum announcement/discussion [thread](https://forum.freecadweb.org/viewtopic.php?f=10&t=11303) #### Release notes: -* V0.2.42 01 Dec 2020: Added corner feature and map sketch to cut openings by [@jaisejames][jaisejames]. Thank you! +* V0.2.44 19 Dec 2020: Added extend feature by [@jaisejames][jaisejames]. Thank you! +* V0.2.43 01 Dec 2020: Added corner feature and map sketch to cut openings by [@jaisejames][jaisejames]. Thank you! * V0.2.42 09 Jun 2020: Added Engineering UX Mode by [@ceremcem][ceremcem]. Thank you! * V0.2.41 01 Jun 2020: Added Drop down Menu * V0.2.40 24 May 2020: Added added tools for conversion of solid corners to sheetmetal by [@jaisejames][jaisejames]. Thank you! diff --git a/SheetMetalBaseCmd.py b/SheetMetalBaseCmd.py index ae77317..de3ac79 100644 --- a/SheetMetalBaseCmd.py +++ b/SheetMetalBaseCmd.py @@ -56,8 +56,8 @@ def smIsOperationLegal(body, selobj): def smBase(thk = 2.0, length = 10.0, radius = 1.0, Side = "Inside", midplane = False, reverse = False, MainObject = None): WireList = MainObject.Shape.Wires[0] mat = MainObject.getGlobalPlacement() - normal = mat.multVec(FreeCAD.Vector(0,0,1)) - #print(sketch_normal) + normal = (mat.multVec(FreeCAD.Vector(0,0,1))).normalize() + #print(normal) if WireList.isClosed() : sketch_face = Part.makeFace(MainObject.Shape.Wires,"Part::FaceMakerBullseye") wallSolid = sketch_face.extrude(sketch_face.normalAt(0,0) * thk) @@ -108,8 +108,8 @@ def __init__(self, obj): def execute(self, fp): '''"Print a short message when doing a recomputation, this method is mandatory" ''' if (not hasattr(fp,"MidPlane")): - obj.addProperty("App::PropertyBool","MidPlane","Parameters","Extrude Symmetric to Plane").MidPlane = False - obj.addProperty("App::PropertyBool","Reverse","Parameters","Reverse Extrusion Direction").Reverse = False + fp.addProperty("App::PropertyBool","MidPlane","Parameters","Extrude Symmetric to Plane").MidPlane = False + fp.addProperty("App::PropertyBool","Reverse","Parameters","Reverse Extrusion Direction").Reverse = False s = smBase(thk = fp.thickness.Value, length = fp.length.Value, radius = fp.radius.Value, Side = fp.BendSide, midplane = fp.MidPlane, reverse = fp.Reverse, MainObject = fp.BendSketch) diff --git a/SheetMetalExtendCmd.py b/SheetMetalExtendCmd.py index b6d3c79..77fac68 100644 --- a/SheetMetalExtendCmd.py +++ b/SheetMetalExtendCmd.py @@ -305,10 +305,10 @@ def getElementMapVersion(self, _fp, ver, _prop, restored): def execute(self, fp): if (not hasattr(fp,"Sketch")): - obj.addProperty("App::PropertyLink","Sketch","ParametersExt","Wall Sketch") - obj.addProperty("App::PropertyBool","UseSubstraction","ParametersExt","Use Parameters").UseSubstraction = False - obj.addProperty("App::PropertyDistance","Offset","ParametersExt","Offset for substraction").Offset = 0.02 - obj.addProperty("App::PropertyBool","Refine","ParametersExt","Use Parameters").Refine = False + fp.addProperty("App::PropertyLink","Sketch","ParametersExt","Wall Sketch") + fp.addProperty("App::PropertyBool","UseSubstraction","ParametersExt","Use Parameters").UseSubstraction = False + fp.addProperty("App::PropertyDistance","Offset","ParametersExt","Offset for substraction").Offset = 0.02 + fp.addProperty("App::PropertyBool","Refine","ParametersExt","Use Parameters").Refine = False # pass selected object shape Main_Object = fp.baseObject[0].Shape.copy() face = fp.baseObject[1]