Commit Graph

146 Commits

Author SHA1 Message Date
luzpaz
a71f49f4f6 Fix trailing newlines and minor typo fixes 2024-07-23 16:16:30 +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
ec44573bdc Draft: minor refactor of layer code (#13948) 2024-05-12 09:49:04 +02:00
Chris Hennes
cbb10b0496 Draft: Remove trailing spaces from translations 2024-03-12 22:42:20 -05:00
Josh Coalson
a8ae56e06a Part: Rename AttachExtension::Support property to AttachmentSupport, to avoid name conflict with base features. Fixes #7052 2024-03-04 18:22:43 +01:00
Roy-043
faa9ad4c16 Draft: remove reapply_diffuse_color workaround step 2
Stuff that was missed in #11946
2024-02-15 22:28:37 +01:00
Roy-043
c5d0fbd707 Merge pull request #12250 from Roy-043/Draft-Fix-messages-that-only-worked-for-objects-supplied-as-strings
Draft: Fix messages that only worked for objects supplied as strings
2024-02-04 11:51:29 +01:00
Roy-043
7ca885eb25 Removed too much in make_label.py 2024-02-04 09:50:45 +01:00
Roy-043
e6c68aab31 Draft: Fix messages for Draft_Fillet
There were still too many messages.
2024-02-03 19:46:20 +01:00
Roy-043
178070af5d Draft: Fix messages that only worked for objects supplied as strings
Some error messages would only work if objects were supplied as strings. These would fail if objects were passed (as objects) that had already been deleted.
2024-02-03 19:38:49 +01:00
Roy-043
90c90f705b Merge pull request #12234 from Roy-043/Draft-Draft_Arc_3Points-minor-consistency-update
Draft: Draft_Arc_3Points minor consistency update
2024-02-02 18:07:37 +01:00
Roy-043
ee3e1cd5ce Merge pull request #12230 from kpemartin/Issue11876
Remove excessive output from Draft object creation and editing
2024-02-02 18:06:02 +01:00
Kevin Martin
02ebb17558 Eliminate many "doing what you told me to" messages
These messages were perhaps originally intended as a debuggin aid but now add clutter to the output panes. Remaining messges are mostly the result of methods to display attributes of an object (which one could call from the Python console) or actually provide some information which would not be obvious from the circumstances
2024-02-02 08:58:45 -05:00
Roy-043
253c343d73 Draft: Draft_Arc_3Points minor consistency update 2024-02-02 14:11:55 +01:00
Roy-043
86195fb8b3 Draft: Draft_Fillet minor consistency update 2024-02-02 11:29:43 +01:00
Roy-043
0eb8f1f750 Draft: Avoid draftToolBar.getDefaultColor outside DraftGui.py
The draftToolBar.getDefaultColor() function is an indirect way of retreiving a parameter. It is better to avoid it where possible.
2024-02-01 18:02:10 +01:00
Roy-043
5b98a762d1 Draft: Improve layer functions
The current make_layer function has a `None` default for the shape color and the line color. With that value the current preference is used. This, and how the function is called, results in some confusing behaviors:
* Newly created layers will only use 2 values from the preferences when they might use 5. The latter makes more sense for the end-user IMO.
* Layers created during DXF import (for example) will have a different shape color depending on the current preferences.
* The make_layer function may reapply colors that have already been set by the view provider.

To solve this all view property related function parameter have been changed to a not None value. If a None value is supplied the view property as set by the view provider is not changed. The Layer Manager has been updated accordingly.
I realize that calling a function with 6 None values is not very convenient, but think it is the solution that is least likely to break other exiting code.

Additionally:
* Removed the makeLayer function. Layers were introduced in V0.19 when the naming scheme was changed to "make_*". Maybe it was created by mistake, or before the actual renaming operation started, but it is safe to remove it now.
* Removed overly verbose messages.
* gui_layers.py had a missing import (result of a previous V0.22 PR): `from draftutils import utils`.
2024-01-22 11:29:13 -06:00
Roy-043
35f10ad5a5 Draft: remove reapply_diffuse_color workaround
The function would trigger the creation of duplicate Draft Polar Arrays (only on Linux and only if the Fuse option is selected and the Link Array option deselected).
Forum topic:
https://forum.freecad.org/viewtopic.php?t=84090

The reapply_diffuse_color function is no longer required anyway as Issue #8340 has been fixed.
2024-01-10 16:46:49 +01:00
Roy-043
56d73f39ac Draft: implement new get_param functions (step 1)
See #11677
2023-12-11 19:31:34 +01:00
Roy-043
484bbf3807 Draft: improve handling of anno DisplayMode and LineSpacing
* DisplayMode controlled by new pref DefaultAnnoDisplayMode. This replaces the old dimstyle pref.
* LineSpacing pref is now used when creating annotations. Will be added to prefs ui later.
* format_object no longer changes FontSize as this conflicted with the height parameter in the make_text function.
* make_text function updated.
2023-11-27 15:45:56 +01:00
Roy-043
e4d6c328fc Draft: clone IfcType and Subvolume properties
Fixes #11186.
2023-10-31 15:43:33 +01:00
Roy-043
d6b402c59c Fix error in make_dimension.py 2023-10-23 20:24:30 +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
Yorik van Havre
55292e9041 Import: Support DXF text rotation (#11001)
* Import: Support DXF text rotation - fixes #10882

- Reads and supports text rotation in builtin DXF import
- Makes the builtin DXF import produce Draft texts instead of App::Annotations
- Extends the arguments of Draft make_text()

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-11 17:05:31 +02:00
luzpaz
4dbbe85c2b Fix various typos 2023-09-07 20:34:49 +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
Amritpal Singh
9f8f7c5ab3 Bug fix: Allow Draft WB to import in FreeCAD headless docker container 2023-09-03 12:24:22 +05:30
Roy-043
f8a5150e6f Draft: Fix angle range issue of make_circle 2023-09-02 20:48:40 +02:00
Roy-043
0b58b7ba5a Draft: make_sketch should not change Autoconstraints of sketch (#10181) 2023-08-13 11:16:22 +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
luzpaz
78bdc34996 Draft: linting bad indentations, superflous markup (#9313) 2023-04-19 09:48:57 +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
BHennen
0f4acc55be Add offset options to Draft PathArray (#8295)
* Add offset options to Draft PathArray

Allows user to specify a starting and ending offset to items in Draft PathArrays.

* [Draft] path array offset

---------

Co-authored-by: Roy-043 <info@b-k-g.nl>
2023-03-11 15:54:25 +01:00
luzpaz
e033dd6ba5 Draft: fix typos 2023-02-15 13:13:29 +00:00
Roy-043
7f2f5e9414 [Draft] fix diffuse color issue when creating arrays (#8436) 2023-02-11 18:57:28 +01:00
Roy-043
c437b79ada [Draft] update of Draft_Clone related to gui_utils.get_diffuse_color (#8430) 2023-02-11 16:21:18 +01:00
Roy-043
7352512f6c [Draft] fix Draft_Clone DiffuseColor delay issue during unit test (#8386) 2023-02-07 22:40:29 +01:00
Roy-043
25c4792690 Draft: fix issue with undo (#8267) 2023-01-31 21:38:19 +01:00
luzpaz
5fa4482504 Draft: fix trailing whitespace 2023-01-22 20:26:40 +01:00
Roy-043
34f43a245c Draft: Fix inconsistent properties of Draft annotations 2022-12-23 16:49:56 +01:00
Roy-043
8da2f363b8 Draft: fix make_sketch bugs (#7969) 2022-12-15 10:10:24 +01:00
Roy-043
cc8d6afee7 Draft: fix clone DiffuseColor 2022-11-27 11:11:24 +01:00
Roy-043
a4a11a42d3 Draft: Point array: Take placement of point object into account and accept more point object types 2022-10-12 11:18:12 +02:00
luzpaz
1ef31f40f5 Draft: Fix 'testing inequality to None' syntax (#7275)
* Draft: Fix 'testing inequality to None' syntax 

- Substitute `is not None` for `!= None`
- Trim trailing whitespace on touched files
2022-07-30 00:26:56 +02:00
Yorik van Havre
217b1e82cb Merge pull request #7141 from Roy-043/Draft-make_hatch.py-should-return-the-object
Draft: make_hatch.py should return the object
2022-07-18 10:48:07 +02:00
Roy-043
d6b3942ad1 Draft: Fix color handling in make_point.py 2022-07-17 12:32:08 +02:00
Roy-043
2f19dbaf23 Draft: make_hatch.py should return the object 2022-07-06 18:44:19 +02:00
Roy-043
256c4cd086 Draft: Fix Placement in make_sketch 2022-06-22 12:11:47 +02:00
marioalexis84
44a989f3b9 Draft: Make ShapeString editable by double-click - fixes #5885
* Draft: Make ShapeString editable - fixes #5885
2022-04-08 17:47:41 +02:00