Commit Graph

159 Commits

Author SHA1 Message Date
Roy-043
64c346b7fa Arch: ArchSectionPlane.getSVG add linespacing argument
Forum topic:
https://forum.freecad.org/viewtopic.php?t=81470
2023-09-25 22:09:41 +02:00
wmayer
ef9936a940 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
2986e91b6c Arch: more consistent object naming and labelling
Following the example of Arch_Wall:
- Fixed object name.
- Default label is translatable.
- Name argument should only be used for the label and not be translated.
2023-05-28 15:58:54 +02:00
Yorik van Havre
6479bf1220 Arch: Fixed SVG fill - fixes #6208 2023-05-16 12:27:59 +02:00
Roy-043
62ad1fd3a9 [Arch] Remove obsolete code related to the Drawing WB 2023-04-02 19:30:10 +02:00
Roy-043
7d0101513e [Arch] Arch_SectionPlane improve handling of non-solids update 2023-02-27 20:30:31 +01:00
Roy-043
e0528ca102 [Arch] Arch_SectionPlane improve handling of non-solids 2023-02-27 16:26:42 +01:00
Roy-043
172f6c17a7 Arch: improve context menus (rebase) 2023-01-12 22:54:09 +01:00
Roy-043
494a08f3f8 Arch: ArchSectionPlane should update SVG in execute (#8175) 2023-01-12 20:23:54 +01:00
Roy-043
0930544c21 Arch: fix ArchSectionPlane getSceneGraph problem (#8171) 2023-01-12 15:28:00 +01:00
Roy-043
8a91607778 Draft+Arch: Fix crash related to SoBrepEdgeSet 2022-09-28 17:32:12 +02:00
Roy-043
7e0550a7c8 Arch: Housekeeping: import translate from correct file 2022-07-21 10:17:03 +02:00
Yorik van Havre
966720094d Arch: Fixed test to work without the Drawing module 2022-06-30 11:38:22 +02:00
Roy-043
0cf6c7d61b Arch: ArchSectionPlane always showed plan symbols of windows 2022-06-10 22:32:45 +02:00
marioalexis
251a9bd276 Arch: Replace Drawing functions with TechDraw functions 2022-02-21 13:17:09 -03:00
Chris Hennes
6391bebeb8 [Arch] Fix LGTM warnings 2021-09-28 10:29:45 -05:00
Yorik van Havre
3a6becbfe7 Arch: Added Depth property to SectionPlanes 2021-07-01 13:46:24 +02:00
Matthijs Kooijman
2a60d81c7d Arch: Do not draw draft-like groups twice in section view
When drawing a section view, first a list of objects to draw is made.
Starting with the objects selected by the section plane, any groups or
group-like objects are recursively expanded. The resulting list contains
all contained objects, but also the expanded groups themselves (due to
Draft.get_group_contents with addgroups set).

This list of objects is then further categorized and processed. In this
categorization, there was already an exception for DocumentObjectGroup
instances, which were omitted from the resulting `nonspaces` list
(presumably since there is no point in drawing the groups themselves
when their contents are already in the list).

However, any groups that only contain flat objects would be caught by
`looksLikeDraf()` and added to the `drafts` list, before this exception
could ignore them.

This causes these groups to be processed by Draft.get_svg, which does so
by calling itself recursively on the group contents. Effectively, this
means that the contents of such groups is drawn on the section view
twice. Even more, since Draft.get_svg does not do a visibility check
like Arch.getSVG does, this causes invisible objects to show up when not
intended.

This commit fixes this by moving the DocumentObjectGroup exception a bit
further up, so all these objects should be dropped.

An alternative fix might be to pass addgroups=False to
Draft.get_group_contents (in getSectionData), but that also prevents
group-like objects (Building, BuildingPart, Space, Site) from being
returned, but those likely need to be returned so they can be sectioned
if needed (though if just spaces are needed, then
Draft.get_group_contents also have a spaces argument to return just
those).
2021-05-09 17:19:05 +02:00
Yorik van Havre
4c1635706e Merge pull request #4453 from regularfry/lgtm-arch-unused-imports
Arch: removes unused imports
2021-03-26 11:22:11 +01:00
Yorik van Havre
19e4113de4 Arch: Fixed SectionPlane outside objects bug in ArchSectionPlane - Fixes #4549 2021-03-01 16:49:31 +01:00
Alex Young
80dbfd5814 Arch: removes unused imports
Removes unused imports as reported by LGTM.

There are exceptions: `import Arch_rc` is shown as an alert, but has side effects.  It's not clear what the best thing to do in those cases is, so I've left them for now.
2021-02-14 16:27:06 +00:00
paul lee
f521d8ca6b [ArchSectionPlane] Fix Swing Symbol for Windows(Doors) Link in ArchView/TechDraw
Forum Discussion  :  [ Link in Arch/BIM -- 4 ] Link of Door : Swing Not Shown in ArchView/TechDraw
- https://forum.freecadweb.org/viewtopic.php?f=23&t=55526
2021-02-14 03:13:36 +08:00
Yorik van Havre
43289ad685 Arch: Fixed wrong section fill when using archvrm module 2021-01-05 16:52:56 +01:00
Yorik van Havre
bdd9c23af7 Reverting files wrongly committed with 11beceea8 2020-12-23 15:21:43 +01:00
Yorik van Havre
16effcb2af Updated ts files 2020-12-23 14:51:04 +01:00
Yorik van Havre
687f55e94f Arch: Added Text settings to SectionPlanes 2020-10-29 18:28:35 +01:00
vocx-fc
fcc9a68f8e Arch: use new name of the icon Part_3D_object
It is defined in the Part Workbench. Before, it was called `Tree_Part`.
2020-10-22 15:11:45 +02:00
Yorik van Havre
265afea4a9 Arch: Added SectionColor property to Arch Materials 2020-10-20 14:43:33 +02:00
Yorik van Havre
822943b1aa Arch: Fixed backwards compatibility issues 2020-10-16 12:40:09 +02:00
vocx-fc
330a5098b5 Arch: consider DraftText objects in the section plane for compatibility
After the reorganization of the Draft Workbench,
the `'DraftText'` objects are now of Proxy.Type `'Text'`.
In the `DraftAnnotation` class the `__setstate__` method
was defined to automatically migrate the Type.

The `Arch SectionPlane` only handles `'Text'` objects. If for
some reason there is still an old `'DraftText'` object
which has not been migrated to the new Type, it won't be found.
This is corrected by adding `'DraftText'` to the list of objects
to process.
2020-10-12 11:43:37 +02:00
Yorik van Havre
2a06962b83 Arch: Added 'Show Label' view property to section planes 2020-10-01 10:30:09 +02:00
Vanuan
c51ca11e58 [Arch/TechDraw] Clean up _ArchDrawingView: remove getDXF
Properties and method were removed in 82c37bf754969be28eff6b5e71e4d1622294683c
2020-09-09 14:18:23 +02:00
vocx-fc
8195f5fdfe Draft: rename svg parameter to fillspaces (lowercase) 2020-09-09 12:53:54 +02:00
vocx-fc
29a52d0dbc Draft: move getSVG to draftfunctions submodule
Small fixes where the `get_svg` function is used, for example,
in the (obsolete) `DrawingView` class and `Arch_SectionPlane`.

Also update the unit tests accordingly.
2020-09-09 12:53:54 +02:00
Vanuan
9f640d8fad [Arch] [TD] Fix #4392: ArchView invisible objects should be show for Coin* render modes 2020-07-13 14:37:50 +02:00
Vanuan
a072f944d0 [Arch] [TD] Bug 4392: ArchSection and hidden objects for Render mode 2020-07-13 14:37:50 +02:00
vocx-fc
c97d13164e Arch: update some functions that come from the Draft workbench
In particular `getGroupContents` was renamed to `get_group_contents`
in the Draft workbench, so the function name is updated accordingly.
2020-07-13 14:35:38 +02:00
carlopav
262601a194 Arch: fix regression in SectionPlane 2020-05-18 12:18:36 +02:00
luz.paz
8af8689d73 Arch: [skip ci] fix header uniformity
This PR fixes header uniformity across all Arch files
2019-12-26 18:24:06 +01:00
Zheng, Lei
ef5acc5023 Arch: relax Part::Feature type checking
For supporting Link inside Arch.
2019-11-17 13:03:42 -03:00
luz.paz
4d1b9f8429 Arch: ArchSectionPlane.py LGTM incorrect variable fix [skip ci]
LGTM reported `For loop variable 'objs' is not used in the loop body.`
2019-10-25 10:23:24 -03:00
carlopav
c128ff999d [Arch] Add Section plane context menu for CutView
Added Section plane context menu to toggle cutview property
2019-10-17 17:37:59 -03:00
Yorik van Havre
c50ced65e9 Arch: small bugfix 2019-09-03 19:58:38 -03:00
luz.paz
7af7c10cf1 Fix misc. typos, whitespace, and http:// to https:// issues 2019-09-03 11:11:43 -03:00
Yorik van Havre
824b8ea0f4 TechDraw/Arch: Added new Coin Mono rendering mode to TD ArchViews 2019-08-24 19:41:57 -03:00
Yorik van Havre
e84128a413 Arch: Optimization in SVG generation code 2019-08-21 19:56:25 -03:00
Yorik van Havre
411827fbae Arch/TD: Added Coin mode to TD arch views 2019-08-21 18:44:02 -03:00
Yorik van Havre
5ca5f906d9 Arch/TD: Support for Arch BuildingParts in TD ArchView 2019-08-16 19:03:49 -03:00
furti
a12b851ab3 Arch: Fix missing cache value for SectionPlane
When the Arch SectionPlane was rendered via TechDraw in Solid mode, the
last parameter "fillSpaces" was not set for the svgcache.
So the next render operation threw an exeption because there where only
4 instead of 5 elements in the cache list.
2019-08-14 14:43:13 -03:00
Yorik van Havre
42c2a4d6ac Arch: Fixed some flat objects not appearing in techdraw 2019-05-13 13:10:36 -03:00