Commit Graph

3446 Commits

Author SHA1 Message Date
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
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
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
Roy-043
52fcdda6cf Merge pull request #13612 from cjmayo/draft-byteCount
Draft: Fix QImage object has no attribute 'byteCount'
2024-04-25 09:20:10 +02:00
Roy-043
7407eee427 Draft: revert Draft WB changes from #13294
Revert the Draft WB related changes of #13294.
2024-04-24 21:27:04 +02:00
Chris Hennes
1ec93fdbc2 Update translations
Note: Web and Start omitted
2024-04-24 13:58:21 -05:00
Chris Mayo
213b61427a Draft: Fix QImage object has no attribute 'byteCount'
'PySide6.QtGui.QImage' object has no attribute 'byteCount'
load_texture: unable to load texture
2024-04-23 19:35:54 +01:00
wwmayer
c4c453312d PySide6: Fixes #13533: QSvgWidget is not a child of QtSvg in PySide6 (#13554)
* Create a compatibility module QtSvgWidgets.py to handle PySide2 & PySide6
* In the Arch and Material modules use the QtSvgWidgets module
* Since Qt6 the method QFont.setWeight() doesn't accept an int any more but requires an enum. Since the call of QFont.setBold(True) sets
  a weight of 75 the extra calls of QFont.setWeight(75) can be safely removed

Co-authored-by: Adrián Insaurralde Avalos <36372335+adrianinsaval@users.noreply.github.com>
2024-04-22 18:35:33 -04:00
WandererFan
689a13527c Merge pull request #13489 from yorikvanhavre/draft-axes-colors
Draft: Use preference-stored colors for axes colors
2024-04-22 12:08:17 -04:00
Roy-043
e972755545 Draft: Move MouseDelay pref to General group and set max value
* The MouseDelay pref does not belong in the "Grid and snapping" pref group.
* Max. value was missing. Without it the spinbox only goes to 100.
* The 3600 suggestion was removed from the tooltip as it is an unworkable value. But entering it is possible now.
2024-04-21 20:05:29 +02:00
Roy-043
64bcdbf961 Draft: Fix error when deleting first digit of input
Fixes #13150.
2024-04-19 19:16:13 +02:00
Roy-043
a043cfa376 Draft: Draft_ToggleGrid should update the grid
Fixes #13530.
2024-04-19 15:42:28 +02:00
Chris Hennes
6d504a0351 Update translations. 2024-04-17 16:50:38 -05:00
Roy-043
76554835ba Draft: FIx issue with get_shape_normal
Forum topic: https://forum.freecad.org/viewtopic.php?t=86817
2024-04-16 15:04:49 +02:00
Yorik van Havre
d67cd2b925 Draft: Use preference-stored colors for axes colors - issue #12208 2024-04-16 10:20:01 +02:00
David Carter
495a96a0f5 Material: Material appearance
Uses new material system for appearance

Each feature object now has a property called ShapeMaterial that
describes its physical properties. If it has a shape, it has a
material.

The ShapeColor attribute is replaced by a ShapeAppearance attribute.
This is a material list that describes all appearance properties, not
just diffuse color. As a list in can be used for all elements of a
shape, such as edges and faces.

A new widget is provided to allow the user to select materials in a
consistent fashion. It can also launch the material editor with its
more advanced capabilities.
2024-04-04 07:39:58 -05:00
paul
d3d18ac7e0 [ArchWall] getExtrusionData() fix normal problem by adding get_shape_normal() (#12603)
* [ArchWall] getExtrusionData() fix normal problem by adding get_shape_normal()

In geometry.py
- added get_shape_normal()
- fixed is_straight_line()
DraftGeomUtils.py
- added get_shape_normal()

FC Discussion - https://forum.freecad.org/viewtopic.php?p=726101#p726101

* [ArchWall] getExtrusionData() fix normal problem

Follow-up following discussion at https://github.com/FreeCAD/FreeCAD/pull/12603

- delete trailing whitespaces
- put Part.makePolygon() in try statement
- study and findings at https://github.com/FreeCAD/FreeCAD/pull/12603#issuecomment-1969277743

In geometry.py
- added get_shape_normal()
- fixed is_straight_line()
DraftGeomUtils.py
- added get_shape_normal()

FC Discussion - https://forum.freecad.org/viewtopic.php?p=726101#p726101

* Update geometry.py

* Update geometry.py

* Update geometry.py

---------

Co-authored-by: Yorik van Havre <yorik@uncreated.net>
2024-04-02 11:54:27 +02:00
Chris Hennes
49451b3c7f Merge pull request #13154 from chennes/translations20240325
Update translations and fix script
2024-03-28 13:51:39 -05:00
Roy-043
0651883feb Draft: add Fuse property to patharray and pathtwistedarray
See #13172.
2024-03-28 12:03:46 +01:00
Roy-043
723d68f16d Draft: add Fuse property to pointarray
Fixes #12906.
2024-03-26 22:36:18 +01:00
Roy-043
e7c0d969f4 Merge pull request #13051 from yorikvanhavre/draft-wp-set-color
Draft: Allow to change grid color in WP taskpanel
2024-03-26 11:17:13 +01:00
Chris Hennes
af131413c5 Update translations 2024-03-25 18:08:22 -05:00
Chris Hennes
47df83c4db Translation update: move Path to CAM 2024-03-25 17:32:59 -05:00
Yorik van Havre
1f195b428a Merge branch 'main' into draft-wp-set-color 2024-03-25 18:37:00 +01:00
Roy-043
f90b47cbbc Let param observer trigger grid color change
If you change the grid color in the preferences and cick the Apply button, the color of all grids is updated now. So you can experiment while the Preferences Editor is open.

I have kept but moved the grid color button in the Draft_SelectPlane task panel for now. So that both options can be tested.
2024-03-24 09:58:51 +01:00
Roy-043
33962bc945 Draft: fix handling of shapes in shape2dview.py
Fixes a problem introduced with #10712. If the Shape is not a Compound, the shape itself, and not its SubShapes should be used.
2024-03-22 18:17:04 +01:00
Roy-043
fa49577838 Draft: Improve logic of Draft_Label texts
The proposed code fixes the following issues:
1. There is no check if the target object itself has a property that matches the label type.
2. If a subelement is selected that does not have the label type property, the value from the main object is displayed instead.
3. The default text is an empty string.

Example:

Currently If you select a vertex of a wire, and select "Length" as the label type, you will get the length of the wire. With the new code the text will then be "Length not available for (sub)object".

Forum topic (issue #1):
https://forum.freecad.org/viewtopic.php?t=86222
2024-03-20 18:29:01 +01:00
Yorik van Havre
70f2f14702 Draft: a bit more contrast to the grid 2024-03-20 13:35:40 +01:00
Yorik van Havre
d0a87573c9 Draft: Allow to change grid color in WP taskpanel 2024-03-20 12:20:31 +01:00
Yorik van Havre
aa47a7fe6b Draft: Made get_type aware of IFC objects 2024-03-18 18:50:56 +01:00
FEA-eng
0def330a9e DRAFT: Update preferences-draftsnap.ui 2024-03-15 13:01:56 +01:00
Chris Hennes
cbb10b0496 Draft: Remove trailing spaces from translations 2024-03-12 22:42:20 -05:00
Yorik van Havre
4e3467ae5e Draft: Allow to prevent layers to claim children 2024-03-11 12:29:13 -05:00
Chris Hennes
9dac8385f6 Fix missing translations in task panel (#12738)
* Draft: Add missing translation to task panel

* PD: Add missing translation to task panel
2024-03-11 18:10:42 +01:00