Commit Graph

26534 Commits

Author SHA1 Message Date
wmayer
bbacecb397 Gui: fix C++20 warning: bitwise operation between different enumeration types [-Wdeprecated-enum-enum-conversion] 2021-12-01 23:45:26 +01:00
wmayer
2fd81006ea PD: fix build failure with C++20 2021-12-01 23:24:16 +01:00
wmayer
58f33f350d Gui: fix build failure with C++20 2021-12-01 21:50:00 +01:00
0penBrain
be88e838c1 [Sketcher][Bugfix] Slot: fix segfault accessing empty vector 2021-12-01 18:48:05 +01:00
Yorik van Havre
e4ca3d2971 Merge pull request #5214 from mdkus/master
Tools: small bug fix
2021-12-01 15:04:25 +01:00
Yorik van Havre
b28ff5b1ba Merge pull request #5178 from Roy-043/Draft-housekeeping-import-is_group-get_windows
Draft housekeeping: import is_group and get_windows in Draft.py
2021-12-01 15:02:54 +01:00
Yorik van Havre
78f4e980ba Merge pull request #5202 from Roy-043/Draft-fix-3-snap-issues
Draft: fix 3 snap issues
2021-12-01 15:01:27 +01:00
Yorik van Havre
114fe73300 Merge pull request #5206 from Roy-043/Draft-fix-layer-and-style-handling-of-point-color-and-point-size
Draft: Draft_SetStyle and Draft_Layer did not handle PointColor and PointSize.
2021-12-01 14:57:09 +01:00
wmayer
5e16fffc20 App: [skip ci] improve importing a Python module when passed as program argument 2021-12-01 13:34:24 +01:00
mdkus
4024180d5d Merge branch 'master' of https://github.com/mdkus/FreeCAD 2021-12-01 09:21:31 +01:00
mdkus
569f61b19a Update CreatePyModule.py
Small bug fix: in comparison to CreateModule.py this codeline is missing in CreatePyModule.py, so CreatePyModule.py doesn't work,fine without it (tested under Win 7 and Win11)
2021-12-01 09:20:36 +01:00
Mark O'Donovan
770c7f6330 Replace deprecated qt functions toList() & toSet() (#5213)
* Replace deprecated qt functions toList() & toSet()

QSet<QString>::toList() and QStringList::toSet() are both
deprecated.

* Add back support for qt < 5.14
2021-12-01 04:31:34 +01:00
wmayer
a05cd50fa5 Part: add exception handling to Face.makeEvolved/Wire.makeEvolved 2021-11-30 20:04:31 +01:00
wmayer
edf5d13de6 Part: add module with enums 2021-11-30 20:03:26 +01:00
wmayer
5018af974c Part: implement Part.Wire.makeEvolved and Part.Face.makeEvolved 2021-11-30 18:17:29 +01:00
wmayer
3cddf78b5e PD: refactoring of TaskHelixParameters 2021-11-30 11:47:06 +01:00
wmayer
46e516f5d3 PD: fix crash in TaskHelixParameters::updateStatus() 2021-11-30 10:36:36 +01:00
wmayer
ffe240a539 PD: refactoring of TaskHelixParameters, update status after each recompute 2021-11-29 22:14:14 +01:00
wmayer
41efee1b4c PD: handle language change in TaskHelixParameters 2021-11-29 20:14:29 +01:00
0penBrain
834ae29ad0 [Sketcher] Allow to autoconstraint slot horizontal/vertical 2021-11-29 14:38:53 +01:00
0penBrain
abe4babd13 [Sketcher] Introduce hack to be able to vertically/horizontally auto-constrain primitives
Adds a new type "VERTEX_FOR_PRIMITIVE" that will analyze the direction for vertical/horizontal but not for tangent

 If defined, makes use of GeoId item of AutoConstraint struct (instead of last geometry) to apply the horizontal/vertical
 constraint. This allow this constraint to be applied on an arbitrary geometry.
2021-11-29 14:38:53 +01:00
0penBrain
7c0c6bf671 [Sketcher] Ability to snap slot horizontal/vertical
Triggered by pressing Ctrl key when creating the slot
 Extra constraint is added in case snapping is enabled
2021-11-29 14:38:53 +01:00
Uwe
9d70589d6c [GUI] set dialog width to the one of the other preferences ones 2021-11-29 12:54:21 +01:00
Uwe
955af2fa8d [PD] use existing definition for PI in Helix
- also a lot of style fixes kindly done by MSVC
2021-11-29 12:05:10 +01:00
Uwe
35683883cb [PD] allow negative helix growth
Helices that become smaller with every turn are geometrically perfectly valid. Therefore we cannot forbid this.

(For example when creating a helix from a face you often cannot move it so that you can apply a positive growth.)
2021-11-29 11:29:27 +01:00
Uwe
1358cd021f [PD] prevent invalid helix geometry
in the height-turns-growth model height and growth must not be equally zero
2021-11-29 01:34:03 +01:00
Uwe
625c84e34a [PD] allow to move sweep sections
Now that we have the feature that sweeps can have vertices as end or begin of a sweep, there is the need for the feature to move sections. For example vertices may only be the last section.
2021-11-29 00:13:23 +01:00
Uwe
90f2040386 [PD] fix increment of helix growth
- it is not sensible that all helix geometries use 1 as increment in the dialog but the growth uses 5. Looking at the PR that introduced this feature it seems that this was just a copy issue from the angle edit since this uses 5 as increment.

- the other changes are from Qt's Designer
2021-11-29 00:11:40 +01:00
Jonas Bähr
169c38622c [PD] Helix: Offer profile's normal as axis
Previously, only the vertical and horizontal axis of the profile was
selectable in the task panel of the additive/subtractive helix. Now the
profile's normal axis can be selected, too. This now allows to create
helical extrusions or "twisted pockets".

The order of the GUI entries was chosen to be in line with the order of
axis selection of the multi-transform parameters.
The actual feature's implementation needed adaption for this special case
as in some places a unit vector (`gp_Dir`) was derived from the cross-
product of axis and profile normal -- a null-vector when the axis *is*
the normal. This caused the gp_Dir's ctor to throw.
2021-11-28 23:57:41 +01:00
Ajinkya Dahale
bc90f4480b [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
Ajinkya Dahale
6d0c6b4119 [PD] Support "punctual" sections for PD Pipe
Similar to PR #5170 for loft. This commit squashes the following commits.

[PD] Refactor `Pipe::execute` and support point sections

[PD] Allow point profile in selection-based pipe workflow

[PD] Only add sketch subs if it is vertex

[PD] Make both end faces of pipe regardless of point sections

Earlier we were checking if these faces correspond to point sections, but
apparently the end faces are independent of the order in which the sections are
added, so the "front" may be the face closest to the last added section, rather
than the "profile". Creating null faces and adding them for sewing together into
a solid does not appear to have side-effects so far.
2021-11-28 19:19:16 +01:00
Roy-043
5e0f8bf604 Draft: fix layer handling of PointColor and PointSize
Draft_Layer did not handle PointColor and PointSize.
2021-11-28 11:52:07 +01:00
Roy-043
e2fec183db Draft: fix style handling of PointColor and PointSize
Draft_SetStyle did not handle PointColor and PointSize.
2021-11-28 11:50:49 +01:00
0penBrain
0ead26f5c2 [Sketcher] Floating point computation immunity for carbon copy parallel/aligned checks 2021-11-27 08:58:25 +01:00
0penBrain
0ccdf8b717 [Sketcher] Improve a bit XZ plane mapping by using quaternions directly 2021-11-27 08:58:25 +01:00
Uwe
682cdb42ef [GUI] minor UI fix for a pref dialog
- to keep the capitalization consistent in the dialog
2021-11-27 05:38:16 +01:00
Uwe
2650ef3b81 fix dialog height 2021-11-27 04:30:17 +01:00
0penBrain
dc4a8e5beb [Gui] Decimal separator substitution : add option in Preferences 2021-11-27 04:30:17 +01:00
sliptonic
f5d230ed29 Merge pull request #5205 from sliptonic/bug/depthsteps
[PATH]  depthparams handles negative steps and finish step correctly. Unit tests
2021-11-26 20:24:25 -06:00
wmayer
6c16094d5a PD: fix bug in TaskExtrudeParameters
When switching from Custom direction to Select reference mode do not jump back to Custom direction mode after selecting an edge
2021-11-27 02:22:37 +01:00
wmayer
cb8330d5bd PD: code-refactoring of TaskExtrudeParameters 2021-11-27 01:45:08 +01:00
sliptonic
8e6c5a497b make sure depthparams handles negative steps and finish step correctly
revised test
2021-11-26 13:27:44 -06:00
wmayer
e412c3f4cc PD: add enum class to TaskPadParameters to avoid to work with magic numbers 2021-11-26 16:58:59 +01:00
wmayer
828b1b6d0a PD: add enum class to TaskPocketParameters to avoid to work with magic numbers 2021-11-26 16:46:58 +01:00
wmayer
6a0cf8233a PD: create a common base class of TaskPocketParameters and TaskPocketParameters to reduce code duplications 2021-11-26 16:23:45 +01:00
Yorik van Havre
bca145d8c7 App: Added warning at startup if user mods are found in older location 2021-11-26 16:01:23 +01:00
Roy-043
9baf044e6a Draft: fix 3 snap issues
1. Draft_Snap_Parallel only worked beyond the endpoints of the edge.
2. It was very hard to select an edge for Draft_Snap_Parallel if no other snaps were active.
3. Only two snap objects were stored.
2021-11-25 15:21:11 +01:00
wmayer
3648948711 Gui: in search bar set red background color as style sheet because a palette won't work if an application wide style sheet is set 2021-11-25 15:11:46 +01:00
Uwe
9283aa0f72 [PD] revert a part of commit 1da079b34
as discussed and polled in https://forum.freecadweb.org/viewtopic.php?f=8&t=64000
2021-11-25 03:19:31 +01:00
wmayer
3465ac3add Gui: [skip ci] do not trigger on_fileChooser_fileNameChanged when opening macro dialog 2021-11-24 21:28:32 +01:00