Commit Graph

3477 Commits

Author SHA1 Message Date
Roy-043
977b20d603 Draft: remove code related to obsolete Std_MeasureDistance objects
The Draft_Dimension command could convert Std_MeasureDistance objects. These have recently become obsolete. This PR removes the related code.
2024-06-24 10:31:03 +02:00
Roy-043
da1b81ceb1 Draft: Remove Draft_Fillet chamfer recalculation
If two straight edges were selected the chamfer distance would be recalculated so that the length of the straight segment would be equal to `r` (the radius entered by the user). But this was, and is, not done if one or both edges are arcs.

By removing the recalculation code the endpoints of the straight chamfer edge now always match the endpoints of the fillet arc that would be created for the same radius. This also matches the fillet/chamfer behavior in for example Part and Sketcher.
2024-06-24 10:08:45 +02:00
Roy-043
2aa7296cc6 Draft: Add type check to Draft_Join
Add a type check for the selected objects. All must be Draft Wires.

Fixes #14727.
2024-06-20 14:05:21 +02:00
Roy-043
1ba341194e Draft: Fix 2 issues to make Draft_Fillet handle arcs properly
Fixes #11435

Draft_Fillet could already handle arcs, provided they were not Draft_Arcs. The `_extract_edge` function in make_fillet.py had a strange logic, and could also return a wire which would result in problems later.

Another issue was that the `fillet` function in fillets.py did not handle the order of the edges correctly if one of the edges was an arc and the other a straight edge. The arch had to be selected first to prevent this error.
2024-06-20 14:00:42 +02:00
Roy-043
8f1e415eac Draft: Fix onChanged in view_point.py
Fixes #14804

Added (also don't make sense for a point object):
* AngularDeflection
* DrawStyle
* Pattern
* PatternSize

Removed:
* DiffuseColor (property no longer exists)
* LineMaterial (already hidden by default)
2024-06-20 13:46:00 +02:00
Roy-043
246aa8e1eb Draft: Draft_Hatch put focus on task panel
To make using Esc work properly the task panel should have the focus.
2024-06-17 11:25:01 -05:00
Roy-043
f2d3cf701a Draft: Draft_Split put focus on 3D view
To make using Esc work properly the 3D view should have the focus.
2024-06-17 11:24:36 -05:00
FEA-eng
4882a33d46 Update shape2dview.py 2024-06-17 11:22:18 -05:00
Roy-043
da2ae11ca0 Draft: revert #14206 to fix WP alignment (#14665)
#14206 was an intermediate solution. Now that  `Part.getShape` can handle the new `SubElementNames` it needs to be removed as it breaks the handling of subelements in links.
2024-06-16 16:53:02 +02:00
Roy-043
30f7f26889 Removed WP related change 2024-06-14 10:41:35 +02:00
Roy-043
a02d4a3cff Draft: revert #14206 to fix WP alignment
#14206 was an intermediate solution. Now that  `Part.getShape` can handle the new `SubElementNames` it needs to be removed as it breaks the handling of subelements in links.
2024-06-14 10:41:35 +02:00
Furgo
4500d0fd07 Draft toggle grid as a toggle button to indicate grid visibility (#14452)
Makes the button for the Draft_ToggleGrid command act as a real toggle button to provide visual feedback of the grid visibility state.

---------

Co-authored-by: Syres916 <46537884+Syres916@users.noreply.github.com>
2024-06-13 15:31:29 +02:00
Roy-043
91c7d8bfc9 Draft: _get_shapes in shape2dview.py did not handle null shapes (#14646)
Null shapes do not have a ShapeType (strange IMO). The function did not take that into account.

Forum topic:
https://forum.freecad.org/viewtopic.php?t=88397
2024-06-13 15:27:47 +02:00
Roy-043
7496eb94f8 Draft: Fix two Layer warnings (#14506)
There are two unnecessary Layer warnings:
1. A 'might break' warning when deleting an object nested in a layer.
2. An 'out of scope' warning for objects also nested in f.e. a Std_Part.

To avoid them the Group property type was changed to `App::PropertyLinkListHidden`.
2024-06-06 15:53:49 +02:00
Chris Hennes
696196d8f0 Update translations 2024-06-03 11:04:42 -05:00
Yorik van Havre
dd7a8c3eba Draft: Fixed ghosts vanishing when using mouse delay - issue #12624 (#14358) 2024-05-30 22:41:54 +02:00
wmayer
4185605d5e clang/gcc: Add build option FREECAD_WARN_ERROR to force to make warnings into errors 2024-05-29 13:37:07 +02:00
paul
797f8f9cf3 [ArchWall] Add Offset per Edge Feature (#14277)
* [ArchWall] Add Offset per Edge Feature

ArchWall.py - Add Override Offset property & ground work for Multi-Layer Wall
Offsets.py - Add offset per edge support to ArchWall

Forum Discussion :
- https://forum.freecad.org/viewtopic.php?p=759634#p759634

* [ArchWall]  Fix bug found by unit test

'off' is no longer used, 'offsets' is used.
2024-05-28 10:39:21 +02:00
Roy-043
524b106ea8 Draft: fix _get_shapes in shape2dview.py (#14319)
Fixes #14312.

The `new _get_shapes` function could return the original object shape. This caused a problem if `sh.reverse()` executed.

Note that the file in the linked issue does not produce the error as it does not contain a shape with a negative volume.
2024-05-28 09:45:48 +02:00
Roy-043
8bcbeae68b Draft: Draft_Layer new Material handling (#13949)
Discussion: #13657.

This PR adds  the ShapeAppearance view property to Draft Layers.

The DefaultShapeColor is used for the DiffuseColor of the ShapeAppearance material. Other material properties are not based on the preferences when a layer is created.

The old ShapeColor and Transparency properties remain (ShapeColor as a hidden property) and are kept in synch with the ShapeAppearance. This is consistent with how ShapeAppearance is implemented in Core.

The gui_layers.py and make_layer.py files do not have to be changed. They manipulate the vobj via the mentioned old properties.
2024-05-28 09:45:05 +02:00
Yorik van Havre
b057e6eb74 Draft: Enable TPN in SelectPlane - fixes #14196 2024-05-27 11:29:29 -05:00
Roy-043
7d08671392 Draft: update fuse behavior in facebinder.py
Fixes #14242.

In the current dev fusing an empty shape with a face or solid no longer works (probably introduced with #14169). The reason for starting with an empty shape was the assumption that the end result would then always have a default placement. But that is only correct if multiple objects are fused.

In the new version of the code fusing no longer starts with an empty shape. The default placement issue is solved by always returning a compound.

Additionally the value for the Area property is now taken after offsetting and fusing the faces.
2024-05-27 12:16:24 +02:00
Chris Hennes
d4f780782d Update translations
Arch->BIM is a WIP
2024-05-25 19:11:51 -05:00
Roy-043
bfbe28f7a5 Draft: Draft_Hatch workaround for TD edge length limit (#14114)
Edges longer than ca. 10m are considered 'crazy' in the TD Workbench. Hatch patterns are also checked. As a workaround some intermediate scaling is applied.

Addionally: `transformShape` instead of `transformGeometry`. The latter results in B-splines.
2024-05-18 11:39:08 +02:00
Roy-043
af36a49d68 Draft: improved IsActive behavior (#14103)
Related issue: #14061.
2024-05-18 11:38:38 +02:00
Furgo
a094bf0df7 Update grid size nomenclature (#13093)
* Update grid nomenclature to major/minor. Closes #13090
2024-05-16 22:24:04 +02:00
Roy-043
fa79c9d987 Draft: Draft_Split fix unhandled exception (#14059)
Fixes #13951.

Regression introduced by #12261.
2024-05-16 22:02:56 +02:00
Roy-043
33486369a5 Draft: Draft_Slope input did not obey Decimals pref (#14060)
Forum topic:
https://forum.freecad.org/viewtopic.php?t=87686
2024-05-16 22:02:25 +02:00
Chris Hennes
fef3a24187 Merge pull request #13914 from Roy-043/Draft-Draft_SetStyle-new-Material-handling
Draft: Draft_SetStyle new Material handling
2024-05-13 11:22:11 -05:00
marcuspollio
fd01f325b3 Update Draft WB icons (#13585)
* Update Draft WB icons

* Also make all icons 64px based

* keep inner white outline and small tweaks

* Tweaks following review

* Further tweaks following feedback

* Tweak more icons for consistency with light/dark themes

* Update following PR 13865, save as Plain SVG and remove unused ressources

Update texts for visibility

Some more cleanup

Use consistent FreeSans font
2024-05-13 11:20:42 -05:00
wmayer
8fcaaed275 Draft: refactor TestDraftGeomUtils 2024-05-13 09:15:35 +02:00
Chris Hennes
e703615603 Update translations 2024-05-12 17:06:56 -05:00
Roy-043
ec44573bdc Draft: minor refactor of layer code (#13948) 2024-05-12 09:49:04 +02:00
Roy-043
10a25ebf98 Draft: Update v0.22 references to v1.0 (#13934) 2024-05-12 09:47:51 +02:00
Roy-043
53c6fbc843 get_appearance_material -> get_view_material
Also removed the ret_default argument.
2024-05-11 10:11:16 +02:00
Roy-043
2f9b97ce3a Draft: Add "legacy importer only" to DXF option (#13638)
* Draft: Clarify "legacy only" DXF options in the preferences

Fixes #13598.
2024-05-09 11:12:19 +02:00
Roy-043
4fcbff191f Draft: Draft_SetStyle new Material handling
Discussion: #13657.
2024-05-09 10:49:19 +02:00
Chris Hennes
a2b0941540 Update translations
Also removes Web from translation scripts.
2024-05-06 18:17:53 +02:00
Martin Rodriguez Reboredo
9759da82e4 Fixups with Qt6 enums (#13611)
* Python PySide enums to C++ converter

* Python IntFlags to C++ int in getStandardButtons

* Remove int conversion in mods Python sources
2024-05-06 18:02:18 +02:00
Roy-043
bd39f4396d Clean up... 2024-05-06 11:07:23 +02:00
Roy-043
34afffc148 More files are involved... 2024-05-06 11:07:23 +02:00
Roy-043
22dc172154 Draft: Do not show temporary line object in tree (additional)
#13778 introduced `self.obj.ViewObject.ShowInTree = False` to hide the temporary object. But objects that are hidden in the tree are displayed in the tree when they are selected in the 3D view. This selection occurs during commands that take more than 2 points. The solution is to change `self.obj.ViewObject.Selectable` on mouse button up/down.

Fixes #13700.
2024-05-06 11:07:23 +02:00
Roy-043
b45bf9ba13 Merge pull request #13778 from yorikvanhavre/draft-hide-templine
Draft: Do not show temporary line object in tree
2024-05-02 22:28:11 +02:00
Yorik van Havre
b731b8a9e8 Draft: Do not show temporary line object in tree - fixes #13700 2024-05-02 11:04:15 +02:00
Roy-043
107964c2c1 Draft: update Draft Point viewprovider to account for ShapeAppearance
Without this mod there is an error when opening a V0.21 file with a Draft Point. As well as when creating a Draft Point in V0.22.
2024-05-02 10:09:28 +02:00
Dov Grobgeld
ff11cd25ee Fix run time errors with python3.12 and pyside6 (#13337)
* Change pyopen=open expression to from builtins import open as pyopen

---------

Co-authored-by: Adrián Insaurralde Avalos <36372335+adrianinsaval@users.noreply.github.com>
2024-04-30 00:28:01 -04:00
Roy-043
d787f382d5 Only imported modules can be reloaded 2024-04-29 16:15:58 +02:00
Roy-043
6c5cc7d9d9 Draft: legacy DXF importer: downloaded libs should be reloaded
Otherwise old versions will still be used in the current FreeCAD session.
2024-04-29 16:15:58 +02:00
Roy-043
de37e94f32 Draft: legacy DXF importer fix group and layer behavior
Fixes #13621.

Currently the legacy DXF importer creates a main group with the DXF name if a DXF is imported into an existing FreeCAD document. For each DXF layer it then creates a sub-group (or Draft Layer) inside that main group. Objects are nested in the sub-groups (or Draft Layers).

This does not make sense for Draft Layers as they should be nested in the LayerContainer, which should be in the root of the FreeCAD document.

Both for Draft Layers and sub-groups there is the issue that if mutliple DXF files are imported in the same FreeCAD document, exising Draft Layers and sub-groups are not taken into account. For each DXF a new "0" group/layer is created (with a Label that is not "0" and therefore not recognized), and if there are objects on that layer a new group/layer is created for each object (labelled "0001", "0002", "0003", etc).

To solve this the main group with the DXF name is no longer created in the revised code and the layers variable is initialized with the groups/layers that already exist in the FreeCAD document.

Additionally the formatObject function should not format objects that are in Draft Layers. Its action conflicts with the layer mechanism resulting in the last imported object having an incorrect color.
2024-04-29 16:15:16 +02:00
Roy-043
d92f74ef01 Merge pull request #13633 from Roy-043/Draft-revert-Draft-WB-changes-from-13294
Draft: revert Draft WB changes from #13294
2024-04-26 10:46:05 +02:00