Commit Graph

24 Commits

Author SHA1 Message Date
Jonas Bähr
e89fb4a92c PD: Fix error "duplicate command PartDesign_InvoluteGear"
Every time the InvoluteGearFeature python module was imported, and we're
in GUI context, the command "PartDesign_InvoluteGear" was registered. On
the 2nd (3rd, ...) time, this was reported as an error in the console,
like "error: Command.cpp(1841): duplicate command PartDesign_InvoluteGear"

The first import happens when the PartDesign FreeCAD Module is loaded,
via `InitGui.py`. Subsequent imports may happen when e.g. executing the
involute gear command or when running it's tests via FC's Test WB.

This change now registers the command only then the PartDesign WB is set
up in InitGui, not when importing the python module. The same fix is
applied for sprocket, where the same pattern for command registration
was used.

In addition, the import error catch was removed, which seems to be a copy
paste left-over from the ShaftWizard. In contrast to ShaftWizard,
involute gear and sprocket only use modules from the Python standard lib,
so I think this precaution is not worth the additional complexity, just
for hiding actual errors.
2024-12-09 11:53:23 -05:00
luz paz
674bd3d6ec PartDesign: fix header uniformity 2022-11-30 01:28:56 +01:00
Chris Hennes
3ef6e1c6d0 [OTHER] Catch only Exception, not BaseException 2021-02-11 11:52:45 +01:00
wmayer
55af73b07a PartDesign: [skip ci] if numpy fails to load due a RuntimeError then handle this exception but still load the workbench 2020-11-15 11:47:19 +01:00
Adam Spontarelli
1eef7064f8 Initial addition of fcsprocket feature. This is a PartDesign tool that allows for the simple creation of ANSI standard roller chain sprockets. 2020-04-20 12:28:27 +02:00
wmayer
67b5ee0931 now each module registers its unit tests itself 2018-08-28 13:14:16 +02:00
looooo
fa99f792e3 Py3: PartDesign: relative imports 2018-08-19 10:59:11 +02:00
looooo
84f8644244 py3: part-design: involute-gear 2017-04-27 13:17:51 -03:00
wmayer
381419c267 py3: ported PartDesign to python3 2017-03-01 17:19:33 +01:00
Priit Laes
da1081bc98 python: PartDesign: *.py: Fix python3 syntax 2017-03-01 17:19:24 +01:00
Stefan Tröger
12c5e1f92f remove hole feature
A hole feature is something needed, however, the current implementation does not use the attacher code which would made it intuitive and compatibel to other workbench tools. A reimplementation is needed.
2016-04-12 18:12:13 +02:00
jriegel
d59904fd37 some fixes 2016-04-12 18:12:02 +02:00
jriegel
015183a0d7 Error handling if NumPy is not there 2016-04-12 18:12:02 +02:00
jrheinlaender
0a743b27da Python code of Hole Feature 2016-04-12 18:11:56 +02:00
triplus
d432c72a15 Add SVG workbench icons 2016-02-26 23:17:43 +01:00
Sebastian Hoogen
e820a32653 issue #1701 2014-09-27 13:07:30 -03:00
wmayer
7c89591ff6 + allow to load PartDesign even if PySide is not found, suppress MinGW warnings 2014-08-30 23:26:29 +02:00
jriegel
6d1d55dc15 Implement the python gear feature 2014-02-16 22:19:59 +01:00
wmayer
f1f3151345 +Relicense from GPL to LGPL 2013-09-19 11:21:03 +02:00
wmayer
1b957e98bc Fixes for OCC 6.3 2012-12-04 11:32:30 +01:00
jrheinlaender
d6bd7f1a7d Added for bore feature 2012-12-04 10:59:45 +01:00
wmayer
6dddb653d3 Add icon to wizard shaft, error handling of missing python modules, slight changes to the wizard shaft command 2012-12-02 15:24:55 +01:00
jrheinlaender
5c1948d8b6 Created shaft wizard (moved here from PartDesign branch) 2012-12-02 13:29:05 +01:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00