Commit Graph

24 Commits

Author SHA1 Message Date
Ulices
bf7adc51d1 PartDesign: Update Length/Offset when Occurrences changes (#12069)
* Add 'HACK:'/`NOTE:` tags to get special highlightning

* [PD] Bugfix: Update Length/Offset when Occurrences changes

Fix #12068
2024-01-21 18:52:34 -06:00
Florian Foinant-Willig
24934d7843 PartDesign: modernize type checking 2023-10-23 18:08:16 +02:00
wmayer
e7eb7d7b8d PD: wrong direction determined for linear pattern
A selected edge of a sketch is not in local coordinates and thus its corresponding axis mustn't be multiplied with the sketch placement as
this will lead to a wrong direction vector.

Forum: https://forum.freecad.org/viewtopic.php?t=82022
2023-10-23 10:53:29 -05:00
Kacper Donat
2d22c8f4af PD: Keep Length and Offset in sync for LinearPattern
As Length and Offset represents the same concept in different way it is
useful to keep them in sync when it is possible. Update to one of them
will update the other with approperiate value. This behaviour behaviour
works only if both properties are not coming from expression engine -
those will stay not touched.
2023-08-27 12:45:53 +02:00
al
b7da44f57b PD: Add offset / overall length modes for LinearPattern
This commit adds support for two separate modes of defining distance
between elements in PD's Linear Pattern.

1. Overall Length - which works exactly like it works before,
2. Spacing - which allows user to explicitly define distance (offset) between
   features.
2023-08-27 12:45:53 +02:00
Jolbas
53aa302d8b PartDesign: Return directly if occurrences is 1
In LinearPattern and PolarPattern. Skip all checks if occurrences is 1. Allows Expressions on Length/Angle that evaluates to 0 if Occurrences is 1.

Co-Authored-By: 0penBrain <48731257+0penBrain@users.noreply.github.com>
2023-03-30 23:02:03 +02:00
Uwe
ac6235c577 [PD] App: remove superfluous nullptr checks
- also Body: get rid of some nasty single-letter variables
2022-07-17 18:07:00 +02:00
wmayer
d1d4b996e7 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
da9c18374b [PD] final work to remove unused includes 2022-02-22 02:18:49 +01:00
Ajinkya Dahale
5e3ad45ef4 [PD] Use compare to compare strings instead of substr
Used when finding subelements of a feature. Many of the comparisons used to also
check for string lengths, but as far as I can tell they are not strictly
necessary (see https://www.cplusplus.com/reference/string/string/substr/) and
just `substr` can be used without them. However, `compare` explicitly is for
comparing, and does not make a new object that `substr` does.
2021-11-28 22:05:46 +01:00
wmayer
fa86b0216e Mod: make sure to call the base class' handleChangedPropertyType 2021-09-15 14:07:32 +02:00
donovaly
8e3ebc07ed [PD] fix property issues
- Helix: the property Turns has the App::PropertyFloatConstraint thus also the pointer to it must have the same property

- LinearPattern and Helix: make constraints static class member (forgot this in commit 114bdf6b)

- Draft: make the constraint const

- PolarPattern and LinearPattern assure that the header file is loaded at last to avoid potential troubles
2021-07-11 01:43:38 +02:00
donovaly
20024707a9 [PD] disallow invalid polar and linear pattern settings
as discussed in 423d41da19 we should disallow invalid property settings
2021-03-03 07:45:08 +01:00
Yann Diorcet
ae68147d0b LinearPattern: Support 1 occurrence
When using linear pattern with expression, this can be usefull to have only one
occurence (the original one), which can't be done with the following
implemenation. This commit change this behaviour by allowing this value.
2020-12-30 14:49:54 +01:00
luz.paz
dc8bf3dc39 PartDesign: [skip ci] fix header uniformity
This PR fixes header uniformity across all PartDesign WB files
2019-12-22 00:58:38 +01:00
wmayer
00de5bb7ad Replace Base::Exception with appropriate subclass 2018-11-14 19:28:00 +01:00
wmayer
fdd4b9d00c in linear pattern handle selected edge of a 2d part object 2018-09-27 11:04:30 +02:00
Alexander Golubev
305151be34 App/Origin: big refactoring
- Rebase App::Origin on App::DocumentObject
 - Keep all control over the Origin structure inside the Origin and it's
   ViewProvider
 - Add OriginFeature class as common base for App::Plane and App::Line
 - Rebase App::Plane and App::Line on top of newly created class and
   move to the file.
 - Change Origin's ViewProvider API associated with temporary display
 - Lots of associated changes to files
 - Several minor fixes
 - Lots of new bugs
2016-04-12 18:12:18 +02:00
Stefan Tröger
616e372e4a switch linear pattern to coordinate system axis 2016-04-12 18:12:05 +02:00
jrheinlaender
4524103dbc Allow datum lines and planes for Transformed features' references 2016-04-12 18:11:50 +02:00
jrheinlaender
4d595ff499 PartDesign module moving float -> double 2013-03-25 17:42:29 +04:30
wmayer
605e85b952 Make FeaturePython Python binding a template class to avoid code duplication 2013-03-22 00:34:18 +01:00
logari81
3562efa5d5 PartDesign: Refactor pattern features and gui
- remove StdDirection,StdAxis and StdMirrorPlane properties
- support sketch H_Axis, V_Axis, N_axis as valid references in patterns
- polish reference selection gui (unified for standard axes and custom references)
2013-01-09 23:18:38 +01:00
jrheinlaender
023c7fa0b1 PartDesign: implement Transform and Pattern features 2012-09-07 11:55:26 +02:00