Skip to content

Commit

Permalink
Update readme to fixed issues #444 and #447 and #449
Browse files Browse the repository at this point in the history
  • Loading branch information
shaise committed Jan 19, 2025
1 parent e98c6bd commit d023c3c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,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=3&t=60818)

#### Release notes:
* V0.7.04 19 Jan 2025: Change some python code to be compatible with Py ver 3.8.
- Fix FoldWall not claiming sketches
* V0.7.03 15 Jan 2025: Fix ansi/din support.
* V0.7.02 15 Jan 2025: Fix thickness detection by [@alexneufeld][alexneufeld].
- Improve detection of missing networkx dependency
Expand Down
10 changes: 8 additions & 2 deletions SheetMetalFoldCmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def smFold(
# adaptive адаптивний
if position == "intersection of planes" :
kfactor = (( bendR ) * math.tan(math.radians(bendA / 2.0)) * 180 / (bendA / 2.0) / math.pi - bendR ) / thk
print (kfactor)
# print (kfactor)

unfoldLength = (bendR + kfactor * thk) * bendA * math.pi / 180.0
neutralRadius = bendR + kfactor * thk
Expand Down Expand Up @@ -295,14 +295,20 @@ def execute(self, fp):

icons_path = SheetMetalTools.icons_path


class SMFoldViewProvider(SheetMetalTools.SMViewProvider):
''' Part WB style ViewProvider '''
def getIcon(self):
return os.path.join(icons_path, 'SheetMetal_AddFoldWall.svg')

def getTaskPanel(self, obj):
return SMFoldOnLineTaskPanel(obj)

def claimChildren(self):
objs = []
if not SheetMetalTools.smIsPartDesign(self.Object) and hasattr(self.Object, "baseObject"):
objs.append(self.Object.baseObject[0])
objs.append(self.Object.BendLine)
return objs

class SMFoldPDViewProvider(SMFoldViewProvider):
''' Part Design WB style ViewProvider - backward compatibility only'''
Expand Down
12 changes: 10 additions & 2 deletions SheetMetalUnfoldCmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
###############################################################################

import os
import sys
import Part
import FreeCAD
import SheetMetalKfactor
Expand All @@ -35,8 +36,15 @@
from engineering_mode import engineering_mode_enabled

translate = FreeCAD.Qt.translate

if SheetMetalTools.smIsNetworkxAvailable():
if sys.version_info.major == 3 and sys.version_info.minor < 10:
NewUnfolderAvailable = False
FreeCAD.Console.PrintWarning(
translate( "SheetMetal",
"Python version is too old for the new unfolder\n"
"Reverting to the old one\n"
)
)
elif SheetMetalTools.smIsNetworkxAvailable():
import SheetMetalNewUnfolder
from SheetMetalNewUnfolder import BendAllowanceCalculator
NewUnfolderAvailable = True
Expand Down
4 changes: 2 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<package format="1" xmlns="https://wiki.freecad.org/Package_Metadata">
<name>SheetMetal Workbench</name>
<description>A simple sheet metal tools workbench for FreeCAD.</description>
<version>0.7.03</version>
<date>2025-01-15</date>
<version>0.7.04</version>
<date>2025-01-19</date>
<maintainer email="[email protected]">Shai Seger</maintainer>
<license file="LICENSE">LGPL-2.1-or-later</license>
<url type="repository" branch="master">https://github.com/shaise/FreeCAD_SheetMetal</url>
Expand Down

0 comments on commit d023c3c

Please sign in to comment.