Commit Graph

3684 Commits

Author SHA1 Message Date
Chris Hennes
5e6a37a1fa Merge pull request #19899 from tritao/cmake-cleanup-targets
CMake: Cleanup targets with transitive dependencies
2025-03-17 13:15:37 -05:00
Chris Hennes
43a3626624 Merge pull request #20201 from Roy-043/Draft-make-Draft_Edit-also-detect-key-up-events
Draft: make Draft_Edit also detect key up events
2025-03-17 11:57:24 -05:00
tritao
cdab9c7837 CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
Roy-043
9d053541ab Draft: make Draft_Edit also detect key up events
The key down events can be claimed by shortcuts from other workbenches. Detecting both the down and up events does not seem to cause problems.
2025-03-14 21:09:20 +01:00
Luz Paz
6564a7b107 Fix various typos 2025-03-14 12:37:12 -04:00
Roy-043
25c33a08a7 Merge pull request #20151 from Roy-043/Draft-fix-handling-of-fillet-radius-input
Draft: fix handling of fillet radius input
2025-03-12 16:27:41 +00:00
Roy-043
4bed1611d2 Draft: fix handling of fillet radius input
Fixes #20145.
2025-03-12 17:00:52 +01:00
Roy-043
2ff5bea79e Updated based on comment 2025-03-12 09:47:03 +01:00
Roy-043
c526bd9bbe Draft: Fix error in #20118
The code in #20118 would fail if only Near snap was active.
2025-03-11 15:57:37 +01:00
Yorik van Havre
90143c3c8a Merge pull request #20072 from Roy-043/Draft-Implement-Dim-Auto-Flip-Text
Draft: Implement Dim Auto Flip Text
2025-03-11 12:58:03 +00:00
Roy-043
7b179f53a4 Draft: Correct Near snap override behavior
Fixes #15017.

Currently Near snap overrides all other 'on-object' snaps such as Midpoint snap and Endpoint snap. With this PR Near snap no longer 'wins' if a different snap point is within snapRange of the cursor.
2025-03-11 10:48:12 +01:00
Roy-043
acda4a6a74 Draft: Implement Dim Auto Flip Text
Fixes #19993.

* To determine the `FlipText` value the normal (either the working plane Z axis or its reverse) and the working plane X axis are used.
* A new fine-tuning parameter `DimAutoFlipText` can be used to disable the functionality. Its default value is `True`.
* The `FlipText` property did not work for angular dimensions and the `TextSpacing` property of angular dimensions was not multiplied by `ScaleMultiplier`. This has been corrected.
2025-03-08 15:30:31 +01:00
Roy-043
43762780bd Merge pull request #19986 from Roy-043/Draft-fix-make_sketch-hang
Draft: fix make_sketch hang
2025-03-05 11:10:28 +00:00
Roy-043
01ced7dd4c Draft: fix Trimex visibility change
Fixes #19966
2025-03-04 10:13:44 +01:00
Roy-043
db3b0640f8 Draft: fix make_sketch hang
Fixes #19978

The onebyone argument of makeMissingPointOnPointCoincident and makeMissingVerticalHorizontal should be set to False.
2025-03-04 10:12:44 +01:00
Roy-043
bc430234d2 Draft: fix Draft_Trimex boundary subelement selection
Fixes #19614

Instead of using the whole object, the hovered subelement should be used for the boundary.

With this PR the handling of the boundary is also  'nesting-aware'. This is however still not the case for the object being extended/trimmed. That object has to be in the global space.
2025-03-03 17:18:25 +01:00
Roy-043
cff2d4f8fb Draft: fix Draft_Edit isAttachedToDocument issue
Fixes #19939

The `isAttachedToDocument` method only works in certain circumstances.
https://forum.freecad.org/viewtopic.php?t=94709
2025-03-03 17:17:55 +01:00
Roy-043
14c88e288e Draft: fix NaN issue with Draft_Rotate
Fixes #19690

The issue was caused by a zero distance between the center and the point picked for the rotation angle.
2025-03-03 17:09:11 +01:00
Roy-043
0b81e6e318 Draft: fix polar coords regression
Fixes #19961

Regression caused by #19179.
2025-03-03 17:07:20 +01:00
Chris Hennes
1a2070c36f Merge pull request #19636 from kadet1090/color-in-base
Base: Move App::Color to Base
2025-03-02 16:36:40 -06:00
Roy-043
cdfa386f87 Draft: fix Draft_Edit issue with Gesture navigation
Fixes #19519
2025-03-02 16:13:13 -06:00
Mino-Tsuzuku
a29895dd3c fix #19723 SVG: transform attribute is not handled collectly (#19845)
* * Move pyopen with encoding to utils.
 and modify all importing library to use pyopen with encoding.
with this change, DXF OCA AirfoilDAT with multibyte sequence always read as utf-8.

* Fix SVG transform attribute is not handler collectly.
2025-03-01 19:06:46 -06:00
Roy-043
202f4cf3af Draft: Fix error in #19738
My bad. Goes to show that even 'simple' PRs must be tested.
2025-02-27 10:41:54 +01:00
Benjamin Bræstrup Sayoc
ee1c73cd04 Build: suppress warnings from 3rd party libraries
Warnings from 3rd parties are not relevant and are only polluting the warning output. Marking these libraries as SYSTEM suppresses warning.

https://gcc.gnu.org/onlinedocs/cpp/Invocation.html#index-I
https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
2025-02-25 14:39:05 +00:00
Roy-043
c0f0fa1d94 Draft: fix alignment of sketches in SVG and legacy DXF export
Fixes #5990
Supersedes #13652

This solution only works for sketches. The export of other planar objects remains the same.

This is similar to the way the C++ DXF exporter handles things. What is different here is that if multiple sketches are exported they are assumed to have the same normal, and their position relative to each other is preserved.
2025-02-24 17:13:51 +00:00
Roy-043
af20bf003f Draft: change 'Filled' to 'Make face' in UI
Fixes #19715.

The related parameter has been renamed as well and other references to 'fill mode' have been updated.
2025-02-24 17:10:13 +00:00
Joao Matos
15076cb504 Core: Move PyCXX library to src/3rdParty. 2025-02-24 16:36:06 +00:00
Roy-043
af96e50eea Draft: improve upgrade and downgrade
Fixes #16333.
Follow-up of #19487.

* The functions have been made nesting-aware. New objects are put in the same container (Group, Part) as the original objects. As a consequence for some operations the original objects must be in the same container as well.
* New objects receive the visual properties of the original objects. This is not always perfect. For example when upgrading to multiple wires there is currently no check to see which edge came from which orginal object. The fact that the `format_object` function is called from the Draft `make*` functions is problematic here. If construction mode is active `make_wire` puts new objects in the construction group and we don't always want that. This has been solved with a workaround (see 'cludge' in the code).
* The 'de-parametrize' downgrade option has also been enabled for features of PartDesign Bodies that have the `Profile` property.
* Before deleting objects there is a check to see if they are in use elsewhere (`InList` check). Base objects of arrays are not deleted if they are visible. If a PartDesign Body, or an object inside a Body is selected, the whole Body is deleted.
* The force options did not work for functions that take a single object.
* The `getShapeFromMesh` function in ArchCommands.py could return a solid that was not closed. A check for that has been added.
2025-02-19 18:06:12 +01:00
Kacper Donat
13fbab9e42 Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
2025-02-17 21:10:26 +01:00
Joao Matos
aace8f7bee CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00
Roy-043
245a2fada7 Draft: task_scale.py fix circular imports (#19574)
See:
https://forum.freecad.org/viewtopic.php?t=94748
2025-02-13 16:02:24 +01:00
Roy-043
01409c1407 Draft: gui_utils.py fix error in select function (#19539)
* Draft: gui_utils.py fix error in select function

PR #18795 changed the select function to also handle tuples. This PR adds a check to ensure the referenced objects in the tuple still exist before calling `Gui.Selection.addSelection()`.
2025-02-13 16:00:30 +01:00
Roy-043
ecfde4eed9 Merge pull request #19477 from Roy-043/Draft-Introduce-Edit-option-for-Draft-Clone-scaling
Draft: Introduce Edit option for Draft Clone scaling
2025-02-10 16:16:59 +01:00
Roy-043
1de045ae66 Draft: make arrays explodable
Fixes #13085.

This PR adds the `PlacementList` property to non-link arrays.
2025-02-08 19:20:33 +01:00
Roy-043
f3854d155a Draft: Introduce Edit option for Draft Clone scaling
Fixes #13324.

The Edit option is available from the Tree view context menu, but you can also double-click the clone in the Tree view.

The task panel is based on that of the Draft Scale command. The "Uniform scaling" checkbox is (un)checked depending on the current scaling of the clone.
2025-02-08 11:22:20 +01:00
Roy-043
a70cd6e6e3 Merge pull request #19470 from Roy-043/Draft-add-some-checks-for-font-file-of-shapestring
Draft: add some checks for font file of shapestring
2025-02-07 20:38:06 +01:00
Roy-043
d93cec7063 Draft: add some checks for font file of shapestring
Fixes #19447.
2025-02-07 20:03:49 +01:00
Roy-043
5948edda64 Merge pull request #19427 from Roy-043/Draft-implement-Draft_AddToLayer-command
Draft: implement Draft_AddToLayer command
2025-02-07 18:40:34 +01:00
Roy-043
20c920375c Draft: Fix line length input issue
Fixes #19451.
2025-02-07 13:38:56 +01:00
Chris Hennes
d4d74a4464 Merge pull request #19433 from tritao/gui-general-code-cleanups
Gui: General code cleanups
2025-02-06 11:33:44 -06:00
Yorik van Havre
4a0fbe8768 Draft: Fixed small bug in draftgeoutils.edges 2025-02-06 13:56:08 +01:00
Roy-043
e47af7645c Draft: improved handling of 'crazy' edges in hatch
See #14114.
2025-02-06 13:43:52 +01:00
tritao
4260bd6fa4 Gui: Minor cleanups. 2025-02-05 22:13:07 +00:00
Roy-043
375750d89d Draft: implement Draft_AddToLayer command
Fixes #17323.

* Instead of extending Draft_AddToGroup a separate, but similar, command has been created.
* The three "Add to" tools have been grouped in the menu and the toolbar.
* The Draft_AddToGroup icon is provisional. Ideally the "Add to" tools should have related icons (it would then be nice to keep the trowel image in some way for the construction group). Draft_AddNamedGroup.svg and Draft_SelectGroup.svg probably also need to be updated in that context.
2025-02-05 16:21:58 +01:00
Paweł Pohl
2087ce149f Draft: New path array features - reverse path, etc (#19017)
Some missing quality-of-life features in Path Array:
1. A setting to reverse path
2. A "Fixed spacing" mode
3. Ability to use spacing patterns
2025-02-05 15:16:25 +01:00
Paul Lee
7e06bb1ec2 [Draft_shape2dview] Fix Bug : Closed Wall Wrong Fill
Git-hub issues : https://github.com/FreeCAD/FreeCAD/issues/16363#issuecomment-2619643946

"Problem description

In a group of closed walls, the entire interior is completely filled, which should not be the case."
2025-02-05 10:09:09 +01:00
Roy-043
f98d4f8646 Draft: Avoid setRadiusValue error message
Fixes #19386.
2025-02-04 16:25:53 +01:00
Roy-043
a2ab84c6b1 Draft: improvements for gui_groups.py (#19312)
* Draft: improvements for gui_groups.py

* All actions are handled as transactions to make them undoable.
* In the Draft_AutoGroup menu groups are separated from layers.
* The Draft_NewLayer.svg icon is used for the New layer option.
* Selecting that option prompts for a layer name and also activates that layer.
* Icons and separators have been added to the Draft_AddToGroup menu.
* The task panel of that command has been replaced with a QInputDialog.getText dialog for consistency.

* Forgot "..." somewhere

* Wrong year in the copyright notice.

* Minor tooltip tweaks
2025-02-04 11:54:33 +01:00
Roy-043
714a4e15e2 Draft: fix three issues with DraftGui.py (#19343)
Fixes #19305.
Fixes #19324.

Issues above caused by #19179.

Also removes automask code as it did not work properly in several cases. For example if the working plane was set to Front and the Global option was checked only the X coordinate could be entered.
2025-02-04 11:53:05 +01:00
Mino-Tsuzuku
0ce232b38a * Move pyopen with encoding to utils. (#19377)
and modify all importing library to use pyopen with encoding.
with this change, DXF OCA AirfoilDAT with multibyte sequence always read as utf-8.
2025-02-04 11:33:43 +01:00