Commit Graph

24 Commits

Author SHA1 Message Date
Jonas Bähr
e8bdb19a65 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
9e6af70140 PartDesign: fix header uniformity 2022-11-30 01:28:56 +01:00
Chris Hennes
6b16e12d7c [OTHER] Catch only Exception, not BaseException 2021-02-11 11:52:45 +01:00
wmayer
596077cf67 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
67f37b3d90 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
1d11f742ca now each module registers its unit tests itself 2018-08-28 13:14:16 +02:00
looooo
1b3e23d768 Py3: PartDesign: relative imports 2018-08-19 10:59:11 +02:00
looooo
6db628f398 py3: part-design: involute-gear 2017-04-27 13:17:51 -03:00
wmayer
3507c97963 py3: ported PartDesign to python3 2017-03-01 17:19:33 +01:00
Priit Laes
f7bf88a0b8 python: PartDesign: *.py: Fix python3 syntax 2017-03-01 17:19:24 +01:00
Stefan Tröger
23ebdda871 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
0307a73c04 some fixes 2016-04-12 18:12:02 +02:00
jriegel
119765ba96 Error handling if NumPy is not there 2016-04-12 18:12:02 +02:00
jrheinlaender
44fdff91f5 Python code of Hole Feature 2016-04-12 18:11:56 +02:00
triplus
93c7a6bcac Add SVG workbench icons 2016-02-26 23:17:43 +01:00
Sebastian Hoogen
9ad67346cc issue #1701 2014-09-27 13:07:30 -03:00
wmayer
9c534e181c + allow to load PartDesign even if PySide is not found, suppress MinGW warnings 2014-08-30 23:26:29 +02:00
jriegel
9620336b60 Implement the python gear feature 2014-02-16 22:19:59 +01:00
wmayer
3590e6fc7b +Relicense from GPL to LGPL 2013-09-19 11:21:03 +02:00
wmayer
18a365ca00 Fixes for OCC 6.3 2012-12-04 11:32:30 +01:00
jrheinlaender
2b4851b346 Added for bore feature 2012-12-04 10:59:45 +01:00
wmayer
21b657004c 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
4e715afffc 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