Skip to content

Commit

Permalink
Merge pull request #10 from shaise/master
Browse files Browse the repository at this point in the history
master
  • Loading branch information
jaisekjames authored Dec 21, 2020
2 parents 7904666 + c337be6 commit 4b55760
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion InitGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
8 changes: 4 additions & 4 deletions SheetMetalBaseCmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions SheetMetalExtendCmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 4b55760

Please sign in to comment.