Commit Graph

71 Commits

Author SHA1 Message Date
Syres916
49e214729c Part/Toponaming: makeElementWires
* Added tests developed by Syres916
2024-06-26 10:46:36 -05:00
bgbsww
3c3709cb5d Toponaming: Fix save and restore of elementmaps 2024-06-23 23:33:12 -04:00
bgbsww
4c3fc869fe Toponaming: Check for selection mapped element name 2024-06-22 17:10:54 -05:00
Florian Foinant-Willig
0b4e01047f Fix can't pad a sketch on datum plane (#14397)
* Fix can't pad a sketch on datum plane

* Add a unit test for Pad a sketch on datum plane
2024-06-10 11:21:32 -05:00
bgbsww
040502280f Toponaming: Cleanup verified face calls 2024-05-20 17:48:01 -05:00
bgbsww
9decb98c71 Toponaming: adjust tests 2024-05-18 14:12:04 -05:00
bgbsww
2657bbee4d Minor test tweaks, and small fixes to pass tests 2024-05-17 19:14:01 -05:00
bgbsww
b72a8c4222 Toponaming: Bring in Chamfer, Fillet code and add tests (#14035)
* Toponaming: bring in missing code fragments in Sketcher

* Toponaming: Fix infinite recursion, remove debug cruft, rough in fillet test

* Bring in missing code; fix chamfers

* Toponaming: Add code for fillets and test
2024-05-15 19:43:30 -04:00
bgbsww
45c4aefaae Rework makeElementChamfer to match current parms, and add PartDesign code for Chamfers 2024-05-12 13:28:20 -05:00
bgbsww
71d96bccac Fix tests, slip in TNP defense 2024-05-07 13:42:21 -04:00
bgbsww
8fff92618c Toponaming/Part: Fix fillet/pad bug, add tests 2024-05-07 09:40:48 -04:00
bgbsww
2bff3f5343 Lint corrections 2024-05-03 12:07:02 -04:00
bgbsww
d861b81c51 Merge branch 'main' into bgbsww-toponamingMissingAppMethods 2024-05-02 22:43:36 -04:00
bgbsww
ad0cb61656 Toponaming/Part: unify revolution changes 2024-05-02 18:50:02 -05:00
bgbsww
f9b65e563d Test for changed Sketches avoiding TNP 2024-05-01 20:29:26 -04:00
bgbsww
fa8f29aed4 Toponaming/Part: Fix all getBaseTopoShape calls. Tests and missing code. 2024-04-26 21:15:11 -05:00
bgbsww
c988c4b65e Merge branch 'main' into bgbsww-toponamingFeatureDressup10399 2024-04-14 18:16:03 -04:00
bgbsww
3d1f6199c4 TopoNaming/PartDesign: Implement shapebinders 2024-04-14 17:13:14 -05:00
bgbsww
2e859100a9 Merge branch 'main' into bgbsww-toponamingFeatureDressup10399 2024-04-14 18:08:58 -04:00
Chris Hennes
d1c5de6e06 Merge pull request #13401 from bgbsww/bgbsww-toponamingPD6FeaturePrimitive
Toponaming/Part:  Enhance testing for  primitive features
2024-04-14 16:21:38 -05:00
bgbsww
a88e7baff5 TopoShape/Part: Bug fixes; pass Hasher parms, OCCT 7.8 compatibility, ElementMaps correct item count 2024-04-14 13:56:07 -04:00
bgbsww
2eb4689996 Toponaming/Part: Add Pad test, cleanup 2024-04-14 07:10:27 -04:00
bgbsww
6291078939 Toponaming/Part: Initialize the hasher so that it operates 2024-04-13 22:41:57 -05:00
bgbsww
11b4d218bd Toponaming/Part: Enhanced testing for FeaturePrimitives 2024-04-12 10:32:05 -04:00
bgbsww
b471435bc5 Toponaming/Part: Add Pad test, cleanup 2024-04-12 10:32:05 -04:00
bgbsww
5f2c412cfa Toponaming/Part: Clean and add tests 2024-04-11 11:30:04 -04:00
bgbsww
83ea7e4355 Upgrade Toponaming tests 2024-04-09 16:19:07 -05:00
bgbsww
252707a803 Add an initial test to show TNP (#13233)
* Add an initial test to show TNP

* Add documentation, make review tweaks

* Quiet Lint
2024-04-03 16:53:58 -05:00
Florian Foinant-Willig
c7d85ff9d9 [PartDesign] Still a helix fix (#12977)
* [PartDesign] Still a helix fix

If we don't break the helix path at each turns we get a vaild path for
MakePipe (solid) even with an angle.

* Decrease helix tests requirements
2024-03-25 18:31:20 +01:00
Josh Coalson
a8ae56e06a Part: Rename AttachExtension::Support property to AttachmentSupport, to avoid name conflict with base features. Fixes #7052 2024-03-04 18:22:43 +01:00
wmayer
8173e4474b Tests: use the correct value as reference 2024-02-27 08:47:47 -06:00
wwmayer
d3049deaa9 PD: Add test for helix (#11601)
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-01-10 07:26:18 -06:00
bgbsww
bf3ccbc5b6 Correct mistaken Helix patch; use MakePipe for frenet for speed; add tests (#11598)
* Cleanup and switch to using MakePipe

* Cleanup unused include

* Use Frenet mode in building pipe

* Restore original code, add a control property

* Hide property, and init on new objects

* Restore prior behavior for legacy objects

* Clean up git blame; add missing move to keep helix same with new makePipe call

* Remove debug include

* Use doxygen syntax for deprecation comment

* Add unit tests; restore code for angled helixes; optimize zero angle helixes

* Lower test precision to accept platform variations

* Loosen more

* Correct restoration

* Tweak test volumes to match restored helix creation

* Restore helix generation parameter

* Fix test; delint
2024-01-08 13:43:38 -03:00
wmayer
1245c3f3b2 Python: deprecated aliases have been removed in Py 3.12 2023-12-02 14:45:55 +01:00
Jonas Bähr
9404c032f4 PD: Implement Profile Shift for InvoluteGear
This commit adds the ability to shift the involute profile inside or
outside. Profile shift is implemented as coefficient, i.e. normalized by
the module, so that it the whole profile scales with the module without
chaning shape.
To verify the profile, the tests implement an "over pins measurement"
using formulae found in literature.
Backward compatibility with FreeCAD-v0.20 is garanteed by already
existing tests, not touched by this commit.

This addresses issue #5618.
2023-03-17 22:22:34 +01:00
Jonas Bähr
4eafedb20f PD: Harmonize ExternalInvoluteGear and InternalInvoluteGear
There has been lots of duplicated code between those two, and the recent
changed introduced even more copy/paste code. This commit consolidates
both implementations. The two "public" entry points, `CreateExternalGear`
and `CreateInternalGear` have been kept and now call a shared helper.
2023-03-13 22:10:41 +01:00
wmayer
8532c96c20 PD: add unit test for PR #8763 2023-03-10 19:23:03 +01:00
wmayer
eb01e31174 PD: add unit test for issue #6156 or PR #8748 2023-03-10 19:05:50 +01:00
Jonas Bähr
d0b5b5fb6c PD: Fix exception from InvoluteGear with zero fillets
While gears without a root fillet may have limited real-live use cases,
during number-input it happens regulary to have a zero fillet radius as
intermediate state. With this commit such a situation is now handled
gracefully.
2023-02-26 23:28:33 +01:00
Jonas Bähr
5fa3e021e8 PD: Fix the internal InvoluteGear's root/tip arc directions
The arcs on the tip (around the addendum) and the root (between the
fillets) used to have their bulge in the wrong direction for the internal
gear profile: their center points has been on the outside.
Since this error existed since the very first introcution of the internal
gear I assume this was done by accident: Instead of only the fillets, all
arcs have been inverted when the external profile was copied.
This commit now inverts the tip and root arcs again, to be concentric
with the pitch circle -- same as for the external profile.
2023-02-23 12:49:10 +01:00
Jonas Bähr
4a77843845 PD: Improve InvoluteGear's fillet generatrion
Previously, the fillet started at a fixed value, tailored at 20° pressure
angle, a fillet radius of 0.375 and a dedendum of 1.25. With PR #8184
those values became user-adjustable and thus the assumptions of the
original code are not fullfilled any more. This resulted in significant
artefacts, especially for higher pressure angles or smaller dedendums as
commonly found in splines.

This commit actually calculates the junction between fillet and involute
so that the tangents of the both curves match.
The mathematical approach is described in source code comments.

The change in the fillet calculation also affects compatibility with
files generated by earlier versions of FreeCAD. Those changes are way
below 0.1% per tooth, however the earlier test required absolute equality
down to the micron. This was relaxed and also changed to a relative, per
tooth, tolerance.

There is one particular case where the new algorithm performs slightly
worse, though. That is when the fillet radius is too large to the
dedendum, i.e. resulting in a single arc instead of two fillets, and
effectively cannibalizes some of the clearance. This happens with internal
gears having less than 25 teeth. At about 15 teeth it becomes visible
that the fillet is not 100% tanget any more. However, as such a low
number of teeth is highly unusual for internal gears and the effect,
although noticeable, is minor, the overall benefits of the new algorithm
outweighs the drawbacks. And now with the fillet radius being adjustable
it is easy to fix, too.
The technical reason is that the tangency is calculated correctly, but
the fillet circle is displaced aferwards to avoid an overlap of the two
fillets. For the new fillet position, the tangents do not align any more.
2023-02-13 02:31:28 +01:00
Jonas Bähr
464c512e83 PD: Make involute gear's root fillet radius configurable
The original implementation always took 150% of the addendum/dedendum
difference as fillet radius. For a standard full-depth system this
results in a normalized value 0f 0.375, which is pretty close to the 0.38
definded by the basic ISO rack. However, when using much shorter teeth as
e.g. required for a splined shaft, the fillet becomes way too large.

In addition, I don't understand the approximation to calculate the
distance between the gear's center and the top of the fillet yet. It was
only refactored to allow the custom fillet radii, but it retuns the same
values as the original implementation.
However, with high pressure angles, up to 45° used for splines, this
approximation comes to its limits.
2023-01-22 21:44:03 +01:00
Jonas Bähr
37595da316 PD: Make the involute gear's toogh length configurable
Exposing the addednum and dedendum coefficients as properties allows to
change the tooth length above and below the pitch circle. This makes it
possible to use the profile beyond standard full-depth systems, e.g. for
stub tooths and most importantly: involute splined shafts and hubs.

Gear objets created with earlier versions automatically get the
additional properties on document restore. Its values match the hard-
coded values used in earlier versions.

There is a change when creating *new* internal gear profiles, though:
Previously, an addendum coefficient of 0.6 was used, presumably to reduce
the tip length beyond the base circle in order to avoid a non-involute
edge. This method is one proposal from the "Handbook of Gear Design" by
Gitin M. Maitra, as referenced in the original source code comments.

However, Maitra also states that this reduction of the anual gear's tip
in turn requires an enlagement of the mating gear of 1.25 instead of the
ordinary 1.0. And it is only required for a low numer of teeth and/or the
mating gear being quite large (less than 10 teeth in difference, to avoid
interferences).
Because those additional requirements and conditions have not been
implemented, the previously used values have been incomplete anyway. Thus
I decided to not implemented this special case and use the standard
values of 1.0/1.25 for newly created external and internal gears alike.
Internal gears need special care for other kind of interference anyway
and the newly exposed properties now allow to do so.

There is no entry in the task panel for those advanced properties yet.
2023-01-22 21:44:03 +01:00
Jonas Bähr
3933825840 PD: Add tests loading InvoluteGears created with v0.20
This is in preparation for new features, to ensure we don't break
existing documents created with FreeCAD-0.20.
The fixtures have been created with the official mac build of
FreeCAD-0.20.1 using mostly default parametrization -- only the number
of teeth has been reduced in order to keep the file size low.
2023-01-22 21:44:03 +01:00
luz paz
c726b69d7e PD: remove trailing whitespace 2022-11-10 10:32:04 +01:00
wmayer
63e74c848f PD: unit test to check offset of sub-shape binder (PR #7445) 2022-11-05 16:58:51 +01:00
mwganson
663d4fe93a PartDesign: Fillets / Chamfers add unit tests for UseAllEdges property 2022-03-01 18:42:14 +01:00
wmayer
f9b37729fe PD: add PD test modules to __init__.py 2022-01-18 18:02:10 +01:00
Jonas Bähr
96e7c6b3b5 PD: Add tests for InvoluteGear
There are some basic tests to cover the gear profile and its parameters
and some integration tests for the interaction with PD Pad and Pocket.

I followed the same pattern as the other PartDesign tests, e.g. not using
PEP8 style method names. Eventually some helper methods could be
extracted and moved to the common base framework in Mod/Test, but that's
another step.
2022-01-18 17:43:52 +01:00
wmayer
6461f9f6d2 PD: [skip ci] make uniform the license text of test modules 2022-01-17 16:38:10 +01:00