Commit Graph

59 Commits

Author SHA1 Message Date
Florian Foinant-Willig
45e6e3561e Part & PartDesign Cone: allow equal radii (#12219)
* PartDesign_Cone: allow equal radii

* fix R2 < R1

* Part_Cone: allow equal radii
2024-02-12 14:21:53 -03:00
wmayer
622e46771e PD: modernize C++: use equals default 2023-08-22 13:31:17 +02:00
wmayer
22e6e2cd40 Part/PD: modernize C++: redundant void arg 2023-08-05 16:50:31 +02:00
Chris Hennes
2ab9abbb01 PD: Attempt to translate exceptions in dialogs
Relies on the exception text having been added to the translation database in a previous call to QT_TRANSLATE_NOOP, and put in the 'Exception' context.
2023-04-27 17:41:41 -05:00
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
0penBrain
0d577a8789 Base: introduce 'getSafeUserUnit' that fallbacks to full precision and internal unit ...
... in case unit schema would zero a non-zero quantity

 For example, using '1 mil' with UnitsSchemaImperialDecimal schema
2023-02-23 15:22:07 +01:00
0penBrain
65f8321e27 PartDesign: better quantity values handling for primitives 2023-02-23 15:22:07 +01:00
wmayer
a122aa01a7 PD: move to new style connect() 2023-01-15 14:27:33 +01:00
luz paz
d265c9ff63 PD: remove trailing whitespace 2022-11-10 10:32:04 +01:00
Uwe
769a575281 Revert "[PD] simplify code for wedges"
This reverts commit ace31ffb213f27ab268cc508e748b4da7e615730.

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
eb150bcfd4 [PD] simplify code for wedges 2022-09-18 12:32:14 +02:00
Ethan Chappel
31fa2de09f Gui: Add format parameter for wedgeXmin 2022-09-18 12:06:39 +02:00
wmayer
a93082bc06 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
d1d4b996e7 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
8f786ea6ef Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
19bdfc16b8 [PD] more work to remove unused includes 2022-02-21 02:18:17 +01:00
luz paz
d877ee4d47 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
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