[Revival] Bolt -> Fastener Factory + realtime update any time + ISO support

Update

  • Smaller fasteners by default: scale factor allows redefining how many blender units relate to 1mm. By default now .001 such that we at worlddevelopment change this setting back to 1 while you can enjoy the 1 mm := .001 bu = 1 blender.mm setting.

  • Finally correct lengths (= shank, thread heights). Had been off by 2mm before.

  • Support for standards ISO 225, ISO 888.

  • Sort presets in the GUI properly (e.g. …, M6, M8 before M10, M12, …)

  • Split existing presets into fine, coarse

  • Added M16, M20.

  • Performance fixed. This did take longest … colleagues, it’s done. This was an important fix saving our time.

  • module name issues fixed:
    Okay from now on the folder name no longer is important. Used . for relative inclusion of necessary references. Long live dynamic code. Thanks comrades for your help.

=> Should work now even without removing the “-master” suffix when downloading the .zip from the repository! Using Git for acquiring the code is still the preferred way though because it allows easier update to a more recent or stabler version and permits to contribute back.

Fixed bug that prevented customizing the settings.

Now properly displays “custom” in the preset field when editing parameters.

The realtime, settings persistence functionality was a feature I had on my wishlist since long. Now I just coded it myself. Long live open source. For a better world.

Hi faerietree,Thanks for this new addon and congratulations.
But the file name must be fastener_factory only without Blender and addon and uppercases.
It is the convention file names in python and with Blender Foundation too.
If you want study the convention, observe the addons folder with Blender, there are use to store addons, please.

But your addon is great tools for Blender. Good Luck…:eyebrowlift:

It allows turning any object into a fastener, too.

Thanks man. Is still a relict from older versions. Is currently renamed to “add_mesh_fastener” to follow blender addon standards.

have fun

Installed it, then got this error message when trying to enable the addon:

File “C:\Users\Dave\AppData\Roaming\Blender Foundation\Blender\2.77\scripts\ad
dons\add_mesh_fastener-master_init_.py”, line 35, in <module>
from add_mesh_fastener import Boltfactory
ImportError: No module named ‘add_mesh_fastener’

Solution for this problem: Keep the name exactly as it is! Don’t rename the folder because it is the module name!

Update

  • Split existing presets into fine, coarse
  • Added M16, M20.
  • Performance fixed. This did take longest … colleagues, it’s done. This was an important fix saving our time.

So for you this means to remove the “-master” from the folder name. Git repositories don’t need be named after the branch. Switching branches is always possible - even when the files are modified by using git stash save, pop.

Hi faerietree,

many thanks for the plugin.

I have remove the “-master” from the folder, now it works.
But I have no presets. Missing paths

Any tips?

WIN 7
Blender 2.77 (23.04.2016)

Check the screenshot¹ from the README on the Github repository.
The new settings are persistent and therefore stored per Object.

This means the settings are located in the Properties panel in the Object tab.
Have fun.

And no problem, for gals, guys that help make this world a better place I do what I can get out of me.

¹

In the Tool shelf (T) there are no operator presets because the code is designed to be as dynamic as possible and uses PointerProperty and PropertyGroup where common blender operator presets can not be used easily to my knowledge (preventing the commit of Brendon Murphy being merged).

If someone knows if operator presets can be used to populate PointerProperties too, then we might be able to use the blender presets (and not the custom code as it is currently).

Hi faerietree,

many thanks, it works.

One little question.
Every Nut or Bolt jump back to Postion 0 0 0 if I changed Parameters.

Is this normal or a little bug?

Should jump to where the 3D cursor is.

Actually this may be considered a bug. Maybe should add an option to toggle this and have it off by default.

Alternatively as a workaround for now just group your parts (recommended for engineering, architecture in blender because it makes exchanging many same bolts at once a charm).

The group can be instanced via SHIFT A -> Add group instance …
This instance then can be placed without reset when changing the bolt.

That would be nice.
Or stay at the place where he is.

The group can be instanced via SHIFT A -> Add group instance …
This instance then can be placed without reset when changing the bolt.

Thanks for the workaround

Colleague, you were right. Thanks for reporting.

This behaviour is fixed in the newest revision. Now positions the object at the 3D cursor only when adding a new bolt object, no longer on update.

You may want to re-clone the repository or use

git pull --force

or even more preferred (because it keeps the history linear):

git fetch --all
git checkout origin/master  # switch from your local master to the origin master
git branch -D master; git branch master HEAD  # make your local master branch point to where origin/master points

because I forgot to give credit to you for reporting and had to amend this commit several time. I’m a nasty man.

Top-notch faerietree add_mesh_fastener is excellent!
I download your last release so…
Good Luck…

EDIT: The accuracy of your objects is top: very good job.

That’s great!

Thank you very much!

@Spirou4D: It is not me that should be honoured, Aaron Keith is the one to admire for the Bolt, Nut math models. Maybe he can add more fastener types like Nails, …
Me personally I’ve not even had planned to code the dynamic solution until last Sunday. :smiley: It was just an intermezzo in the bigger picture when I created bolts as standard parts for the voice controlled vertical open source gate by world developers.

Thanks for the addon!

The problem is that when you download the .zip from github, the folder is decompressed as “add_mesh_fastener-master”, and it should be “add_mesh_fastener”
Could you use some kind of wildcard in the code so that the folder name “add_mesh_fastener-master” also be accepted?

Really helpful addon :slight_smile:

Nice one, like it.
Thank you

Didn’t know that. Thanks for pointing out. I blamed the -master suffix on some Git client program but now that you tell me it is the downloadable release archive, that’s a bummer.

Just checked if there is a way to include a module via wildcard or regex but it’s not possible currently in python. One could get rid of the module and put it in one python file. Or maybe we can use name or something, I’ll check.

@matali, burnin: nice to hear the program at least helps a bit.