Giter Site home page Giter Site logo

shaise / freecad_sheetmetal Goto Github PK

View Code? Open in Web Editor NEW
175.0 14.0 51.0 1.75 MB

A simple sheet metal workbench for FreeCAD

Home Page: http://theseger.com/projects/2015/06/sheet-metal-addon-for-freecad/

License: GNU Lesser General Public License v2.1

Python 98.73% Shell 1.27%
freecad sheetmetal workbench addon

freecad_sheetmetal's Introduction

FreeCAD SheetMetal Workbench

A simple sheet metal tools workbench for FreeCAD

Demo Workflow

Tutorial by Joko Engineering:

Tutorial

Developers:

  • Folding tools:

    @shaise Shai Seger
    @jaisekjames
    @ceremcem Cerem Cem ASLAN
    (@JMG1) Based and inspired by Javier Martínez's code

  • Unfolding tool:

    Copyright 2014 by Ulrich Brammer <ulrich1a[at]users.sourceforge.net> AKA @ulrich1a

Wiki

SheetMetal Wiki at FreeCad

Terminology

Sheetmetal Workbench definitions

Sheetmetal WB Terminology

Physical material definitions

Physical Terminology

Test case

As a simple test case, consider the following example:

  • Inputs:
    • Thickness: 2mm
    • K-factor: 0.38 (ANSI)
    • Leg length: 48.12mm
    • Inner effective radius: 1.64mm
    • Flange length: 51.76mm
  • Output:
    • End to mold-line distance: 50mm

You can find a simple calculator in tools/calc-unfold.py.

Material Definition Sheet

Description

You can use a Spreadsheet object to declare K-factor values inside the project file permanently. This will allow:

  • Different K-factor values to be used for each bend in your model
  • Sharing the same material definition for multiple objects

Usage

  1. Create a spreadsheet with the name of material_foo with the following content (see this table):

    Radius / Thickness K-factor (ANSI)
    1 0.38
    3 0.43
    99 0.5

    Notes:

    1. The cell names are case/space sensitive.
    2. Possible values for K-factor is K-factor (ANSI) or K-factor (DIN).
    3. Radius / Thickness means Radius over Thickness. Eg. if inner radius is 1.64mm and material thickness is 2mm then Radius / Thickness == 1.64/2 = 0.82 so 0.38 will be used as the K-factor. See lookup.py for more examples.
  2. Use "Unfold Task Panel" to assign the material sheet.

  3. Unfold as usual.

Screencast

Screencast

Engineering Mode

Description

Some sort of parameters effect the fabrication process but are impossible to inspect visually, such as K-factor, which makes them susceptible to go unnoticed until the actual erroneous production took place.

In engineering mode, such "non-visually-inspectable" values are not assigned with default values and explicit user input is required. "Engineering mode" is a safer UX mode for production environments.

Activating

  1. Switch to SheetMetal WB at least once.
  2. Edit -> Preferences -> SheetMetal
  3. Select enabled in Engineering UX Mode field.

Installation

For installation and how to use, please visit:
http://theseger.com/projects/2015/06/sheet-metal-addon-for-freecad/
Starting from FreeCAD 0.17 it can be installed via the Addon Manager (from Tools menu)

References

Release notes:

  • V0.4.11 07 Apr 2024: Make material preservation system a bit more robust.
  • V0.4.10 31 Mar 2024: Some code refactoring and cleanup by @sliptonic.
    - Add Flat shape to base shapes.
  • V0.4.09 28 Mar 2024: Enhance bend function to work on refined faces as well.
  • V0.4.08 27 Mar 2024: Add option to set origin of base shape.
  • V0.4.07 26 Mar 2024: Fix Translation issues by @hasecilu.
    - Update function names to match the wiki help by @hasecilu.
  • V0.4.06 22 Mar 2024: Fix SolidBend function to be more robust and autodetect thickness.
    - Fix issues with auto-miter not working in some cases.
  • V0.4.05 20 Mar 2024: Update all other sheetmetal icons by @maxwxyz.
  • V0.4.04 18 Mar 2024: Change main icon to comply with freecad's theme by @maxwxyz and @pierreporte.
    - Fix base shape UI's minimum values.
  • V0.4.03 10 Mar 2024: Add Spanish translation by @hasecilu.
    - Update translation script by @hasecilu.
    - Set fold direction by selected edge position
  • V0.4.02 21 Feb 2024: Update bend sketch tooltip by @Syres916.
  • V0.4.01 10 Feb 2024: Fix basic shape dimensions by @RexLinz.
  • V0.4.00 27 Jan 2024: Relicense SheetMetal WB from GPL3 to LGPL2 by @prokoudine.
  • V0.3.16 17 Jan 2024: Compatability with python 3.11 by @Syres916.
    - Remove debug libraries by @Syres916.
  • V0.3.15 10 Jan 2024: Unfold compatability with old freecad versions by @ksigurdur.
  • V0.3.14 04 Jan 2024: Fix export of dxf.
  • V0.3.13 10 Dec 2023: update polish translations by @kaktusus.
  • V0.3.12 11 Nov 2023: Fix duplicate lines in unfold sketches issue #284.
  • V0.3.11 11 Nov 2023: Fix broken engineering mode. Some unfold gui cleanup.
  • V0.3.10 09 Nov 2023: Add base Sheetmetal shape tool, proposed by [@blindmessenger][opic82482].
  • V0.3.02 10 Oct 2023: Add Polish translation by @kaktusus.
  • V0.3.01 09 Oct 2023: Add Spanish translation by @hasecilu.
  • V0.3.00 02 Sep 2023: Refactoring Unfolder by @sliptonic.
  • V0.2.63 28 Mar 2023: Fix further unfolding issue by @Syres916.
  • V0.2.62 24 Mar 2023: Add translation support + Portuguese translation by @riqueenz.
    - Add dxf/svg export option to unfolder + fix unfolding issue by @Syres916.
  • V0.2.61 01 Jan 2023: Add option to link all bend radii to base bend radius by @alexneufeld.
  • V0.2.60 24 Dec 2022: Improved unfolding script to better handle chamfers by [@chappatted.
  • V0.2.59 11 Nov 2022: Make unfolder sketch work with linkstage version by @Syres916.
    - Fix refine function when multiple edges selected
    - Make unfolder work with counter bore holes by @chappatted. - Fix typos by [@luzpaz]luzpaz.
  • V0.2.58 06 Oct 2022: respect 'midplane' and 'reverse' options by @alexneufeld.
  • V0.2.57 07 Sep 2022: Fix unfold issue with compound holes by @chappatted.
  • V0.2.56 04 Aug 2022: Fix issue #206 (object color changes by every sheetmetal command) by @Syres916.
  • V0.2.55 03 Aug 2022: Add more backward compatibility to pr #242 by @Syres916.
  • V0.2.54 30 Jul 2022: Fix version 20 compatibility with pr #242 by @Roy-043.
  • V0.2.53 28 Jul 2022: Fix getBendetail and smExtrude for non-planar connecting faces by @Roy-043.
  • V0.2.52 25 Jul 2022: Better fix for the UseSubtraction issue. Thank you @akshimassar
  • V0.2.51 23 Jul 2022: Several fixes and new features: Thank you all!
    • Add Length Spec feature to set adaptive flange lengths by @rmu75.
    • Fix smExtrude for cylindrical connecting faces by @Roy-043.
    • Fix Face.UseSubstraction typo by @mangelozzi.
  • V0.2.50 09 Jul 2022: Moved 'Drawing' to 'TechDraw' for FC0.21 compatibility. Thank you!
  • V0.2.49 03 Jul 2021: Add SubShapeBinder as source by @s-light. Thank you!
  • V0.2.48 02 May 2021: Add context menu @jaisejames. Thank you!
  • V0.2.47 24 Feb 2021: Add translation support by @jaisejames. Thank you!
  • V0.2.46 31 Jan 2021: Small bug fixes and code clean by @jaisejames. Thank you!
  • V0.2.45 24 Dec 2020: Added punch tool feature by @jaisejames. Thank you!
  • V0.2.44 19 Dec 2020: Added extend feature by @jaisejames. Thank you!
  • V0.2.43 01 Dec 2020: Added corner feature and map sketch to cut openings by @jaisejames. Thank you!
  • V0.2.42 09 Jun 2020: Added Engineering UX Mode by @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. Thank you!
  • V0.2.34 09 Mar 2020: Rename "my commands" context menu to sheet metal
  • V0.2.33 09 Mar 2020: Fix bend radius bug on sketch bends. Thank you Léo Flaventin!
  • V0.2.32 02 Jan 2020: Python 3.8 update by @looooo. Thank you!
  • V0.2.31 24 Apr 2019: Added better K factor control by @ceremcem. Thank you!
  • V0.2.30 30 Mar 2019: Added Fold-on-sketch-line tool by @jaisejames. Thank you!
  • V0.2.22 24 Jan 2019: Fix some typos, Issue #54
  • V0.2.21 20 Jan 2019: Fix some typos, Issue #52
  • V0.2.20 10 Jan 2019: Added sheetmetal generation from base wire by @jaisejames. Thank you!
  • V0.2.10 01 Nov 2018: Merge new features by @jaisejames. Thank you!
    • Added Edge based selection
    • Added Auto-mitering
    • Added Sketch based Wall
    • Added Sketch based Guided wall
    • Added Relief factor
    • Added Material Inside, thk inside, Offset options
  • V0.2.04 21 Sep 2018: Fix K-Factor bug
  • V0.2.03 20 Sep 2018: Merge @easyw PR: Add separate color for inner sketch lines. (issue #46). Change Gui layout
  • V0.2.02 15 Sep 2018: Add color selection for unfold sketches (issue #41)
  • V0.2.01 15 Sep 2018:
    • Fix bug when not generating sketch (issue #42)
    • Support separate color for bend lines (issue #41)
  • V0.2.00 04 Sep 2018: Make SheetMetal compatible with Python 3 and QT 5
  • V0.1.40 20 Aug 2018: Merge Ulrich's V20 unfolder script - supports many more sheet metal cases and more robust
  • V0.1.32 25 Jun 2018: New feature: Option to separately unfold bends. Thank you @jaisejames!
  • V0.1.31 25 Jun 2018: Support ellipses and parabolas, Try standard sketch conversion first
  • V0.1.30 25 Jun 2018:
    • New feature: Generate unfold sketch with folding marks. Issue #33. Thank you @easyw!
    • New feature: K-Factor foe unfolding is now editable. Issue #30
  • V0.1.21 19 Jun 2018: Fixed back negative bend angles, restrict miter to +/- 80 degrees
  • V0.1.20 19 Jun 2018: (Thank you @jaisejames for all these new features!!)
    • Add bend extension to make the bended wall wider
    • Add relief shape selection (rounded or flat)
    • Double clicking on a bent in the tree view, brings a dialog to select different faces (good when editing the base object breaks the bend, and new faces need to be selected)
    • Setting miter angle now works with unfold command
  • V0.1.13 10 May 2018: Change unbending method so shape refinement can work.
  • V0.1.12 25 Mar 2018: Allow negative bend angles. Change XPM icons to SVG
  • V0.1.11 01 Feb 2018: Fix Issue [#23][23]: when there is a gap only on one side, an extra face is added to the other
  • V0.1.10 11 Nov 2017: Add miter option to bends. By @jaisejames
  • V0.1.02 22 Jun 2017: Fix nesting bug, when saving and loading file
  • V0.1.01 03 Mar 2017: Support version 0.17 (starting from build 10423)
  • V0.0.13 07 Sep 2015: Add negative gaps for extrude function. (per deveee request)
  • V0.012 07 Sep 2015: Fix issue submitted by deveee
  • V0.010 13 Jun 2015: Add Ulrich's great unfolding tool. Thanks!!!
  • V0.002 12 Jun 2015: Fix Save/Load issues
  • V0.001 11 Jun 2015: Initial version

License

GPLv3 (see LICENSE)

freecad_sheetmetal's People

Contributors

alexneufeld avatar aszc avatar bgamari avatar ceremcem avatar chappatted avatar chennes avatar easyw avatar hasecilu avatar hl037 avatar jaisekjames avatar jantek avatar kaktusus avatar looooo avatar luzpaz avatar mangelozzi avatar maxwxyz avatar mumme74 avatar prokoudine avatar realthunder avatar riqueenz avatar rmu75 avatar roy-043 avatar s-light avatar shaise avatar sliptonic avatar syres916 avatar thesyndicated avatar ufocia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freecad_sheetmetal's Issues

Another unfolding failed

Unfolding fails with error:
Error Analysis: counter face not found at Face37

It occurs with current plugin version with freecad 0.16.

It seems to be related to the rectangle on Sketch002. When I remove it or use some particular dimensions, it works fine.

Here is the file and log from console:
unfold_log.txt
emi-prototyp7-ramka-ekran_10_1.zip

If you need, I can test some modifications, provide some additional debug info etc.

Mitered bend unfold error

Hey Shai,
I just updated to your latest sheetmetal workbench and decided to try out mitered bends.
Pretty cool!
I did run into a problem, though. If I make one mitered bend the part unfolds exactly as expected. If I make a second bend from the face of the mitered bend then the part won't unfold. Instead I get one of two error messages, depending on which face I select to initiate the unfold.

Mitered bend.FCStd.zip
unfold error1 180326
unfold error2 180326

Regards,
--Steve

Unfold issue

I was trying to unfold this part, but got this error when trying to unfold from the small flat face at the top of the part: "Error Analysis: did not find startangle of bend, please post failing sample for analysis at Face36"

Here are the part and log files from doing this unfold.
B5.cleaned.STEP.zip
postable-log.txt

Note: I have this set of changes in my plugin code to allow me to get the actual error response rather than just a crash.

How to update Unfold Options menu via UnfoldOptions.ui?

It turns out the UnfoldOptions.ui is not interpreted directly. AFAIU pyuic4 is used to generate Python codes located in SheetMetalUnfolder.py/SMUnfoldTaskPanel. However, there are lots of code seems to be diverged from the output of UnfoldOptions.ui.

What is the correct way to edit the UI?

Generated objects should inherit source labels

Currently when we unfold a part, generated objects gets the name as Unfold[nnn] and Unfold_Sketch[nnn]. It will be convenient to generate their names based on their source objects' label, such as ${src}[nnn].

Rationale

When there are lots of objects to unfold and we need to erase all of them an re-generate, it gets a burden to rename every single unfold one by one.

Allow to use negative gap values for extrude objects

It is useful in some cases and it seems to be not a problem to allow it.

I'm not creating a pull request because I'm not sure if it doesn't have any side effects. Here is the patch:

diff --git a/SheetMetalCmd.py b/SheetMetalCmd.py
index ce89972..1671799 100644
--- a/SheetMetalCmd.py
+++ b/SheetMetalCmd.py
@@ -40,7 +40,7 @@ def smMakeFace(edge, dir, from_p, to_p):
     return Part.Face(w)


-def smBend(bendR = 1.0, bendA = 90.0, flipped = False, extLen = 10.0, gap1 = 0.0, gap2 = 0, reliefW = 0.5, 
+def smBend(bendR = 1.0, bendA = 90.0, flipped = False, extLen = 10.0, gap1 = 0.0, gap2 = 0.0, reliefW = 0.5, 
             reliefD = 1.0, selFaceNames = '', MainObject = None):

   #AAD = FreeCAD.ActiveDocument
@@ -256,14 +256,14 @@ class SMExtrudeWall:
     selobj = Gui.Selection.getSelectionEx()[0]

     obj.addProperty("App::PropertyLength","length","Parameters","Length of wall").length = 10.0
-    obj.addProperty("App::PropertyLength","gap1","Parameters","Gap from left side").gap1 = 0.0
-    obj.addProperty("App::PropertyLength","gap2","Parameters","Gap from right side").gap2 = 0.0
+    obj.addProperty("App::PropertyFloat","gap1","Parameters","Gap from left side").gap1 = 0.0
+    obj.addProperty("App::PropertyFloat","gap2","Parameters","Gap from right side").gap2 = 0.0
     obj.addProperty("App::PropertyLinkSub", "baseObject", "Parameters", "Base object").baseObject = (selobj.Object, selobj.SubElementNames)
     obj.Proxy = self

   def execute(self, fp):
     #s = smExtrude(extLength = fp.length.Value, selFaceNames = self.selFaceNames, selObjectName = self.selObjectName)
-    s = smBend(bendA = 0.0,  extLen = fp.length.Value, gap1 = fp.gap1.Value, gap2 = fp.gap2.Value, reliefW = 0.0,
+    s = smBend(bendA = 0.0,  extLen = fp.length.Value, gap1 = fp.gap1, gap2 = fp.gap2, reliefW = 0.0,
                 selFaceNames = fp.baseObject[1], MainObject = fp.baseObject[0])
     fp.Shape = s


missing WB icon in SVG format

Hi @shaise
it would be possible to have the main WB icon as svg?
(D:\shai\FreeCAD\mkwall_xpm)
In HDPI monitors the actual XPM is little if used inside Selector Tool...
selector
Thx
Maurice
PS if you could share the svg file, I could make a PR to switch from xpm to svg 😄

sheetmetal loosing base face when changing gaps of extrude

how to reproduce:

  1. create pad from sketch, wake a tray with foldings and extrudes;
  2. map sketch to any face of the pad, make cutout in pad design
  3. change any gap parameter of initial extrudes - next one will remap to improper face

It can be however FreeCAD engine limitation - but I am not a python enthusiast

o.SubObjects[0] is out of range

When unfolding is finished, I get an error that o.SubObjects[0] is out of range.

I didn't check the reason, but in PerformUnfold() function you have:

      if len(o.SubObjects)>1:
        mw=FreeCADGui.getMainWindow()
        QtGui.QMessageBox.information(mw,"SubelementError","""Only one flat face has to be selected!""")
      else:
        subelement = o.SubObjects[0]

changing else: line to elif len(o.SubObjects)>0: solves this issue.

Definition of k-factor

Internet searches as well as Wikipedia page shows that the definition of "k-factor" is as follows:

K-factor is a ratio of location of the neutral line to the material thickness as defined by t/T where t = location of the neutral line and T = material thickness. (...) and usually between 0.3 and 0.5.

Based on this information, latest change of k-factor in SheetMetal is misleading, thus should be reverted.

Moreover, the formula newNode.k_Factor = (0.65 + 0.5*math.log10(innerRadius/self.__thickness)) has no explanation. It should be explained or removed. There is a long discussion about this formula in SW forum and seems that it's still unclear: https://forum.solidworks.com/thread/38306

Propose to add one more function: convert solid body to sheetmetal

This sheetmetal workbench is very nice to me. It enables users to create sheetmetals, which is commonly used in industry production.
But currently there is only one way to create sheetmetal geomety in this workbench: to add sheetmetal geomety at an existing edge. In some circumstances, it is not convevient. Product below is an example.
default
I'd like to propose to implement one more function: to convert solid body to sheetmetal. This is not anything new. We can see this function in any main stream software like SolidWorks. Please kindly consider it. Thanks a lot.

Fold on sketch line breaks, when bending angle is greater than 99 degrees

Hi,

OS: Ubuntu 16.04.6 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

SheetMetal v 0.2.30
I tested the new feature - Fold-on-sketch-line, and I found quite strange behaviour then folding angle is > 99 degrees.
Example.fcstd.zip

How to make unfold sketch updated on base geometry changes

This is the current unfold output:

image

When I changed the geometry, for example as in the following way:

image

I expect the unfold sketch to be updated accordingly. How can I achieve this, either automatically (this is preferred) or by manually running some code?

[FR] Allow editing the source face for Bend or Extend feature

It would be useful to re-attribute a bend or extend feature to a different face ID after its creation. Due to FreeCAD's topological naming issue, if changes are made to a bend's properties (like gap1 and gap2) that changes the number of faces it generates, then following operations will likely fail or produce unexpected results after a recompute. An editing option would allow the end user to repair failed features.

This is a recent example where editing bends would be useful: FreeCAD forum - Sheet Metal bending

Thanks.

creating a gap breaks the bend on freecad 0.17 body

Hi,
while bending with no gap from a body (Part design next) : no issues as shown on picture below
capture d ecran de 2018-02-17 16-07-26

while creating a bend with a gap, whatever the orientation i got this : the direction of the fold created is going backwards (may be it has to do with local coordinates of the Part vs global ccordinates of the document ?
capture d ecran de 2018-02-17 16-07-56

while doing the bend from the part workshop (first plate crated from a cube), i dont experience the issue :
capture d ecran de 2018-02-17 16-11-16

OS: Ubuntu 17.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13247 (Git)
Build type: None
Branch: master
Hash: 5022c8df5cef0690f2c8acff4bcebd82655a5f04
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: French/France (fr_FR)

Unfolding Problem when two Flanges meet at Right Angles and the Bend Radius equals the Pad Length

Hardware:
Intel Core i5-2500K Sandy Bridge
Intel HD Graphics 3000

Software:
OS: Linux Mint 17.2 Rafaela
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6700 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: 7b925d11aa69ac405b423635adb1e2833f18a817
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

SheetMetal Workbench V0.0.13

To reproduce the problem:

  1. Create a sketch of a right-angled triangle. A square works too.
  2. Pad to 1 mm (not the default of 10 mm). This matches the default bend radius of 1 mm.
  3. Add bends to both legs of the right-angled triangle (not the hypotenuse!).
  4. Unfold

Description of problem:
One of the faces that should meet the right angle has one corner misplaced. It looks to me like a sign problem - something is being added to a coordinate when it should be subtracted.

This bug only happens when:

  1. The sketch contains a right angle - an equilateral triangle unfolds without problem.
  2. The bend radius exactly matches the pad thickness.

Set K-factor for unfolding

During the unfold procedure the length block should be dependent from the K-factor. However I do not find the way how to change it. Such setup parameter will be extremely useful.

Changing a Parameter breaks the model

Hi !

Freecad 0.17 (and 0.18) on Windows 7 64 Bit.
I use a spreadsheet where I specify the parameter of a metal chassis like width or high, which used to work fine with an old version of the sheet metal workbench but with an up to date version changing a parameter breaks the model.

Attached the freecad file (freecad sheetmetal error.zip) open it in Freecad with and uptodate version of the sheetmetal workbench installed, open the spreadsheet and change the parameter "High" from 120 to 200, freecad will recalculate the chassis and raises and error (see model tree on the left)

No install the old sheetmetal workbench (file: sheetmetal.ok.zip), restart freecad and do the same steps again and now everything works (hopefully) fine.

I have tested this issue on two PCs, always with the same result. The old workbench does the job the new one fails.

I hope this is clear otherwise let me know and I will try to give more information. The sheetmetal workbenach is a great tool and I really do not want to miss it.

Thank you. Dirk

freecad sheetmetal error.zip
sheetmetal ok.zip
sheetmetal broken.zip

Unintentional face added by bend

Hey Shai,

In the attached example, I put in a 0.07 inch gap at one side of the "Cover top right middle bend." When I did so a 0.07 inch wide face was also incorrectly added to the front left edge of the part next to the middle bend. Thereafter, when I add the "Cover top right front bend" the 0.07 inch face is not included in the bend, thus resulting in an unintended gap at the front left corner.

The effect is repeatable with a new part. by creating one sketch, one pad and one bend with gap.

--Steve
Unintentional face added by bend.FCStd.zip

Miterangle not working anymore

Hallo,

Freecad 0.18 and latest sheetmetal addon: Miterangle is not working anymore. See attached screenshot.
Tested with Freecad 0.18 and an older sheetmetal addone too and the old addon works fine, see screenshot number two.
screenshot-1
screenshot-2

Wrong output is generated for closed bent parts

Description

If a bent part is closed on itself, start point of unfolded part is determined erroneously.

Here is a closed bent part:

image

Here is the erroneous unfold:

image

Workaround

Breaking the loop with a negligible distance fixes the issue:

image

Here is the correct unfold:

image

Attachment

Created with LinkStage3@e9c60d4d: simple.fcstd.remove-me.zip

Unbend fails when bend abuts inner corner

Hey Shai,

I simplified the Issue 9 example part down to one L-shaped part with two bends and discovered a (perhaps related) problem. The two bends are both associated with the inner corner of the L. One bend has a gap to keep the two bends from interfering with one another when unbent.

The part is drawn correctly after both bends. However, it is not possible to unbend the part starting from the bend face that abuts the inner corner. You can unbend the part if you start from the other bend face (the one with the gap). In that case the part unbends but the abutted bend breaks during the unfold.

It may be that you have to add a cut at the inner corner of the L to isolate the face edge before you initiate the bend.

Chain box cover.FCStd.zip

Regards,
--Steve

180 degrees cylinder sometimes is flattened in wrong direction

Bend angle has wrong value. In logs for my two faces I saw:

Face61 Type: Bend bend_dir: up
Face_idx 60 bend_angle -180.0
Face61 k-factor: 0.65
angle: -180.0 test_angle: 45.0 trans: 4.16261026601
(...)
Face17 Type: Bend bend_dir: up
Face_idx 16 bend_angle -180.0
Face17 k-factor: 0.65
angle: -180.0 test_angle: 45.0 trans: 4.16261026601

In this case unfolding has been done wrongly.

But when I saved the file, closed FreeCAD, and then reopened it, I got proper bend angle value:

Face61 Type: Bend bend_dir: up
Face_idx 60 bend_angle -180.0
Face61 k-factor: 0.65
angle: -180.0 test_angle: 45.0 trans: 4.16261026601
(...)
Face17 Type: Bend bend_dir: up
Face_idx 16 bend_angle 180.0
Face17 k-factor: 0.65
angle: 180.0 test_angle: 45.0 trans: 4.16261026601

Second angle is non-negative, and unfolding started working properly.

I suppose that it is a problem with rounding or different precision somewhere... Rather hard to determine what is the reason.

Bend gap twice as big as inserted value

Hi!

First of all, thank you for your great work on the sheetmetal workbench. I worked a lot with it in the past and it usually worked great.

I use FreeCAD 0.18 stable with Debian on my computer at work.
Recently I noticed, that the gaps at sheet metal bends appear twice as big as i intended and I can reproduce it. To verify if the failure is not in my config, I renamed my .FreeCAD folder, to get a new FreeCAD without my old config files and installed a new sheetmetal workbench over the addon manager. Then I made a simple new model to verify if the bug still appears. And it did. My coworker has the same issue with the sheetmetal workbench on his FreeCAD. So I think that might be a bug.

Please find a sample file and a screenshot attached.
In this sample I intended a 5mm gap but I get 10mm.

bend_gap_clusterfuck_3.zip
freecad_bend_clusterfuck

I would be glad, if you could have a look on it to verify if its an actually bug.

Best regards,
Ludwig

Focus at completion of bend

Hi Shai,

If I make a bend and then make a second bend, in the Tree View the second bend will be shown in bold and the previous bend will be shown with a gray highlight. The information shown in the Property View reflects the information from the first bend.

Is this intended behavior?

I ask because I frequently screw up my model by creating a new bend and immediately adjusting the bend properties --only to find that I have inadvertently modified the properties of the previous bend, not the bend I just created.

I think it would improve bend work flow if, as the last step in a bend operation, you set the focus to the new bend rather than leaving it on the previous bend.

Thanks,
--Steve

0.17 Support

Hi,
is there a chance this tool gets updated for version 0.17?
Since I cant realy create sketches on faces created with this tool anymore in 0.17, but need this version for compatibility with another tool(dimensioning).

greetings Tarcontar

Deleting bend cause errors

Hi,

I really appreciate your WB. I think you made a great job. In any case, would it possible in the future to consider that when deleting a bend the model doesn't show errors and recompute properly?
I mean, if you create bend & bend001, if you delete bend bend001 gives error and you can't edit.

Is it because it has to rename faces?

I tried the same on partDesign and if a feature is not related to another, the model recompute properly.

Thanks.

Cheers.

No response on unfold

Hi Shai,

I have stumbled on another odd behavior in the sheet metal workbench.

I created the attached model using FC 0.17.13005. (Remove .zip in the filename to open.)

The rear chassis and the bottom left cover parts unfold as expected.

The bottom right cover fails to unfold creating several shapes in the process. --This acts like the part was broken due to new faces being added by editing, so I will rebuild that part and not worry about it.

The reason I am writing is that, when I attempt to unfold either the top left cover or the top right cover nothing happens. The icon reacts and there is a brief pause but that's it.

I believe that the only difference between the way I built the bottom and top covers is that for the top covers I referenced the top edge of the rear chassis to create the XY working plane for the initial sketches.

Regards,
--Steve

Chassis unfold example 180123.FCStd.zip

How to unfold with one bending line instead of two lines?

Currently, unfolding the following part:

image

produces following output in DXF file (via TechDraw workbench):

image

I added the red line with Gimp, which is what I wanted instead of the green ones (because I'm bending the sheet metal with air bending technique).

How can I produce one bending line (the red one) instead of these two green ones?

`sk` referenced before assignment

When unfold is performed with Generate projection sketch disabled, following exception is thrown:

Traceback (most recent call last):
  File "/home/aea/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2253, in accept
    docG.getObject(sk.Name).LineColor = (0.0,0.0,0.5)
<type 'exceptions.UnboundLocalError'>: local variable 'sk' referenced before assignment

Unfolded solid is still generated successfully.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.