Fasteners workbench based on screw-maker

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Giulio Buccini
Posts: 541
Joined: Fri Aug 26, 2016 9:07 pm
Location: Munich - Gemany

Re: Fasteners workbench based on screw-maker

Post by Giulio Buccini »

Hallo,

I can add the screws ISO-7380 or ISO-4762 to my project without problems. Nevertheless, if I try to modify the thread-size and/or the lenght, then I get an error:

________
Selection_8026.jpg
Selection_8026.jpg (21.78 KiB) Viewed 2776 times

This is what I read in the report view:

Code: Select all

19:12:30  Traceback (most recent call last):
  File "/home/giulio/.local/share/FreeCAD/Mod/fasteners/./FastenersCmd.py", line 478, in execute
    s = screwMaker.createFastener(self)
  File "/home/giulio/.local/share/FreeCAD/Mod/fasteners/./ScrewMaker.py", line 428, in createFastener
    return self.createScrew(screwTables[fastenerAttribs.type][FUNCTION_POS], fastenerAttribs)
  File "/home/giulio/.local/share/FreeCAD/Mod/fasteners/./screw_maker.py", line 153, in createScrew
    screw = eval(function)
  File "<string>", line 1, in <module>
  File "/home/giulio/.local/share/FreeCAD/Mod/fasteners/./FsFunctions/FSmakeCylinderHeadScrew.py", line 204, in makeCylinderHeadScrew
    headShell = Part.Shell(headFaces)
<class 'Part.OCCError'>: Shape is not a shell
19:12:30  Traceback (most recent call last):
  File "/home/giulio/.local/share/FreeCAD/Mod/fasteners/./FastenersCmd.py", line 478, in execute
    s = screwMaker.createFastener(self)
  File "/home/giulio/.local/share/FreeCAD/Mod/fasteners/./ScrewMaker.py", line 428, in createFastener
    return self.createScrew(screwTables[fastenerAttribs.type][FUNCTION_POS], fastenerAttribs)
  File "/home/giulio/.local/share/FreeCAD/Mod/fasteners/./screw_maker.py", line 153, in createScrew
    screw = eval(function)
  File "<string>", line 1, in <module>
  File "/home/giulio/.local/share/FreeCAD/Mod/fasteners/./FsFunctions/FSmakeButtonHeadScrew.py", line 205, in makeButtonHeadScrew
    screwShell = Part.Shell(headFaces)
<class 'Part.OCCError'>: Shape is not a shell
19:12:30  Recompute failed! Please check report view.
Any clue? :?
--------------------------------------------------

Code: Select all

OS: Ubuntu 16.04.7 LTS (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.21.30377 (Git) AppImage
Build type: Release
Branch: master
Hash: 2462f4c7a05745488bb9e81ccc7ba0f386f78849
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US) [ OS: English/United States (en_US) ]
Installed mods: 
  * fasteners 0.4.16
  * Curves.backup1666112221.8799047
  * sheetmetal.backup1665679793.2838469
  * sheetmetal 0.2.58
  * A2plus 0.4.59e
  * toSketch 1.0.1
  * Curves 0.5.12
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Fasteners workbench based on screw-maker

Post by Roy_043 »

Has been reported before. Uninstall the Fastener workbench and then reinstall it.
Last edited by Roy_043 on Sat Oct 29, 2022 5:50 pm, edited 1 time in total.
Giulio Buccini
Posts: 541
Joined: Fri Aug 26, 2016 9:07 pm
Location: Munich - Gemany

Re: Fasteners workbench based on screw-maker

Post by Giulio Buccini »

Uninstall/reinstall the Fastener workbench only, yes? :oops:
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Fasteners workbench based on screw-maker

Post by Roy_043 »

Sorry for being unclear, I have edited my previous message.
Giulio Buccini
Posts: 541
Joined: Fri Aug 26, 2016 9:07 pm
Location: Munich - Gemany

Re: Fasteners workbench based on screw-maker

Post by Giulio Buccini »

It works now. :)
Thanks!
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Fasteners workbench based on screw-maker

Post by mario52 »

Hi @shaise

I have translated (worked with @openBrain ) the text for the language "fr" and "it" and one problem is appeared :

all text contain the

Code: Select all

>>> ord("—")
8212
fastener_traduction01.png
fastener_traduction01.png (9.77 KiB) Viewed 2604 times

hare not translated , the problem concern all traduction present in "translation" folder

i have modify this character with a simple dash "-" instead "—" for solve the problem

if you hare interested , here the zip with the correction (i change this character by "-"),

the modification for:

(version_fasteners_0-4-24_03-12-2022)
(replace "—" by "-")

FastenersCmd.py
lines 126, 127, 134, 135

Code: Select all

    "GOST1144-1": (translate("FastenerCmd", "GOST 1144 (Type 1) Half - round head wood screw"), SlottedGroup, ScrewParametersLC),
    "GOST1144-2": (translate("FastenerCmd", "GOST 1144 (Type 2) Half - round head wood screw"), SlottedGroup, ScrewParametersLC),
    
    "GOST1144-3": (translate("FastenerCmd", "GOST 1144 (Type 3) Half - round head wood screw"), HCrossGroup, ScrewParametersLC),
    "GOST1144-4": (translate("FastenerCmd", "GOST 1144 (Type 4) Half - round head wood screw"), HCrossGroup, ScrewParametersLC),

(here replace "—" by "-") and compile

compile_qm.py
create_ts.py
fasteners_es-ar.qm
fasteners_es-ar.ts
fasteners_es-es.qm
fasteners_es-es.ts
fasteners_fr.qm
fasteners_fr.ts
fasteners_it.qm
fasteners_it.ts
fasteners_pt-br.qm
fasteners_pt-br.ts
fasteners_pt-pt.qm
fasteners_pt-pt.ts
fasteners_ru.qm
fasteners_ru.ts
files.txt
update.sh


EDIT: 15h09 Paris new version corrected the fr file for translate "Scale" in preferences

EDIT: 04/12/2022 19H14 Paris: adding it language and update "create_ts.py" and "update.sh" abd (fr + it)

now not problem in all language

thanks

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
Evgeniy
Posts: 477
Joined: Thu Jul 15, 2021 6:10 pm

Re: Fasteners workbench based on screw-maker

Post by Evgeniy »

@mario52
I can't figure out what kind of error causes a long hyphen?
If from the point of view of grammar, then the standard contains a long dash in the name. And it was just copied as is.
Everything seems to translate perfectly and work.

I can prepare a Pull-Request.
You have a github account?

The fact that you put dots at the end of each line is literate from the point of view of grammar.
But when these lines are displayed in the interface with dots, it looks a little strange.

Pref.png
Pref.png (12.13 KiB) Viewed 2426 times

I strongly recommend that you use the QT Linguist utility, it highlights all questionable or not quite accurate punctuations. Also, with the help of this utility, it is convenient and easy to make a "Release" of the translation.

QTL.png
QTL.png (64.57 KiB) Viewed 2418 times

Also, QT Linguist has detected duplicate strings in your files... you may have done the translation using notepad.

Error.png
Error.png (7.2 KiB) Viewed 2418 times
User avatar
Evgeniy
Posts: 477
Joined: Thu Jul 15, 2021 6:10 pm

Re: Fasteners workbench based on screw-maker

Post by Evgeniy »

I put the big dash back and as you can see everything translates perfectly. It seems to me that you simply forgot to make a Release at a certain point in the translation or got confused during the translation process.

But I'm a bit confused by the colon signs ":" in the menu. Does it really have to be like this? And somewhere string ends with a dot "." , and somewhere a colon ":" ... It's looks a kind of weird.

Is this normal?

Fixed.png
Fixed.png (50.89 KiB) Viewed 2408 times
User avatar
Evgeniy
Posts: 477
Joined: Thu Jul 15, 2021 6:10 pm

Re: Fasteners workbench based on screw-maker

Post by Evgeniy »

@mario52 you can download and test your fixed translations from here:
https://github.com/FreeCAD-Tools/Fasten ... ranslation

If all ok. I will make Pull - request.
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Fasteners workbench based on screw-maker

Post by mario52 »

Hi

for the big dash back the error return with your change

(not forgot to include FastenersCmd.py is also modified see below)

fastener_traduction01.png
fastener_traduction01.png (82.45 KiB) Viewed 2291 times

for the ":" , as the original text

for the final point "." and certain ":" ok i have adding you can delete it

fastener_traduction02.png
fastener_traduction02.png (16.61 KiB) Viewed 2291 times

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.31155 (Git)
Build type: Release
Branch: master
Hash: 6f1b29769b33676edca2bd883b80bed25a0758c8
Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: French/Mars (fr_MA)

thank for the revision

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
Post Reply