Giter Club home page Giter Club logo

freecad_fastenerswb's Introduction

FreeCAD Fasteners Workbench

PEP8

A FreeCAD Workbench to Add/Attach various Fasteners to Parts

Note: This workbench acts as a wrapper to the screw_maker macro created by @ulrich1a

image

Installation

Addon Manager

Note: Starting from FreeCAD v0.17.9940 an Addons Manager has been built-in to FreeCAD.
You can use said Addon Manager to seamlessly install Fasteners Workbench.

Manual Installation

For versions prior to v0.17.9940 FreeCAD requires manual installation, learn how via http://theseger.com/projects/2015/06/fasteners-workbench-for-freecad/

Usage

Official Wiki

https://www.freecadweb.org/wiki/Fasteners_Workbench

Expand this section for a synopsis on how to use this workbench

Note: this info is also available on http://theseger.com/projects/2015/06/fasteners-workbench-for-freecad/

Where to Start

Usage is pretty straightforward:

  1. Install the workbench and restart FreeCAD
  2. Open a new document in FreeCAD
  3. Select the Fasteners workbench from the workbench drop-down list
    Result: A series of screws will show on the toolbar:

FastenersToolbar

  1. Clicking on any of the screws will create this screw in the origin position with default size.

  2. To change size/length: select the newly created screw, then go to the data tab in the property panel, there you can change diameter and length. (For now it is in metric standard):

FS-Parameters

  1. Changing the “thread” property to “true” will render the screw threads as well.
    Please note:
    • generating threads takes considerable amount of time, during which, FreeCAD will not be responsive.
    • the invert and offset properties are only applicable to attached fasteners.

Attached Fasteners

Fasteners can also be attached to features in other parts.

Attach Screw to part

  • To attach a screw to a part, the part must have features with circular edges, such as holes.

Attach Screw to hole(s)

  • To attach screws to holes, select the desired circular edge or several edges (You can also select a face if you want to select all holes in that face):

    FastenersSelect

  • Now click on the desired screw.
    Result: A screw will be placed on each of the selected features, trying to match the screw size to the hole size:

FastenersCreated

  • You can now, like before, change diameter and length from the properties panel.

  • If you wish the screw to hover above the hole, you can set the “offset” property to the desired distance.
    Note: Sometimes the screw does not detect the direction correctly and appears upside down.
    To correct this change the “invert” property to true OR select the screw and press the Flip button:
    Flip-Button in the toolbar.

Attach Fastener to different feature

  • To attach an existing fastener to a different feature, select the screw, then ctrl-select the new feature:

    Fasteners-Select-Move

  • Now press the Move button Move-Button in the toolbar

  • Result: The screw will move to the new location:

    Fasteners-Moved

    • Note: An attached screw will move with the part it is attached to.
      If you wish to detach the screw from the parent part:
      • simply select only the screw
      • then press the move button.
        *Result: the screw is now detached and can be moved individually.

Simplifying objects

Important Note: If you wish to share FCStd files that contains fasteners (or parts from other custom parametric workbenches) with other people, they must install these workbenches as well, or else they will get errors when trying to use them.

However, if you just want to share the resulting parts, with no need to change object’s parameters, you can use the Simplify function Simplify-button to convert the fasteners to simple shapes.

Result: They will appear as new Shape parts in the model tree. You can then delete the original fasteners and save as a simple FCStd that can be read and used on any FreeCAD installation.

Adding Fasteners via Python

You can create screws with a script using the createFastener command:

createFastener(type, diam, len, threadType, shapeOnly = False)

threadType can be 'simple' or 'real
shapeOnly can be True if you just want to get the object or False (default) if you want it to be added to the treeView and shown.

import ScrewMaker
sm = ScrewMaker.Instance
screwobj = sm.createFastener('ISO7046', 'M6', '8', 'simple')

Release Notes

  • V0.5.20 26 Apr 2024: Fix Bom bug by @Syres916.
    - Remove redundant casts for better compatibility by @YakoYakoYokuYoku.
  • V0.5.19 17 Apr 2024: Add ISO 14581 by @Roundwolf.
  • V0.5.18 14 Apr 2024: Update icons by @maxwxyz.
    - typo fixes by @Roy-043
  • V0.5.17 08 Apr 2024: Add option to set fasteners default line and point size.
  • V0.5.16 05 Apr 2024: Add option to set fasteners default color.
  • V0.5.15 30 Mar 2024: Fasteners logo to comply with freecad's guidlines.
  • V0.5.14 10 Mar 2024: Add more nails & thumb screws by @hasecilu:
    - DIN 464, DIN 465 and DIN 653 Thumb screws
    - DIN 1143, DIN 1144A, DIN 1151A, DIN 1151B and DIN1152 nails
    - Update function names by @hasecilu.
  • V0.5.13 03 Mar 2024: Deprecate countersunk hole feature by @alexneufeld.
    - Update translation script by @hasecilu.
    - Restore missing ASMEB18.2.1.6 fastener by @hasecilu.
  • V0.5.12 21 Feb 2024: Add remaining unimplemented ISO hex head fasteners by @alexneufeld:
    - ISO 4015, ISO 4016, ISO 4018, ISO 4162, ISO 8765, ISO 15071 and ISO 15072.
  • V0.5.11 19 Feb 2024: Add ISO 2342 headless screws by @alexneufeld.
    - Add remaining unimplemented ISO nuts by @alexneufeld:
    - ISO 4161, ISO 7040, ISO 7041, ISO 7043, ISO 7044, ISO 7719, ISO 7720, ISO 10511,
    - ISO 10512, ISO 10513, ISO 10663, ISO 12125, ISO 12126 and ISO 21670.
  • V0.5.10 13 Feb 2024: Add ASMEB18.6.1 wood screws by @cfunseth.
    - Add lots of metric pin types by @alexneufeld:
    - ISO1234, ISO2338, ISO2339, ISO2340A, ISO2340B, ISO2341A, ISO2341B, ISO8733
    - ISO8734, ISO8735, ISO8736, ISO8737, ISO8739, ISO8740, ISO8741, ISO8742,
    - ISO8743, ISO8744, ISO8745, ISO8746, ISO8747, ISO8748, ISO8750, ISO8751,
    - ISO8752 and ISO13337.
    - Merge def files to reduce load
  • V0.5.03 10 Feb 2024: Add remaining ASME B18.6.3 fasteners by @cfunseth.
  • V0.5.02 07 Feb 2024: Add DIN1160 nails by @hasecilu.
    - Code fixes and cleanup by @hasecilu.
  • V0.5.01 05 Feb 2024: updated german translation by @berberic2.
    - Screw Table sorting by @tobiasfalk.
    - DIN1624 renaming to 4 Prong Wood Thread Insert by @tobiasfalk.
    - Add ASME B18.6.3 1B & 4A @cfunseth.
  • V0.5.00 12 Jan 2024: Lots of improvements by @hasecilu:
    - Add ISO1478: Self tapping screw thread
    - Add ISO7049: cross-recessed pan head tapping screws
    - Add ISO 68-1 & 2 thread dimensions
    - Add ISO 262: metric pitch table
    - Add GN 506: T-slot nut to swivel in with ball spring
    - Add ISO 2936: Hex key
    - bug fixes
    - code refacroting and cleanup
  • V0.4.75 16 Dec 2023: Update Spanish translations by @hasecilu.
    - fix aliased issue with bom generation.
  • V0.4.74 16 Dec 2023: Add ISO8738, plain washers for clevis pins by @hasecilu.
    - automatically add aliasses to screwTables
  • V0.4.73 15 Dec 2023: Add ISO4034 nut by @hasecilu.
    - Add DIN6319 type C, D and G - Spherical Washers - Conical Seats by @UR-0. - Add alias support for equivalent fasteners
  • V0.4.72 10 Dec 2023: Update Polish translations by @kaktusus.
  • V0.4.71 26 Nov 2023: Add DIN6331 Hexagon nuts with collar by @UR-0.
    - Fix M6 pitch for DIN6330 by @UR-0.
  • V0.4.70 02 Nov 2023: Add custom length and width for heatset inserts.
  • V0.4.69 01 Nov 2023: Use the new loads/dumps system (supporting old versions as well) by @fra589.
  • V0.4.68 29 Oct 2023: Import translate module direcrtly by @Roy-043.
  • V0.4.67 15 Sep 2023: Fix screw die tool.
  • V0.4.66 12 Sep 2023: Update and add T slot fasteners by @hasecilu.
    - Update Spanish translations by @hasecilu.
    - German translation update + update.sh change by @berberic2.
    - PEM Inserts → Inserts by @berberic2.
    - Added some whitespace to get uniform appearance by @UR-0.
  • V0.4.65 06 Sep 2023: Added DIN 961, ISO 8676, ISO 8673, ISO 8674 and ISO 8675 by @tobiasfalk.
  • V0.4.64 05 Sep 2023: Update french translation files by @kaktusus & @David69.
    - Add German translations by @berberic2
  • V0.4.63 30 Aug 2023: Add french translation files by @kaktusus & @David69.
  • V0.4.62 23 Aug 2023: Add polish translation files by @kaktusus.
  • V0.4.61 22 Aug 2023: Add preferences to select which fastener types to show by @alexneufeld.
    - Non selected standards stil shows on the menu bar.
  • V0.4.60 16 Aug 2023: Add DIN 6330 Nuts by @berberic2.
  • V0.4.59 30 Jul 2023: Add DIN 6340 Washers by @berberic2.
  • V0.4.58 23 Jul 2023: Add DIN 7996 wood screws by @berberic2.
  • V0.4.57 21 Jul 2023: Add DIN84 and DIN934 by @tobiasfalk.
  • V0.4.56 29 Mar 2023: Remove unnecessary diameter factor.
  • V0.4.55 03 Mar 2023: Fix error changing PEM standoffs length by @alexneufeld.
  • V0.4.54 14 Jan 2023: Fix ISO washer thickness.
  • V0.4.53 11 Jan 2023: Add DIN933 bolts by @JanAndersen.
  • V0.4.52 04 Jan 2023: Add Add Square head bolts by @alexneufeld.
  • V0.4.51 30 Dec 2022: Add 9(!) new nut types by @alexneufeld.
    - Fix nylon hex nut fasteners by @alexneufeld.
  • V0.4.50 24 Dec 2022: Major Cleanup and refactor of fasteners functions by @alexneufeld.
  • V0.4.27 15 Dec 2022: Fix error creating '3.5M3' PEM standoffs by @alexneufeld.
    - Automatically select Custom diameter when custom pitch is changed.
  • V0.4.26 13 Dec 2022: Simplify creation of internal threads by @alexneufeld.
    - Remove LGTM badges by @alexneufeld.
  • V0.4.25 03 Dec 2022: Fix Thread issues with extreme 3d print offsets
  • V0.4.24 21 Nov 2022: Fix PEM standoff calculator
    - SVG Icons optimization by @EA32.
    - Fix toolbar names by @FreeCAD-Tools.
    - Add translation documentation by @FreeCAD-Tools.
  • V0.4.23 05 Nov 2022: Update portuguese translation by @riqueenz
    - GOST 1144 (Wood screws) code refactoring by @EA32
    - Add GrammaticalTools fixer script @FreeCAD-Tools.
  • V0.4.22 02 Nov 2022: Translations cleanup and updates by @hasecilu and @FreeCAD-Tools.
  • V0.4.21 29 Oct 2022: Further code cleanup by @alexneufeld and @FreeCAD-Tools.
    - Fix wood screw head shape by @EA32.
    - Add GN507 T slot nut by @hasecilu.
    - Add B-Spline option to FSFaceMaker
  • V0.4.20 28 Oct 2022: Complete code cleanup by @alexneufeld.
    - svg icon optimizations by @EA32
  • V0.4.19 24 Oct 2022: Add DIN471, DIN472, and DIN6799 retaining rings by @alexneufeld.
    - Add Din603 mushroom-head square-neck bolts by @alexneufeld.
    - Fix custom length bug by @alexneufeld.
  • V0.4.18 19 Oct 2022: Add GOST1144-3-4 wood screws by @EA32.
    - Optimize SVG files by @FreeCAD-Tools.
  • V0.4.17 16 Oct 2022: Fix (extended) Issue #25: problem with hex sockets.
  • V0.4.16 16 Oct 2022: Add DIN508 T-Slot nut by @hasecilu.
    - Cleanup translation files + add bash script by @FreeCAD-Tools.
  • V0.4.15 04 Oct 2022: Add GOST1144 type 1 & type 2 wood screws by @FreeCAD-Tools.
  • V0.4.14 03 Oct 2022: Add spanish translation by @hasecilu.
  • V0.4.13 02 Oct 2022: Add Din 96 wood screw by @berberic2.
  • V0.4.12 30 Sep 2022: Add GOST11860 Type 1 Cap Nut by @FreeCAD-Tools.
  • V0.4.11 25 Sep 2022: Russian translation by @FreeCAD-Tools.
  • V0.4.10 23 Sep 2022: Complete translation support + portuguese translation by @riqueenz.
  • V0.4.06 11 Sep 2022: Add translation helper scripts by @riqueenz. Fix PEM insert generation bug
  • V0.4.05 09 Sep 2022: Add support for language translations by @riqueenz
  • V0.4.04 05 Sep 2022: Several bug fixes after refactor
  • V0.4.03 16 Aug 2022: Refactor FastenerWB, stage 4 (last):
    - Cleanup and bug fixes
    - Move all remaining fasteners into the new system
    - Add real threads to all fasteners missing it
  • V0.4.02 16 Aug 2022: Refactor FastenerWB, stage 3 - Change fastener tables naming and usage.
  • V0.4.01 14 Aug 2022: Refactor FastenerWB, stage 2 - Move rod an some nut functions to the new system.
  • V0.4.00 12 Aug 2022: Refactor FastenerWB, stage 1 - split screw_maker fastener creation function to separate files.
  • V0.3.51 08 Aug 2022: Refactor MakeShellthread to simplify function interface.
  • V0.3.50 17 Jul 2022: Add inch socket low head cap screws by @alexneufeld. Thanks!
  • V0.3.49 14 Jul 2022: Add DIN 1587 Cap Nuts by @alexneufeld. Thanks!
  • V0.3.48 13 Jul 2022: Add DIN7998 wood screw thread creation. Helped by @alexneufeld. Thanks!
  • V0.3.47 12 Jul 2022: Add DIN571 wood screw and DIN917 nut cap by @berberic2. Thanks!
  • V0.3.46 26 Jun 2022: Add custom length to PCB spacers, Issue #144
  • V0.3.45 19 Jun 2022: Fix fasteners cash issue by @algtgv. Thanks!
  • V0.3.44 09 Jun 2022: Fix fasteners buttons order by @Roy-043. Thanks!
  • V0.3.43 31 May 2022: Fix bom issue and improve fastener naming by @wavexx. Thanks!
  • V0.3.42 30 May 2022: Add left handed threads by @wavexx. Rfactoring csv2dict by @elysium31. Thanks!
  • V0.3.41 05 May 2022: Add NFE27-619 countersunk washer by @hpbmo. Thanks!
  • V0.3.40 30 Mar 2022: Change default ScrewToolbarGroupMode by @Roy-043. Thanks!
  • V0.3.39 27 Mar 2022: Fix body face selection and duplicate fasteners by @Roy-043. Thanks!
  • V0.3.38 15 Feb 2022: Add Package.xml issue #127. Code cleanup by @elysium31. Thanks!
  • V0.3.37 24 Jan 2022: Fix 'thread jump' issue #119
  • V0.3.36 29 Dec 2021: Fix custom die with 3d printing compensation bug. Thank you @balogh-attila!
  • V0.3.35 22 Dec 2021: Fix hang after counter sunk hole selection. Thank you @Roy_043!
  • V0.3.34 14 Apr 2021: Fix issue #93
  • V0.3.33 01 Apr 2021: Added DIN6912 screw. Thank you @Berberic2 !
  • V0.3.32 03 Sep 2020: Added custom screw length for pcb standoffs
  • V0.3.31 03 Sep 2020: Added custom length for pcb standoffs
  • V0.3.30 04 Aug 2020: Added inch fasteners, Thank you @slowinternets !
  • V0.3.22 01 Jul 2020: Fix nut thread creation, Thank you @ulrich1a !
  • V0.3.21 01 Jun 2020: Added Drop-down menu
  • V0.3.20 24 May 2020: Added ISO 4026, 4027, 4028, 4029 set screws, Die and threaded rod. Thank you @slowinternets !
  • V0.3.17 18 May 2020: Added ISO 7379 screws. Thank you @slowinternets !
  • V0.3.16 16 Apr 2020: Add Wurth PCB Spacers
  • V0.3.15 15 Apr 2020: Add Wurth PCB Standoffs
  • V0.3.14 13 Apr 2020: Add option for custom screw lengths
  • V0.3.13 20 Feb 2020: Add DIN 7984 screws, Thank you @Berberic2 !
  • V0.3.12 16 Feb 2020: Support multiple arrays and links when counting BOM
  • V0.3.11 02 Jan 2020: Take arrays into account when creating BOM.
  • V0.3.10 25 Jan 2019: Added 3D printer compatible thread generation.
  • V0.3.02 14 Jan 2019: Fix hole matching bug
  • V0.3.01 28 Dec 2018: Fix ISO4762 M4x10 generation issue (occ7.2).
  • V0.3.00 03 Sep 2018: Make WB compatible with Python 3 and Qt 5
  • V0.2.19 22 Aug 2018: Add DIN 985 - Nyloc nuts. issue #27
  • V0.2.18 13 Aug 2018: Fix ISO10642 & ISO14584 issues on v0.18. issue #25
  • V0.2.17 13 Jul 2018: Fix Bug: selecting a face to select all holes did not work.
  • V0.2.16 01 May 2018: Attaching to PartDesign features redirect the attachment to the parent body
  • V0.2.15 25 Apr 2018: Add DIN 562 and DIN 557 square nuts
  • V0.2.14 19 Jun 2017: Fix countersunk function bug. Merge Maurice's fix for screw generation
  • V0.2.13 01 Oct 2015: Add generation of BOM
  • V0.2.11 24 Aug 2015: Add inner/outer match attribute to screws. Fix several bugs
  • V0.2.10 23 Aug 2015: Add new command: Batch change fasteners parameters
  • V0.2.09 23 Aug 2015: Fixed screw creation bug when not attached to geometry
  • V0.2.08 06 Aug 2015: Add threaded rod item. Fix loading issue
  • V0.2.07 05 Aug 2015: Add option to select auto crew diameter matching method:
    by inner or outer thread diameter
  • V0.2.06 02 Aug 2015: Added hole diameter calculator helper.
  • V0.2.05 01 Aug 2015: Option to select type of screw for countersunk holes.
  • V0.2.03 30 Jul 2015: Separate option for grouping icons as toolbars or as drop-down buttons
  • V0.2.01 28 Jul 2015: Update to Ulrich's V2.0 screw maker. many more screws, and nuts with threads!
  • V0.1.04 21 Jul 2015: Drop-down buttons can be enabled in Preferences under Fasteners.
  • V0.1.03 15 Jul 2015: Disable drop-down buttons. It will be used only when screw items count will be too big.
  • V0.1.02 14 Jul 2015: Group screws in drop-down buttons (works for FreeCAD 0.16 and up)
  • V0.1.01 13 Jul 2015: Add a command to make recessed holes for countersunk screws.
  • V0.0.10 29 Jun 2015: Add PEM Metric Studs.
  • V0.0.09 28 Jun 2015: Selecting a face will put a fastener in all holes in that face.
    Caching of fasteners speed up generation of same shape ones
  • V0.0.08 27 Jun 2015: Edge selection over multiple objects when generating fasteners now works.
  • V0.0.07 26 Jun 2015: Add PEM Standoffs
  • V0.0.06 25 Jun 2015: Show only applicable M values and lengths, add descriptive name
  • V0.0.05 24 Jun 2015: Add simplify object function, Change icon colors
  • V0.0.04 23 Jun 2015: Add ISO 4032 Metric Hex Nut
  • V0.0.03 21 Jun 2015: Add PEM Metric Press-Nut (Self clinching nut)
  • V0.0.02 18 Jun 2015: Save/Load issue fixed
  • V0.0.01 18 Jun 2015: Initial version

Developers

  • ScrewMaker: Ulrich Brammer <ulrich1a[at]users.sourceforge.net> @ulrich1a
  • Workbench wrapper: Shai Seger @shaise

Feedback

For further discussion, feel free to open a forum thread on FreeCAD Open Discussion subforum and make sure to ping user 'shaise'.

There is also an ongoing thread discussing Fasteners Workbench that is also a place to comment on.

Translation

See TRANSLATIONS.md

Contributing

See CONTRIBUTING.md

License

GPLv2

freecad_fastenerswb's People

Contributors

alexneufeld avatar algtgv avatar apexarray avatar berberic2 avatar cfunseth avatar chennes avatar chrido avatar ea32 avatar easyw avatar elf128 avatar elysium31 avatar f3nix avatar fra589 avatar freecad-tools avatar hasecilu avatar hpbmo avatar johanar avatar kaktusus avatar luzpaz avatar maxwxyz avatar riqueenz avatar roundwolf avatar roy-043 avatar shaise avatar syres916 avatar tobiasfalk avatar wandrewkeech avatar wavexx avatar yakoyakoyokuyoku avatar yorikvanhavre 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freecad_fastenerswb's Issues

Problems with nut generation

Hi,
After clicking the ISO4032 nut or ISO4033 I'm getting a strange result. Screenshot attached.

Any idea what is going on?

EN1661 nut works as expected...

Cheers,
Mateusz

OS: Debian GNU/Linux unstable (sid)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5334 (Git)
Build type: Release
Branch: master
Hash: 4f6a50ac271b74381a69f411983ba2758082573a
Python version: 2.7.10
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.9.0

iso4032

can not start the Fasteners WB

OS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.1.
Build type: Release
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)

Error:

image

invalid literal for int() with base 10: '18.1'
Traceback (most recent call last):
File "", line 45, in Initialize
File "/home/rene/.FreeCAD/Mod/fasteners/FastenerBase.py", line 58, in
DropButtonSupported = int(FreeCAD.Version()[1]) > 15 # and int(FreeCAD.Version()[2].split()[0]) >= 5165

Problem with M30 DIN 975 threaded rod

I created an M30 x 20mm rod. Without threads, it is the proper length. However, when the threads are added, the bottom 2mm are missing. Continuing to test longer lengths, 21mm is correct but 22, 23 and 24mm all truncate at 21mm. 25, 26 and 27mm truncates at 24.5mm (approximate). 28mm is correct. That is the limit of my testing.

I did also try an M30 ISO 4762 Hex Socket Head Cap Screw and it did not exhibit any odd behavior, at least at those lengths.
Fasteners.zip

UNF/UNC threaded rod

Today I was in the need of unified thread standard rods. I patched screwmaker to generate me the 5/16-24 thread:
master...reox:master

I do not know much about inch threads but it seems they are quite the same as the metric ones (except withworth of course...)
So maybe it is worth to integrate more inch threads - but I think it will get quite messy because of all the patching of methods that rely on the metric character...
(if you want to take this seriously, I think you would need to add a lot imperial screws and nuts as well...)

So maybe someone want to take a look at this - or hint me to a workbench that has threaded rods in all variants (I would like to have trapezoidal as well...)

Enhancement; nut and bolts to fit when 3D printed and user adjustments

Currently when 3d printing parts with nuts and bolts, they don't fit together. Some testing shows the nut need to be scaled upward by 110% when printing, then they fit on the bolt thread. Standard nuts will fit a bolt properly.

enhancement requests

  • Nuts and bolts should work together virtual or printed by default.
  • Nice to have would be allow some tuning by the user for thread pitch, thread clearance (size the threads up or down a little bit and head size. (hex nut)
  • If you wanted to get fancy; add different head types like, philips, torx, star, etc.

Error: unknown dialect

Hello,

I have just installed the fasteners workbench through the addon manager but when I try to use it gives me an error saying unknown dialect. In report view the following appears:
unknown dialect
Traceback (most recent call last):
File "<string>", line 46, in Initialize
File "/home/luca-ivan/.FreeCAD/Mod/fasteners/FastenerBase.py", line 30, in <module>
from screw_maker import *
File "/home/luca-ivan/.FreeCAD/Mod/fasteners/screw_maker.py", line 136, in <module>
itemdict = csv2dict(itempath,fieldsnamed=True)
File "/home/luca-ivan/.FreeCAD/Mod/fasteners/screw_maker.py", line 116, in csv2dict
reader = csv.reader(data, skipinitialspace=True, dialect='unix', quoting=csv.QUOTE_NONNUMERIC)

It seems that there is an error with csv but I don't know how to solve it. I use Linux Debian and FreeCAD 0.18
Thank you for your time.

invalid literal for int() with base 10:unknown

Hey I downloaded your module and extrcted it to ~/.Freecad/Mod. If I start Freecad it says Fasteners loaded and it's shown in the Menu. But if I try to select it the above Error appears. How can i fix this?

[Feature request] Metric size M3.5 for screws and nuts?

I love the Fasteners Workbench, unfortunately I'm using M3.5 ISO-7380 screws in my project.
As I can see, there is no way to create such screw. So I'm forced to choose M3 or M4 screws...

The M3.5 size is very common for enthusiast of car/train/plane models, as well as for flying drones.
So it would be nice to have it also for:

  • ISO-7380 bolts with flange
  • Nuts with and without the nylon locking ring

Fix up the Fasteners FC wiki page

@yorikvanhavre is intent on having all workbenches have some representation on the wiki. The Fasteners WB is at www.freecadweb.org/wiki/Sandbox:Fasteners
Lets move it out of Sandbox and soup it up?

Also I wonder if there is a way for mediawiki to mirror the changelog for Fasteners on Github ? That way WB authors don't need to do double work when they modify their WBs (unless they add/remove feature(s) which then merits editing the wiki)

Error in CountersunkHoles

Not sure if this a problem with FreeCAD, my file or the plugin but i get this error. Not sure what it means but i thhought this would be the appropriate place to start.

nurbs configuration file loaded Mod pluginloader InitGui.py starting ... pluginmanager config file /usr/lib/freecad//Mod/plugins/pluginloaderconfig.yaml During initialization the error local variable 'fn2' referenced before assignment occurred in /home/dorian/.FreeCAD/Mod/pluginloader/InitGui.py Please look into the log file for further informationnot a freecad file: .STP not a freecad file: .STL Traceback (most recent call last): File "/home/dorian/.FreeCAD/Mod/fasteners/CountersunkHoles.py", line 557, in claimChildren objs.append(self.Object.baseObject[0]) <type 'exceptions.TypeError'>: 'NoneType' object has no attribute '__getitem__' Traceback (most recent call last): File "/home/dorian/.FreeCAD/Mod/fasteners/CountersunkHoles.py", line 557, in claimChildren objs.append(self.Object.baseObject[0]) <type 'exceptions.TypeError'>: 'NoneType' object has no attribute '__getitem__' Traceback (most recent call last): File "/home/dorian/.FreeCAD/Mod/fasteners/CountersunkHoles.py", line 557, in claimChildren objs.append(self.Object.baseObject[0]) <type 'exceptions.TypeError'>: 'NoneType' object has no attribute '__getitem__' Traceback (most recent call last): File "/home/dorian/.FreeCAD/Mod/fasteners/CountersunkHoles.py", line 557, in claimChildren objs.append(self.Object.baseObject[0]) <type 'exceptions.TypeError'>: 'NoneType' object has no attribute '__getitem__'

Fales to generate screw ISO4762 M4x10

Hallo,
it seems like you can not generate an ISO 4762 screw if you want it to be 10mm in length.
This error appears in the report view:

Traceback (most recent call last):
  File "C:\Users\thomas\AppData\Roaming\FreeCAD\Mod\fasteners\FastenersCmd.py", line 119, in execute
    s = screwMaker.createFastener(fp.type, d, l, threadType, True)
  File "C:\Users\thomas\AppData\Roaming\FreeCAD\Mod\fasteners\ScrewMaker.py", line 249, in createFastener
    return self.createScrew(type, diam, len, threadType, shapeOnly)
  File "C:\Users\thomas\AppData\Roaming\FreeCAD\Mod\fasteners\screw_maker.py", line 2197, in createScrew
    screw = self.makeIso4762(ST_text, ND_text,l)
  File "C:\Users\thomas\AppData\Roaming\FreeCAD\Mod\fasteners\screw_maker.py", line 3741, in makeIso4762
    headShell = aWire.revolve(Base.Vector(0.0,0.0,0.0),Base.Vector(0.0,0.0,1.0),360)
<class 'Part.OCCError'>: BRepAdaptor_Curve::No geometry

System:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)

PCB Metric Standoff

Hi, I am trying to use the PCB Metric Standoff, but it does not allow me to change settings freely. Only few options on the list.
For instance, I would like to create this one, but the lengths available are 10 mm and 12 mm. The length is a list and not an input field. There is no way to type 11 mm there.

image

ISO10642 & ISO14584 wrong direction socket pocket

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13780 (Git)
Build type: Release
Branch: master
Hash: 9fb122008b99ea2d30ed3e6f7cc93a3b7717cce5
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)

iso10642 iso14584

Install ulrich1a screw_maker Macro as Python Package

I created an issue in @ulrich1a screw_maker repository to publish the package on The Python Package Index (PyPI) so the Fasteners workbench can simply install it rather than maintain a copy-pasted file.

The FreeCAD Workbench Starter Kit has some discussion on how to do this, and some example projects using this pattern.

See Using pip and uploading your package to pypi sections in the README of the Workbench Starter Kit.

Any thoughts on this proposal?

Document createFastener Python API

It'd be helpful to document the valid types, diameters, and lengths that can be passed into createFastener.

Auto-Generating Documentation

It could be tedious to manually maintain API documentation for createFastener, and we don't really control this information as it comes from @ulrich1a screw_maker macro.

Therefore, we could auto-generate it somehow.

Maybe a generate_docs.py script that parses screw_maker.py into a MarkDown file.

Documentation Idea Example

My rough idea is to document the name, type, diameters, and lengths for each fastener in separate tables underneath a heading linked to by an inline anchor link at the top of page.

ISO4017

Name Type Diameters Lengths
Screw ISO4017 M1.6
M2
M2.5
M3
(M3.5)
M4
M5
M6
M8
M10
M12
(M14)
M16
(M18)
M20
(M22)
M24
(M27)
M30
(M33)
M36
(M39)
M42
(M45)
M48
(M52)
M56
(M60)
M64
2
3
4
5
6
8
10
12
14
16
20
25
30
35
40
45
50
55
60
65
70
80
100
110
120
130
140
150
160
180
200

ISO4014

Name Type Diameters Lengths
Screw ISO4014 TODO TODO

EN1662

Name Type Diameters Lengths
Screw EN1662 TODO TODO

EN1665

Name Type Diameters Lengths
Screw EN1665 TODO TODO

TODO

Name Type Diameters Lengths
Screw ISO2009
Screw ISO2010
Screw ISO4762
Screw ISO10642
Screw ISO1207
Screw ISO1580
Screw ISO7045
Screw ISO7046
Screw ISO7047
Screw ISO7048
Screw DIN967
Screw ISO7380-1
Screw ISO7380-2
Screw ISO14579
Screw ISO14580
Screw ISO14582
Screw ISO14583
Screw ISO14584
Washer ISO7089
Washer ISO7090
Washer ISO7092
Washer ISO7093-1
Washer ISO7094
Nut ISO4032
Nut ISO4033
Nut ISO4035
Nut EN1661
Nut DIN557
Nut DIN562
Nut DIN985
ScrewTap ScrewTap

ISO7046 Screw Fails to generate the screw

OS: Debian GNU/Linux 9.4 (stretch)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13721 (Git)
Build type: Release
Branch: master
Hash: afdd30b137cdfd096c61c4aee270025115d0f8d6
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Locale: English/UnitedStates (en_US)

Just pressing the button with no part associated. creates this error

Traceback (most recent call last):
File "/home/orion/.FreeCAD/Mod/Fasteners/FastenersCmd.py", line 119, in execute
s = screwMaker.createScrew(fp.type, d, l, threadType, True)
File "/home/orion/.FreeCAD/Mod/Fasteners/screw_maker.py", line 2203, in createScrew
screw = self.makeIso7046(ST_text, ND_text,l)
File "/home/orion/.FreeCAD/Mod/Fasteners/screw_maker.py", line 3452, in makeIso7046
recess, recessShell = self.makeCross_H3(cT, mH, ht)
File "/home/orion/.FreeCAD/Mod/Fasteners/screw_maker.py", line 5000, in makeCross_H3
crossFaces.append(crossShell.Faces[i])
<type 'exceptions.IndexError'>: list index out of range

Nyloc nuts

Nylon-insert nuts are missing. They are sized differently so standard nuts can't be used as a replacement.

[Feature request] 5/8 inch 27 threads per inch

Would it be possible to add generation for a 5/8 inch diameter with 27 threads per inch? This is for the US microphone stand thread.

I was looking at trying to do it myself but was hitting some issues with getting the code to build in my configuration.

I thought I'd seen a comment somewhere that this was something that was being looked at, but haven't been able to find it again.

readme mistake: "Data" tab should be "View"

To do so, first switch the "Display Mode" of the body from "Through" to "Tip". This can be found in the "Data" tab of the Body's properties panel. To continue editing the Body, switch back to "Through"

Should be "View" tab

Attaching fastener to a Body

Hi, just installed this WB: looking good!
Only issue is i can't click on a circle of a feature (in a body of Part Design Next) to attach fasteners. FC shows the fastener in the tree with an error message "Links go out of the allowed scope".

However, should i deselect everything, the fastener spawn at 0,0,0 and i can move it where i need. I lack the offset and flip though; Also i need to move every fastener whenever i modify my model.
Is this normal? Are there some workarounds?
I installed the WB through FC.

OS: elementary OS 0.4.1 Loki
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12412 (Git)
Build type: None
Branch: master
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: Italian/Italy (it_IT)

Fasteners/nuts/washers in arrays aren't counted in BOM

Fasteners/nuts/washers in an array aren't counted in BOM.
Fasteners/nuts/washers in a cloned compound aren't counted in BOM.
The same if fasteners/nuts/washers are converted in a structure (Arch/BIM Workbech).

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16110 (Git)
Build type: Release
Branch: (HEAD detached at upstream/releases/FreeCAD-0-18)
Hash: f7dccfaa909e5b9da26bf50c4a22ccca9bb10c40
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)

DIN 6912

Please include the screws DIN-6912.

No Fasteners Workbench show in Workbench

I use version 0.18 in Windows 10, after install it from Addon Manager, no Fastener show in Workbench.

The programs are stored in "C:\Users{User Name}\AppData\Roaming\FreeCAD\Mod\fasteners" already.

image

Thanks!

Does not coexist with the fork

Hi,
the fork (https://github.com/wieck/FreeCAD_FastenersWB/tree/scaling) can not be found via addon manager. There is only your FastenersWB. But you should find the fork according to its installation instructios in addon manager. However, manual instalation works and the WB is available in the dropdown list in Freecad. But if I also install your WB now, it behaves strange. The icon of the fork will be displayed, but your WB (where you can not scale) will load.
So both WB can not coexist (and yes, they are in different folders).

Please fix this issue so both Fastener WB's can coexist in the addon manager and also in freecad

Originally posted by @shIxx01 in #31 (comment)

Installing Latest Fasteners on Appimage errors

Running:

OS: Manjaro Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15671 (Git) AppImage
Build type: Release
Branch: master
Hash: 28cbe2bd8986701bb7404842cf60138957e23ed6
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

After installing latest Fasteners WB and restarting FC
Switching to Fasteners returns:

invalid syntax (ScrewMaker.py, line 258)
Traceback (most recent call last):
  File "<string>", line 45, in Initialize
  File "/home/beast/.FreeCAD/Mod/fasteners/FSScrewCalc.py", line 141, in <module>
    import ScrewMaker  

Invalid character initialization error

Hi,

When starting Freecad (FreeCAD_0.18.15150_Conda_Py3Qt5_glibc2.12-x86_64.AppImage) I get the following error:

During initialization the error invalid character in identifier (<string>, line 1) occurred in /home/tarax/.FreeCAD/Mod/fasteners/InitGui.py

Add comments to the size tables

I am using FreeCad to design a few things for my hobby. I need some weird threads mostly M9x0.5

I thougth to add these threads myself , but I cannot figure out what which size does in the tables.

some screws cannot be created in FC latest (11300)

with some screws (i.e. DIN967, ISO7045, ISO7046, ISO7047, ISO7048)
I get the following errors:

Traceback (most recent call last):
File "C:\Users\mau\AppData\Roaming\FreeCAD\Mod\fasteners\FastenersCmd.py", line 119, in execute
s = screwMaker.createScrew(fp.type, d, l, threadType, True)
File "C:\Users\mau\AppData\Roaming\FreeCAD\Mod\fasteners\screw_maker.py", line 2205, in createScrew
screw = self.makeIso7045(ST_text, ND_text,l)
File "C:\Users\mau\AppData\Roaming\FreeCAD\Mod\fasteners\screw_maker.py", line 2717, in makeIso7045
recess, recessShell = self.makeCross_H3(cT, mH, hcr)
File "C:\Users\mau\AppData\Roaming\FreeCAD\Mod\fasteners\screw_maker.py", line 5007, in makeCross_H3
crossFaces.append(crossShell.Faces[i])
<type 'exceptions.IndexError'>: list index out of range

PS thx for this nice WB
Maurice

Error creating thread in nut

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0

Error creating thread in M5 nut (ISO-4032, ISO-4033, ISO-4035).
Same error "makeIso4032" with (ISO-4032, ISO-4033, ISO-4035) nuts:

Traceback (most recent call last):
File "C:\Users\atnwe\AppData\Roaming\FreeCAD\Mod\fasteners\FastenersCmd.py", line 121, in execute
s = screwMaker.createFastener(fp.type, d, l, threadType, True)
File "C:\Users\atnwe\AppData\Roaming\FreeCAD\Mod\fasteners\ScrewMaker.py", line 264, in createFastener
return self.createScrew(type, diam, len, threadType, shapeOnly)
File "C:\Users\atnwe\AppData\Roaming\FreeCAD\Mod\fasteners\screw_maker.py", line 2230, in createScrew
screw = self.makeIso4032(ST_text, ND_text)
File "C:\Users\atnwe\AppData\Roaming\FreeCAD\Mod\fasteners\screw_maker.py", line 4655, in makeIso4032
nutShell = Part.Shell(nutFaces)
<class 'Part.OCCError'>: Shape is not a shell

Error creating thread in M5 nut (EN-1661):

Traceback (most recent call last):
File "C:\Users\atnwe\AppData\Roaming\FreeCAD\Mod\fasteners\FastenersCmd.py", line 121, in execute
s = screwMaker.createFastener(fp.type, d, l, threadType, True)
File "C:\Users\atnwe\AppData\Roaming\FreeCAD\Mod\fasteners\ScrewMaker.py", line 264, in createFastener
return self.createScrew(type, diam, len, threadType, shapeOnly)
File "C:\Users\atnwe\AppData\Roaming\FreeCAD\Mod\fasteners\screw_maker.py", line 2234, in createScrew
screw = self.makeEN1661(ND_text)
File "C:\Users\atnwe\AppData\Roaming\FreeCAD\Mod\fasteners\screw_maker.py", line 4825, in makeEN1661
headShell = Part.Shell(topFaces)
<class 'Part.OCCError'>: Shape is not a shell

At a choice DIN-557, DIN-562, DIN-985 the thread is not created with any size and without errors.

Threaded solids of revolution as first-class citizens

Threads are very widespread in technic, and there are even special conventions to mark threads on blueprints without drawing them.

So I guess that all bodies of revolution in freecad should have a property, making them as threaded. This may allow marking threads when making drawings, marking and showing threads without real rendering them in 3d (for example it is possible to apply a texture or a shader to show them) and importing threads from OpenSCAD (there is a library making threads, but nothing prevents us threat the symbols defined there as intrinsics) keeping them as metadata not a 3d model.

ISO 14584 Screw

OS: Ubuntu 16.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14779 (Git)
Build type: Release
Branch: master
Hash: 50ab6e292cc83cada4a5b071531a76f5a2580f60
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

There seems to be a problem with the ISO 14584 screws. The torx pattern is generated above the screw head, and the screw is generated as a hollow object. I tested the bug using all the available parameters and it appeared every time.

screenshot from 2018-09-21 10-13-13

screenshot from 2018-09-21 10-25-39

[Enhancement] Bolt-nut holes

Hi,

Since 3D printing is around our lives it is very common to design lots of parts to be printed. For assemblies it is also very common to create all kind of holes or grooves in order to fit bolts and nuts.
As it became a repetitive task, I created a holes/grooves library with a standard play of 0,3mm for easy accommodation of bolt/nuts and easy access for tuning the length of holes.
Here you have my library for better understanding it.

Do you think it would be a nice addition to include a parametric set of this "idea" into your workbench?

Attach Screw to Hole Programmatically in Python

I'd like to call createFastener after selecting a circular edge to attach a screw to a hole, but I'm getting the following error.

>>> sm.createFastener('ISO4014', 'M24', '120', 'simple')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/home/g/snap/freecad/8/.FreeCAD/Mod/fasteners/ScrewMaker.py", line 264, in createFastener
    return self.createScrew(type, diam, len, threadType, shapeOnly)
  File "/home/g/snap/freecad/8/.FreeCAD/Mod/fasteners/screw_maker.py", line 2263, in createScrew
    self.moveScrew(ScrewObj)
  File "/home/g/snap/freecad/8/.FreeCAD/Mod/fasteners/screw_maker.py", line 2280, in moveScrew
    for o in Gui.Selection.getSelectionEx():
NameError: global name 'Gui' is not defined

Screenshot

image

Based on the stack-trace, the error is coming from the following line of code:
https://github.com/shaise/FreeCAD_FastenersWB/blob/master/screw_maker.py#L2280

Should this be FreeCADGui instead of Gui?

I manually changed Gui to FreeCADGui locally, which fixed the error, but still didn't align the screw to the selected circular edge or hole.

Is this expected behavior? Any ideas on how to programmatically align the screw to a selected circular edge?

FreeCAD Version Information

OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16093 (Git)
Build type: Unknown
Branch: master
Hash: 690774c0effe4fd7b8d2b5e2fb2b8c8d145e21ce
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Locale: English/UnitedStates (en_US)

WB is fail to start when used with FreeCad 0.18.1

Traceback (most recent call last):
File "/home/vlad/.FreeCAD/Mod/fasteners/FastenersCmd.py", line 31, in
import FastenerBase
File "/home/vlad/.FreeCAD/Mod/fasteners/FastenerBase.py", line 58, in
DropButtonSupported = int(FreeCAD.Version()[1]) > 15 # and int(FreeCAD.Version()[2].split()[0]) >= 5165
<class 'ValueError'>: invalid literal for int() with base 10: '18.1'

Fixed locally casting FreeCAD.Version()[1] to float and then to int.

Error Step Export with use of Fasteners Workbench

I want to export my assembly module, but there occures an error. After some checks, i think it depends on the connection of the screw and the hole.
When i insert the screw directly to a hole. After that, i move the screw with drag & drop to my assembly-group (part). Now, i want to export as step-file, but an error occurs.
When i insert the screw without connection and move with drag & drop to the part. I connected it with the a2+ workbench. Here there is no error while exporting as step-format.

Does anybody have a similar Problem, or can handle this problem?
Thank you!

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.