Commit Graph

42 Commits

Author SHA1 Message Date
Syres916
cf2b2fd8bf [PD] Gui - Primitives change Base Quantity Format 2021-08-12 10:48:36 +01:00
donovaly
f0655f7c3f [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
0369bc0853 [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
21d4a37e1f [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
b0faf1197c [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
6bbab49723 [PD and Part] add possibility to create skew prisms 2020-09-12 13:28:00 +02:00
Zheng, Lei
4dad08eff6 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
147b00f2cb 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
730154a684 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
e6d0e24f16 [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
3af74cb1a4 [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
0a5028f181 issue #0004188: Editing a subtractive box in PartDesign doesn't show the shaded box 2020-01-15 10:00:47 +01:00
wmayer
798edb8a55 fixes #0004188: Editing a subtractive box in PartDesign doesn't show the shaded box 2020-01-15 01:33:28 +01:00
wmayer
8fdb29c842 Mod: [skip ci] implementation classes don't inherit from UI classes any more 2020-01-10 16:19:35 +01:00
Zheng, Lei
cd2b7e297c 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
07dacdba36 PartDesign: PCH GUI 2019-05-02 07:12:51 +02:00
wmayer
7ee80536b3 fixes 0003845: unwanted rounding for dimensions of subtractive shapes in task dialog 2019-02-19 09:50:12 +01:00
wmayer
36271b4052 move from deprecated boost.signals to boost.signals2 library 2018-10-30 19:09:03 +01:00
luz.paz
43244aa762 More misc. typos 2018-05-19 12:17:52 -04:00
wmayer
8101f35f22 avoid superfluous transaction on PD primitive creation 2018-02-09 23:10:40 +01:00
Abdullah Tahiri
5681acf937 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
c526c18b94 fix scan coverity issues: uncaught exception 2017-04-11 14:03:08 +02:00
wmayer
5aac8e3b13 issue #0002836: Crash in sketcher 2017-01-23 22:48:02 +01:00
Stefan Tröger
098a27aaa4 PartDesign: Show origin for primitive editing 2017-01-04 16:01:58 +01:00
Stefan Tröger
117ae4e6ab 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
c0a6b2ab11 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
06da15e643 + add convenience method recomputeFeature()
+ make method recompute() protected
2016-11-06 17:16:50 +01:00
Sergo
40a8f1cd66 PartDesign: fix showing base object on newly opened file, cleanup 2016-09-30 11:09:01 -03:00
wmayer
e8554cc77a do not use doCommand without using format string, add overloaded method of runCommand 2016-09-15 18:53:37 +02:00
wmayer
1f3fe37700 + fix crash on abort of adding primitives 2016-04-24 14:17:01 +02:00
Mateusz Skowroński
a8d37dabbe 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
97a51686c7 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
27667cf5e6 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
51d86830cb fix wrong torus addition 2016-04-12 18:12:08 +02:00
Stefan Tröger
60686fe699 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
1332b7e866 add primitive preview visualization 2016-04-12 18:12:08 +02:00
Stefan Tröger
304b42e345 delete primitive if initial task is canceled 2016-04-12 18:12:07 +02:00
Stefan Tröger
48e8858bc9 add gui for remaining primitives 2016-04-12 18:12:07 +02:00
Stefan Tröger
628a0279cd visualize the primitive add/sub shape in edit 2016-04-12 18:12:07 +02:00
Stefan Tröger
5531368fe0 make primitive task box work 2016-04-12 18:12:07 +02:00
Stefan Tröger
7e3f1bd418 add primitive widget to task dialog 2016-04-12 18:12:07 +02:00
Stefan Tröger
27d46a6593 primitive bug fixes, add cylinder and sphere 2016-04-12 18:12:07 +02:00