Commit Graph

52 Commits

Author SHA1 Message Date
wmayer
12ed13ddbe PD: move to new style connect() 2023-01-15 14:27:33 +01:00
luz paz
c726b69d7e PD: remove trailing whitespace 2022-11-10 10:32:04 +01:00
Uwe
884c11b4e9 Revert "[PD] simplify code for wedges"
This reverts commit dd574d5c68.

On MSVC this compiled and works. I have no clue why not also with Clang. Reverting for now.
2022-09-18 13:31:09 +02:00
Uwe
dd574d5c68 [PD] simplify code for wedges 2022-09-18 12:32:14 +02:00
Ethan Chappel
e4259cd851 Gui: Add format parameter for wedgeXmin 2022-09-18 12:06:39 +02:00
wmayer
88accdb421 PD: [skip ci] Fix several clazy issues:
* Maybe you meant to call base method instead [-Wclazy-skipped-base-method]
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Mixing iterators with const_iterators [-Wclazy-strict-iterators]
* Unused QByteArray [-Wclazy-unused-non-trivial-variable]
* C++11 range-loop might detach Qt container (QList) [-Wclazy-range-loop-detach]
2022-07-25 13:40:19 +02:00
wmayer
3608ee7f51 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
fd19d1a7b0 [PD] more work to remove unused includes 2022-02-21 02:18:17 +01:00
luz paz
0042f58e4c Make source code comments use gender neutral pronouns
The changes also include some grammatical fixes as well.
2021-12-02 16:18:04 -05:00
Syres916
f3c2622468 [PD] Gui - Primitives change Base Quantity Format 2021-08-12 10:48:36 +01:00
donovaly
b9b42a52f4 [PD] fix primitives issues
- to avoid invalid results:
 - don't allow to set equal radii for cones
 - don't allow to set equal wedge parameters
 - don't allow zero quantities like e.g. the box width

- use full internal precision because it must be possible to create an e.g. 23.5 um wide box and using the default 2 displayed digits

- take spinbox limits from App

- add missing tooltips

- remove disturbing commented out line from Workbench.cpp

- some coding style issues fixed automatically by the MSVC IDE
2021-04-20 19:03:40 +02:00
donovaly
7185ee93f2 [PartDesign] add direction to cylinder primitive
We already have the possibility to create skewed prisms. I recently stumbled upon that I would need this feature for cylinders too.

This PR takes the existing prism extrude direction feature and use it for cylinders too
2021-04-05 14:35:50 +02:00
donovaly
249c2c7970 [PD] set App constraints for their Gui counterparts
based on Werner's work yesterday, this PR takes care of the missing PD features to use the constraints already defined in App
2021-03-04 11:03:24 +01:00
donovaly
5abb45f7cf [PD] fix wording for skew prisms
the UI and the property is not consistent. In the dialog we use the term angle upon user feedback while the property still has the name "skew" in it.
I simply forgot this change in my PR that implemented skew prisms.

This is now corrected by this PR.
2020-09-15 22:13:26 +02:00
donovaly
d4519d5aec [PD and Part] add possibility to create skew prisms 2020-09-12 13:28:00 +02:00
Zheng, Lei
010a14a6b5 PartGui: avoid code duplication for handing TaskAttacher
A better fix for #0004188

Delay calling setPreviewDisplayMode() in ViewProviderPrimitive::setEdit
also fixed issue of not turning off preview mode if the user cancels
editing because there is already a task dialog active.
2020-07-12 16:03:42 +02:00
Zheng, Lei
37caf53dfd Part: fix TaskAttacher::visibilityAutomation()
Rename Python variable 'tv' to avoid potential conflict with others
(PS. I can't reproduce error caused by this. But there is no harm doing
it either).

Handle editing attachment through an App::Link.
2020-07-12 16:03:42 +02:00
wmayer
4ec45b545e boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
donovaly
0a1312e9f5 [PD] fix logic of TaskPrimitiveParameters dialog
- only allow geometrically possible values for the different parameters
- this way also fix a crash
- fix a typo

see https://forum.freecadweb.org/viewtopic.php?f=3&t=44467
2020-03-24 08:36:06 +01:00
donovaly
172e28b6b4 [PD] add expressions to primitive dialog
see https://forum.freecadweb.org/viewtopic.php?f=3&t=36458
(a step forward to fix bug https://tracker.freecadweb.org/view.php?id=3981 )
2020-03-21 22:06:40 +01:00
wmayer
25b3cfc170 issue #0004188: Editing a subtractive box in PartDesign doesn't show the shaded box 2020-01-15 10:00:47 +01:00
wmayer
bff7369e54 fixes #0004188: Editing a subtractive box in PartDesign doesn't show the shaded box 2020-01-15 01:33:28 +01:00
wmayer
9270322d25 Mod: [skip ci] implementation classes don't inherit from UI classes any more 2020-01-10 16:19:35 +01:00
Zheng, Lei
11a93a0578 PartDesign changes
* Mostly for supporting in-place editing

* Add new SubShapeBinder that support cross coordinate system,
  external, and sub-object binding
2019-08-17 15:15:47 +02:00
Abdullah Tahiri
e82c154d1d PartDesign: PCH GUI 2019-05-02 07:12:51 +02:00
wmayer
638845a6f0 fixes 0003845: unwanted rounding for dimensions of subtractive shapes in task dialog 2019-02-19 09:50:12 +01:00
wmayer
f898eafd64 move from deprecated boost.signals to boost.signals2 library 2018-10-30 19:09:03 +01:00
luz.paz
7a09a5774e More misc. typos 2018-05-19 12:17:52 -04:00
wmayer
a20e13b8ae avoid superfluous transaction on PD primitive creation 2018-02-09 23:10:40 +01:00
Abdullah Tahiri
d455600b65 Part Design: Avoid feature modification during initialization
=============================================================

The values for the primitives are set after the connections to the slots "onchange" are connected.

This causes a river of onChanges at feature level which set the properties and modify the feature (to the same values).

Moving the connections at the end of the function just solves this issue.
2018-02-09 16:01:19 +01:00
wmayer
004324bbc5 fix scan coverity issues: uncaught exception 2017-04-11 14:03:08 +02:00
wmayer
8a100bf627 issue #0002836: Crash in sketcher 2017-01-23 22:48:02 +01:00
Stefan Tröger
c4ec348fbd PartDesign: Show origin for primitive editing 2017-01-04 16:01:58 +01:00
Stefan Tröger
b758df7193 Port attachment UI to Part for general use
Furthermore change PartDesign primitives to use the new task dialog
2016-12-07 06:41:40 +01:00
Stefan Tröger
bc133e4de2 PartDesign: Primitives are attachable directly
With the recently introduced AttachExtension the PartDesign primitives can be attachable by themself and don't need anymore the helping coordinate system datum. This simplyfies the code and the TreeView largely
2016-12-07 06:41:40 +01:00
wmayer
3b961bcb5f + add convenience method recomputeFeature()
+ make method recompute() protected
2016-11-06 17:16:50 +01:00
Sergo
ef14bbd88a PartDesign: fix showing base object on newly opened file, cleanup 2016-09-30 11:09:01 -03:00
wmayer
f44df3cdf0 do not use doCommand without using format string, add overloaded method of runCommand 2016-09-15 18:53:37 +02:00
wmayer
6b4821a855 + fix crash on abort of adding primitives 2016-04-24 14:17:01 +02:00
Mateusz Skowroński
b5519922d8 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-04-15 11:55:12 +02:00
Stefan Tröger
8b0d53358a PartDesign: Adopt primitive preview
The preview was developed when the "one feature only" visibility rule was not yet introduced. This commit maks it work again.
2016-04-12 18:12:23 +02:00
Alexander Golubev
0cfc0cd424 Fix warnings introduced in new PartDesign
Mostly unused wariables and compare of signed & unsigned
2016-04-12 18:12:21 +02:00
Stefan Tröger
54646ef5bd fix wrong torus addition 2016-04-12 18:12:08 +02:00
Stefan Tröger
ec68192fcf fix primitive following cs in edit mode and add python console output when closing the task 2016-04-12 18:12:08 +02:00
Stefan Tröger
c5ae4530ab add primitive preview visualization 2016-04-12 18:12:08 +02:00
Stefan Tröger
7971bdbb8e delete primitive if initial task is canceled 2016-04-12 18:12:07 +02:00
Stefan Tröger
49eb5467f7 add gui for remaining primitives 2016-04-12 18:12:07 +02:00
Stefan Tröger
fec86abc09 visualize the primitive add/sub shape in edit 2016-04-12 18:12:07 +02:00
Stefan Tröger
1f180a11da make primitive task box work 2016-04-12 18:12:07 +02:00