Commit Graph

455 Commits

Author SHA1 Message Date
Roy-043
592547fd60 Draft: renaming of anno style could fail
The error occurred if the style was in use.
2023-11-06 11:40:24 -06:00
Roy-043
a2e85a4ae1 Draft: Updates related to the PlaneGui class (step 4)
Related issue:
#5603.

For gui_snapper.py and gui_trackers.py an intermediate solution has been adopted. They still rely on App.DraftWorkingPlane, but now use a small function to retreive it.

Simply switching to the PlaneGui class is problematic for the trackers as this results in an endless recursion (wp->grid->wp->...). Using the old App.DraftWorkingPlane (which is kept up-to-date by PlaneGui) solves this for now. I will try to return to this later (which may be after the next release though).
2023-10-31 15:41:21 +01:00
Roy-043
3b1c590b53 Merge pull request #11117 from Roy-043/Draft-Updates-related-to-the-PlaneGui-class-(step-2)
Draft: Updates related to the PlaneGui class (step 2)
2023-10-27 10:49:56 +02:00
Roy-043
f12c3604d6 Draft: Draft_SelectPlane was not correctly finished in case of a pre-selection
Fixes #11157.
2023-10-24 10:44:46 +02:00
Vincenzo Calligaro
50725bf253 [Feature Request] [Draft] [UI/UX] new Draft_Hyperlink command (#10878)
* Draft: added the new Draft_Hyperlink command

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>

* Draft: added the new Draft_Hyperlink command
 * Updated regex condition for more Windows file paths and network resources
 * Added check for file existence
 * Modified syntax for Win32/CygWin case
 * Declared ret variable outside if statement

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>

* Draft: added the new Draft_Hyperlink command
 * Replaced os.startfile and subprocess.call with QDesktopServices.openUrl
 * Removed unused Python dependencies

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>

---------

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2023-10-23 17:42:47 +02:00
Roy-043
ca06e87a38 Draft: Updates related to the PlaneGui class (step 2)
Related issue:
#5603.

Additionally:
Fixed the issue where the texts of Arch_Space objects were not exported to DXF.
2023-10-23 16:25:12 +02:00
Roy-043
35ab4a28c9 Draft: Fix Gui.doCommand issue in gui_planeproxy caused by PR11080 (#11134)
The previous code resulted in a syntax error.
2023-10-22 11:15:00 +02:00
Roy-043
f0db4e8ef5 Draft: Updates related to the PlaneGui class
Related issue:
#5603.
2023-10-18 09:50:50 +02:00
Roy-043
0c4dd64f1d Draft: Make Facebinders link-aware
Forum topic:
https://forum.freecad.org/viewtopic.php?t=81997

Additionally:
* Fixed offset and extrusion for non-planar faces.
* Improved the addSubobjects function,
* Cleaned up the code a little bit.
2023-10-18 09:50:18 +02:00
Roy-043
cf9b342cd4 Draft: Update gui_selectplane.py
Related issue:
#5603

Previous PR:
#11010

* This PR implements the new PlaneGui class for the Draft_SelectPlane command.
* As mentioned in the previous PR, almost all working plane related code has been removed from gui_selectplane.py.
* The task panel has a new button "Next" to switch to the next working plane in the history.
* Both the "Previous" and "Next" buttons are only enabled if there is a corresponding step in the history.
* PlaneGui stores a working plane per 3D view, but the other commands have to be updated before that system is fully functional.
* Code to update the toolbar when switching to a different view will be added later.
2023-10-17 15:05:28 +02:00
Roy-043
fd609b4e37 Draft: Fix angular dimension issue caused by #10556
Forum topic:
https://forum.freecad.org/viewtopic.php?t=81956

This PR basically reverts PR #10556.

The angular offset required for the Draft_Arc command is handled in the gui_arc.py file instead. Also removed the unused `urotated` variable from that file.
2023-10-17 15:05:12 +02:00
Roy-043
80f97a588a Draft: Fix cursor scaling issue
Fixes #6793
2023-10-09 14:01:21 +02:00
Roy-043
f5a3cf4d03 Draft: gui_edit called displayPoint without mask (#10693)
Forum topic:
https://forum.freecad.org/viewtopic.php?t=81186
2023-09-16 17:08:50 +02:00
Roy-043
65cd8adca8 Draft: arcTracker did not take Working Plane rotation into account
Steps to verify the issue:
1. Open FreeCAD.
2. Switch to Std_ViewTop.
3. Click one of the curved arrows of the Navigation Cube.
4. Switch to the Draft WB.
5. Make sure Draft_SelectPlane is set to "Auto".
6. Start Draft_Arc and click 2 points (for the radius and the start angle).
7. Result: The displayed arc does not match the start angle or the current point.

Additonally:
* Removed the normal argument from `__init__`. The tracker does not work properly with just a normal. AFAICT there is no code that specifies this normal.
* Minor improvement to `getAngle`: Switched the vectors.
2023-09-05 15:39:17 +02:00
Yorik van Havre
41a1a7a8e6 Merge pull request #10505 from Roy-043/Draft-Fix-angle-range-issue-of-make_circle
Draft: Fix angle range issue of make_circle
2023-09-04 11:29:13 +02:00
Roy-043
3cf51debca Ammended files based on review 2023-09-03 12:43:34 +02:00
Roy-043
29c12225d0 Draft: Correct mistake in PR10160 (#10506)
`self.gui_tools_repository` is an instance of a class that manages a dictionary, it is not a dictionary itself.
2023-09-02 23:37:16 +02:00
Roy-043
e02cfb2f38 Typo... 2023-09-02 23:04:41 +02:00
Roy-043
f8a5150e6f Draft: Fix angle range issue of make_circle 2023-09-02 20:48:40 +02:00
Roy-043
ccbc52affd Draft: Remove unused import WorkingPlane 2023-08-29 18:59:40 +02:00
Roy-043
a205ee549f Draft: Fix Draft_Mirror preview 2023-08-29 16:25:42 +02:00
Roy-043
36fdbdd6d9 Draft: Reduce occurrences of App.DraftWorkingPlane 2 (#10390) 2023-08-28 10:17:58 +02:00
Roy-043
b8f0de8dd3 Draft: Reduce occurrences of App.DraftWorkingPlane (#10388) 2023-08-28 10:16:36 +02:00
Roy-043
2c317cd40a Draft: Make gui_tool_utils.get_support nesting aware (#10373)
The get_support function did not work for objects nested in, for example, Std_Parts.

Additionally improved and cleaned up the code, and reduced the docstrings.
2023-08-27 12:41:25 +02:00
Roy-043
e9294f2dbb Draft: remove superfluous code from gui_points.py (#10379) 2023-08-27 12:41:01 +02:00
Roy-043
c9975f39f8 Draft: Add wp attribute to DraftTool class (#10386)
It makes sense to have this attribute. It will also facilitate the coming work related to the Plane class.

Additionally: Removed the `not self.doc` check from `Activated` as `IsActive` already handles this.
2023-08-27 12:40:30 +02:00
Roy-043
602841c5f0 Draft: Remove unused arguments from gui_tool_utils.get_point (#10347) 2023-08-25 03:49:06 +02:00
Roy-043
971e74b7db Draft: Housekeeping and minor improvements for some draftguitools (#10339) 2023-08-25 03:47:39 +02:00
Roy-043
5c4d8730d9 Draft: Add placement_from_points to geometry.py
Changed getPlacementFromPoints function in WorkingPlane.py to a compatibility function that calls placement_from_points.
2023-08-23 11:17:17 +02:00
sliptonic
d95d633b99 Merge pull request #10230 from chennes/draftTranslateDraftAxisLabels
Draft: translate draft axis labels
2023-08-21 11:10:25 -05:00
Chris Hennes
997b8eff5c Draft: Translate task titles for draft tools (#10227) 2023-08-17 16:01:15 +02:00
Chris Hennes
6d910baa82 Draft: Translate Dimension and axis labels 2023-08-14 08:14:32 -07:00
Roy-043
beb996e6a1 Draft: Avoid dictionary.keys() where possible (#10160) 2023-08-13 11:46:25 +02:00
luzpaz
525eacca39 Fix various typos 2023-07-15 11:17:45 +02:00
Roy-043
d8150a9cd9 Draft: fix near snap for meshes (#9719) 2023-06-05 09:58:50 +02:00
Roy-043
a5c9da55cf Draft: fix getcoords in gui_snapper.py (#9654)
The function did not handle global and relative mode properly
2023-05-26 19:45:31 +02:00
Roy-043
6835eaf702 Draft: Draft_CubicBezCurve: set EnableSelection to False, fixes #6452 (#9640)
While the command is active set EnableSelection to False to correctly detect mouse up events.
2023-05-24 20:35:24 +02:00
Yorik van Havre
f68c045ff7 Draft: Fixes continuing dimensions - fixes #9507 (#9632) 2023-05-24 20:34:52 +02:00
Roy-043
c5bf5d117b Draft: remove obsolete gui_array_simple.py (#9616) 2023-05-20 10:37:31 +02:00
Roy-043
a23142881a Draft: Draft_Move continue mode failed with numeric input (#9597) 2023-05-17 18:56:36 +02:00
Yorik van Havre
d90c81bc7b Draft: Added dim overshoot parameters to Style task dialog (#9514)
* Draft: Added dim overshoot parameters to Style task dialog - fixes issue #9507

* Draft: additional fixes to styles task dialog
2023-05-13 21:01:51 +02:00
luzpaz
cd6efa23c6 Draft: modfified translate function to allow comments
Also fixed incorrect typos in previous commit
2023-05-04 13:28:10 +00:00
luzpaz
c6b2b3fae3 Draft: Add l10n context for ambiguous string
Also tweaked code formatting
Closes #9406
2023-05-04 13:28:10 +00:00
Yorik van Havre
bf944220a8 Draft: small optimization in snapper - issue #5761 (#9239) 2023-04-25 10:16:47 +02:00
luzpaz
129d5882a7 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
Roy-043
d19c44a8ac [Draft] Disable Draft_AddConstruction if there is no selection (#9322) 2023-04-20 08:51:44 +02:00
luzpaz
78bdc34996 Draft: linting bad indentations, superflous markup (#9313) 2023-04-19 09:48:57 +02:00
alafr
7a13209a32 Draft: avoid precision loss of SoCoordinate3 (#9202) 2023-04-12 15:32:14 +02:00
mosfet80
889ad11e02 [Draft] Remove obsolete code related to Drawing WB
* [Draft] Remove obsolete code related to Drawing WB




remove unused elif

* [Draft] Remove obsolete code related to the Drawing WB

* Update preferences-draftvisual.ui

Also remove the template label.

* Update utils.py

Remove reference to "template"

* Remove Draft_Drawing.svg from Draft.qrc

---------

Co-authored-by: Roy-043 <info@b-k-g.nl>
Co-authored-by: Roy-043 <70520633+Roy-043@users.noreply.github.com>
2023-04-03 16:36:23 +02:00
Yorik van Havre
45001fa160 Merge pull request #8795 from yorikvanhavre/draft-layermanager
Draft: Added LayerManager command from BIM
2023-03-15 11:59:59 +01:00