Commit Graph

33 Commits

Author SHA1 Message Date
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
3ea96b18f5 [ Draft ]: Update SPDX License Identifiers (#24965) 2025-11-03 11:58:14 -06:00
marcuspollio
e831fc9163 Add Draft workbench to .pre-commit-config (#24664)
* Add Draft workbench to .pre-commit-config

* [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>
2025-10-15 11:21:09 +02:00
Florian Foinant-Willig
36b8e9a703 Draft: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Paul Lee
7e06bb1ec2 [Draft_shape2dview] Fix Bug : Closed Wall Wrong Fill
Git-hub issues : https://github.com/FreeCAD/FreeCAD/issues/16363#issuecomment-2619643946

"Problem description

In a group of closed walls, the entire interior is completely filled, which should not be the case."
2025-02-05 10:09:09 +01:00
Yorik van Havre
14585a760e BIM: NativeIFC 2D support - section planes 2024-12-11 10:24:43 +01:00
Roy-043
432befd79a Merge pull request #17379 from yorikvanhavre/draft-fix-annotation
Draft: better check for Gui object
2024-12-06 18:05:41 +01:00
Yorik van Havre
87779387cc Draft: minor fixes (#17793)
- more tolerance on faultly solids in shape2Dview
- fixed display of dimensions in arch override unit
2024-11-16 17:52:55 +01:00
Yorik van Havre
37f50c1b10 Draft: Independence from BIM (#17444)
* Draft: Independence from BIM - follow-up of #17390

* Draft: More info in DXF importer if BIM not present
2024-11-16 17:48:28 +01:00
Roy-043
0fac810797 Restore ViewObject implementation for all Draft objects
In my tests the code works fine. Using @AIRCAP's instructions,  I have created a 'broken' file from draft_test_objects.FCStd.
2024-10-24 15:24:13 +02:00
Roy-043
02e45a8e0c Draft: fix Draft_Shape2DView warnings
Fixes #15144.
2024-07-04 09:11:10 +02:00
FEA-eng
be32fc6773 Update shape2dview.py 2024-06-17 11:22:18 -05:00
Roy-043
eaa67e1bfe 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
f7d8af592b 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
2dd27ec276 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
3b7698d77f 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
2556801938 Draft: Workaround failing multifuse in shape2Dview (#10478) 2023-09-04 10:45:56 +02:00
Roy-043
e1829be977 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
luzpaz
0e1530be59 Draft: linting bad indentations, superflous markup (#9313) 2023-04-19 09:48:57 +02:00
Roy-043
f9cdaaf3d9 Draft: fix issue with undo (#8267) 2023-01-31 21:38:19 +01:00
Yorik van Havre
a5c64777b1 Arch: Removed leftover debug messages 2022-07-29 14:01:56 +02:00
Yorik van Havre
99da0738a7 Arch: added ExclusionNames property to Shape2DViews 2022-07-28 14:09:41 +02:00
Matthijs Kooijman
b7c94992c9 Draft: Simplify using getattr instead of hasattr
Using the default argument supported by getattr makes this code a bit
simpler and probably (ever so slightly) faster.

See https://forum.freecadweb.org/viewtopic.php?f=10&t=58611 for previous
discussion.

This is not an exhaustive change, these are just a few I encounted while
working with the code.
2022-03-22 14:46:50 +01:00
marioalexis
b4c20bce20 Draft: Replace Drawing functions with TechDraw functions 2022-02-20 16:34:29 -03:00
Yorik van Havre
10faf786c8 Draft: Fixed wrong placement of lines in shape2dview's cutface mode 2021-07-16 12:42:30 +02:00
Yorik van Havre
c0efc7fa32 Draft: added AutoUpdate property to shape2Dviews to disambiguate with VisibleOnly property 2021-07-07 15:45:22 +02:00
Yorik van Havre
3a6becbfe7 Arch: Added Depth property to SectionPlanes 2021-07-01 13:46:24 +02:00
Yorik van Havre
e2dd61119c Draft: Added ExclusionPoints property to shape2dview object 2021-06-01 11:30:04 +02:00
Yorik van Havre
a5bab10ff7 Draft: Added a 'solid faces' projection mode to shape2dviews to treat individual faces 2021-04-30 16:44:20 +02:00
vocx-fc
27fc2e89fb Draft: add modules of draftobjects to the proper Doxygen group
This includes `array`, `base`, `bezcurve`, `block`, `bspline`,
`circle`, `clone`, `dimension`, `draft_annotation`, `draftlink`,
`drawingview`, `ellipse`, `facebinder`, `fillet`, `label`,
`patharray`, `point`, `pointarray`, `polygon`, `rectangle`,
`shape2dview`, `shapestring`, `text`, `wire`, `wwproxy`.

These are added to the `draftobjects` Doxygen group
so that the functions and classes contained in each module
are listed appropriately in the automatically generated
documentation.
2020-07-17 13:01:45 +02:00
vocx-fc
314637e945 Draft: move grouping functions to draftutils.groups module
These functions were previously in `draftutils.utils`,
and are related to grouping objects and finding objects
inside groups. These include `get_group_names`, `ungroup`,
`get_windows`, `get_group_contents`, `get_movable_children`.
These are imported in the main `Draft.py` module, so compatibility
is retained.

Modules which use these functions are updated; these include
Gui Commands like `Move`, `Rotate`, `Scale`, `AddToGroup`,
as well as objects like `DrawingView` and `Shape2DView`,
and `ViewProviderClone`.
The code inside the `importDXF` module is also updated.

The Arch Workbench uses many of these functions
but it does so from the `Draft` namespace, so these edits
don't change the situation for these commands.
2020-07-13 14:35:38 +02:00
carlopav
1983172f5a Draft: fixed wrong QT_TRANSLATE_NOOP usage in Draft Objects
.
2020-06-09 11:55:46 +02:00
carlopav
0e9d274bf4 Draft: various cleanup
Mainly added an empty line at the end of each file and changed docstrings.
2020-05-15 14:43:26 +02:00
carlopav
efd384a17b Draft: split Shape2DView from Draft.py 2020-04-29 11:41:02 +02:00