Commit Graph

204 Commits

Author SHA1 Message Date
Roy-043
1fcd316a8b Draft: suppress patharray offset warnings if values are already zero
See forum topic:
https://forum.freecad.org/viewtopic.php?t=91517
2024-10-22 10:52:04 +02:00
Roy-043
abc95b42ca Fix linter warning 2024-09-25 15:59:49 +02:00
Roy-043
4313024162 Draft: ShapeString Fuse caused single face string to lose fill
The `faces.concatenate` function can return a Face or a Compound. The code did not take that into account.
2024-09-25 15:59:49 +02:00
Roy-043
3fd57efbb0 Use max instead of if-else for numerical checks (as per linter warning) 2024-09-13 12:07:52 +02:00
Roy-043
ba6dd5858e Draft: fix division by zero and count is zero for path arrays
Fixes #16468.
2024-09-13 12:07:52 +02:00
Roy-043
a3cc73ce15 Draft: fix Draft_Shape2DView warnings
Fixes #15144.
2024-07-04 09:11:10 +02:00
FEA-eng
4882a33d46 Update shape2dview.py 2024-06-17 11:22:18 -05: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
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
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
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
10a25ebf98 Draft: Update v0.22 references to v1.0 (#13934) 2024-05-12 09:47:51 +02: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
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
Roy-043
2e04cd11f5 Draft: ShapeString improve stick font detection and fix fuse error
Forum topic:
https://forum.freecad.org/viewtopic.php?t=85147
2024-02-10 16:10:55 +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
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
56d73f39ac Draft: implement new get_param functions (step 1)
See #11677
2023-12-11 19:31:34 +01:00
Roy-043
1bc942d73a Draft: improved props_changed_placement_only function
There are more objects where `props_changed_placement_only` should always return `False`. The common denominator seems to be a non-empty OutList.

https://github.com/FreeCAD/FreeCAD/issues/8771
https://forum.freecad.org/viewtopic.php?t=82436
2023-11-06 18:33:13 +01:00
Roy-043
ec50beebf4 Draft: Updates related to the PlaneGui class (step 3)
Related issue:
#5603.
2023-10-27 11:55:24 +02:00
Roy-043
85ace1ca33 Draft: Make Facebinders link-aware (2nd error fix)
Previous PRs: #11081 and #11156.
2023-10-25 18:16:43 +02:00
Roy-043
28e450ebda Draft: Make Facebinders link-aware (fix errors in previous PR)
Previous PR: #11081.
2023-10-23 20:08:59 +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
56d3d3d5b1 Draft: ShapeString: improve ObliqueAngle (#10811)
Calculation of the justification required the use of `optimalBoundingBox` and should happen after applying the oblique angle.
2023-09-26 12:53:53 +02:00
Yorik van Havre
be84810aa9 Merge pull request #10783 from Roy-043/Draft-ShapeString-add-ObliqueAngle-property
Draft: ShapeString: add ObliqueAngle property
2023-09-25 10:54:53 +02:00
Roy-043
432ba3adde Draft: ShapeString: add ObliqueAngle property (improvement) 2023-09-24 19:04:32 +02:00
wmayer
83d4080fe8 App: fixes #10460: App::PropertyPythonObject is not saving data
Since Py3.11 the methods names __setstate__ and __getstate__ conflict with the method names added to the object class.
Thus rename them to 'loads' and 'dumps'
2023-09-24 10:56:35 -05:00
Roy-043
4ef4819872 Draft: ShapeString add ObliqueAngle property
Fixes #5656.
2023-09-23 11:39:27 +02:00
Roy-043
32dcd008ff Draft: shape2dview: avoid issues with intersecting solids
Add `Shape.SubShapes` instead of a copy of the shape. This avoids cut problems if there are intersecting solids.

Forum topic:
https://forum.freecad.org/viewtopic.php?t=81240
2023-09-17 18:59:20 +02:00
Yorik van Havre
dd6b726905 Draft: Workaround failing multifuse in shape2Dview (#10478) 2023-09-04 10:45:56 +02:00
Chris Hennes
f4c348464c Draft: Translate label type combobox (#10228) 2023-08-17 15:36:37 +02:00
Roy-043
b9d48c20a0 Draft: Add Justification option to ShapeString (#10233) 2023-08-16 17:08:49 +02:00
Roy-043
52b41fee06 Draft: fix props_changed_placement_only for attached clones and similar (#9623)
For an attached object whose Shape depends on one or more source objects props_changed_placement_only should always return False.
2023-05-21 16:15:55 +02:00
Roy-043
9a219e03a6 Draft: ShapeString: use FaceMakerBullseye instead of current face algo (#9593) 2023-05-17 18:19:00 +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
Roy-043
87b63d186e [Draft] fix regression introduced with #8433 (#8840) 2023-03-11 13:35:24 +01:00
Roy-043
b6af6c9330 [Draft] fix #8433 regression (#8452) 2023-02-12 14:22:52 +01:00
Roy-043
5d6b447149 [Draft] some arrays did not have a Count property (#8433) 2023-02-11 17:09:02 +01:00
Roy-043
25c4792690 Draft: fix issue with undo (#8267) 2023-01-31 21:38:19 +01:00
Roy-043
4c4972339f Draft: V0.18 VisGroups were not handled (#8234) 2023-01-23 11:27:52 +01:00
luzpaz
5fa4482504 Draft: fix trailing whitespace 2023-01-22 20:26:40 +01:00
Roy-043
fb65b58007 Draft: Improvements related to #8081 (#8211)
DisplayMode of Text was not updated. Some houskeeping
2023-01-20 20:33:35 +01:00
Roy-043
34f43a245c Draft: Fix inconsistent properties of Draft annotations 2022-12-23 16:49:56 +01:00