Commit Graph

206 Commits

Author SHA1 Message Date
Jonas Bähr
69ff30d65e gitignore VIM swap files 2021-10-23 01:43:24 +02:00
lorenz
3c86d12dc7 fix lgtm allert 2021-09-30 18:12:29 +02:00
Jonas Bähr
d489dfb841 Fix crown gear preview mode in PartDesign Bodies
Previously, the `preview_mode` of the crown gear returned a compound of
the base and the cut-outs. This caused problems in PD::Bodies where a
single solid is requried.
The solution in this commit changes the preview_mode to only output the
base, not generating the cutout shapes at all. This is consistent with
the involute gears having "simple=true" and saves again 0.5 Seconds
processsing time on my system using defaults (15 teeth, 4 loft profiles).

In addition, "preview = false" is also speed up by first collecting all
cut-outs, and then passing them all at once to a single cut operation.
This reduced the cutting time from 3.0 Seconds to 2.2 Seconds here.
So preview now generats the shape immediately (0.0008s vs 0.5s) and the
actual crown is generated in 2.7s instead of 3.5s (again, using the
defaut parameters, measued via Python's time.perf_counter).
2021-07-25 16:33:58 +02:00
Jonas Bähr
1b19d16264 Extend the "additiveness" to all gears when used in PD:Bodies
There are still some issues when the generated Shape is not a solid,
e.g. in the preview mode of the Crown Gear.
2021-07-25 16:33:58 +02:00
Jonas Bähr
d5e12ef116 First proof of concept of "additive gears" in PartDesign bodies
In this PoC only the involute gears work, and there is still a lot of
cleanup pending.
What does work, however, is that those gears now play nicely with
PartDesign's concept of stacking features onto each other, i.e. that the
result of a feature is the fusion of all previous ones.

Special Thanks goes to DeepSOIC for his tutorial in the forum at [1] as
well as this Part-o-Matic which showed me how this works in real live [2]
[1]: https://forum.freecadweb.org/viewtopic.php?f=22&t=21097#p163340
[2]: https://github.com/DeepSOIC/Part-o-magic/blob/master/PartOMagic/Features/PartDesign/PDShapeFeature.py
2021-07-25 16:33:58 +02:00
lorenz
2c07938e0d Remove Attachment deprecation warning for version >=0.19 2021-07-05 00:01:02 +02:00
looooo
6c6176b089 conditional to supress eprecation warning in 0.20 2021-07-04 21:54:00 +02:00
Jonas Bähr
7934657993 Make all gears attachable
The logic for attaching, repositioning and backward-compatibility check
was moved to the already existing base class.
2021-07-04 21:53:11 +02:00
Jonas Bähr
bc285f1ad4 Make Involute Gears Attachable
Heavy-lifting done using the "Part::AttachExtensionPython" extension
cf. https://wiki.freecadweb.org/Scripted_objects_with_attachment
Objects greated with earlier versions are automatically updated on
recompute.
Other types of gears not touched yet.
2021-07-04 21:53:11 +02:00
Jonas Bähr
765603dc1e Make the new properties backward compatibile
By checking whether the additional properties are available, gears
created with earlier versions can still be manipulated in FreeCAD.
And when first touching an older gear, it gets updated with the new
additional properties.
2021-06-11 20:21:43 +02:00
Jonas Bähr
4c8d1e672b Expose outside and root diameter to freecad
The values are already calculated by pygear and this change make them
available as properties in FreeCAD.
The naming should be in line with the rest of fcgear's nomenclature,
derived from https://qtcgears.com/tools/catalogs/PDF_Q420/Tech.pdf
2021-06-11 20:21:43 +02:00
lorenz
ffe86c85e8 Warnung -> PrintWarning 2021-02-17 13:40:45 +01:00
lorenz
ef4622e015 importError->ImportError 2021-02-17 12:23:24 +01:00
bevin
8b0d8e999e fix cam rotation fails for odd number teeth 2020-11-19 11:23:22 +01:00
bevin
ee40235fdc allow center hole radius to be zero, and bugfix for previous patch 2020-11-19 11:23:22 +01:00
bevin
aa3fa561a1 Update features.py
pin circle diameter actually used as radius in calculation
2020-11-15 22:02:09 +01:00
looooo
7b2fb1b429 increase version 2020-11-12 10:11:05 +01:00
looooo
f9feb65c70 add version-property to gears, define bevel-gear module at bigger end 2020-11-12 10:10:46 +01:00
looooo
ccdfad4a90 crowngear: properties: preview_edit -> preview_mode 2020-10-13 15:14:35 +02:00
looooo
e3df129b2f crowngear: property construct -> preview_mode 2020-10-13 15:08:31 +02:00
lorenz
830eb5e9f0 crown-gear: rename property construct ->editing-preview 2020-10-13 15:04:27 +02:00
looooo
5a9e17b29b wormgear: add property for reversed helical extrusion 2020-10-04 21:59:56 +02:00
looooo
6172eae385 pygears: fix profile 2020-09-30 17:26:52 +02:00
looooo
16b4c47402 minimal fix 2020-09-22 14:43:25 +02:00
Zheng, Lei
ffbbcd897f Fix adding object to PartDesign::Body 2020-09-22 14:37:16 +02:00
looooo
5e1b40834f grouping properties 2020-09-09 11:56:44 +02:00
looooo
b8e9fdcb93 fix typo 2020-09-09 11:50:55 +02:00
looooo
ef5c72e926 involute-gear: property docs 2020-09-09 11:17:40 +02:00
lorenz
4f94009f78 Update features.py 2020-09-09 09:21:33 +02:00
looooo
af0670e11d typo: cycloide->cycloid 2020-09-03 11:26:33 +02:00
looooo
95f0ed76ab typo: cycloide -> cycloid 2020-09-03 11:20:58 +02:00
looooo
081aa5fcea HypoCycloidGear: use bsplines 2020-09-03 11:10:49 +02:00
bevin
2b3ece4697 when all shapes are invisible, keep old shape 2020-09-02 17:23:51 +02:00
bevin
3875028685 bugfix and optimization 2020-09-02 17:23:51 +02:00
bevin
ce46429f6a overall fine now 2020-09-02 17:23:51 +02:00
bevin
933d962dc6 WIP for hypocycloid disk creation 2020-09-02 17:23:51 +02:00
looooo
beb484ea64 pep8 function 2020-08-30 09:37:42 +02:00
looooo
19a826cf1b remove gui commands if no gui is available 2020-08-30 04:49:12 +02:00
looooo
4d16094b25 typo: rename example latern -> lantern 2020-08-24 22:23:44 +02:00
lorenz
5a2c4006d0 Update README.md 2020-08-24 22:22:14 +02:00
looooo
47dcf319f3 cosmetics 2020-08-24 21:51:42 +02:00
looooo
3e996f7bfa fix typo: latern-gear -> lantern-gear 2020-08-24 19:13:20 +02:00
looooo
242a48c980 modify image-size 2020-08-14 22:20:03 +02:00
looooo
78cb8f15cd docs: add images 2020-08-14 22:18:16 +02:00
looooo
8c7f3d3217 docs: add images for crown-gear and worm-gear 2020-08-14 17:05:00 +02:00
looooo
3c9da544f3 update readme 2020-08-06 22:53:13 +02:00
looooo
8776062f18 Merge branch 'master' of https://github.com/looooo/freecad.gears 2020-08-05 10:09:59 +02:00
looooo
db46e79734 icons and names 2020-08-05 10:09:45 +02:00
lorenz
2827d1dbd9 Update README.md 2020-08-05 09:58:57 +02:00
looooo
bc075eb6ff examples: smaller images 2020-08-05 09:57:59 +02:00