[fixed] missing Arch view warning/error message

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

[fixed] missing Arch view warning/error message

Post by uwestoehr »

Arch view misses a clear warning/error message:

- open the attached testfile:
TD-test.FCStd
testfile
(138.06 KiB) Downloaded 20 times
- select e.g. the Left projection view
- now insert an ArchView

result: since there is no Arch object of course it cannot be added. Nevertheless there should be a clear error or warning message e.g. that there is no Arch object selected and that it can therefore not be inserted. Instead I only get this error in the report view window:

Code: Select all

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\FreeCAD-build\Mod\Arch\ArchSectionPlane.py", line 315, in getSVG
    objs, cutplane, onlySolids, clip, direction = getSectionData(source)
  File "D:\FreeCAD-build\Mod\Arch\ArchSectionPlane.py", line 132, in getSectionData
    p = FreeCAD.Placement(source.Placement)
<class 'AttributeError'>: 'TechDraw.DrawProjGroupItem' object has no attribute 'Placement'
7.67e-07 <App> Document.cpp(3440): Failed to recompute TD_test#ArchView: 'TechDraw.DrawProjGroupItem' object has no attribute 'Placement'
Recompute failed! Please check report view.
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19443 (Git)
Build type: Release
Branch: master
Hash: 74680b8a15ad37e53eee0d341e95cd32631d88a3
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Last edited by uwestoehr on Fri Feb 14, 2020 3:24 pm, edited 1 time in total.
User avatar
wandererfan
Veteran
Posts: 6321
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: missing Arch view warning/error message

Post by wandererfan »

uwestoehr wrote: Sat Feb 01, 2020 7:15 pm - open the attached testfile: TD-test.FCStd
- select e.g. the Left projection view
- now insert an ArchView

Code: Select all

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\FreeCAD-build\Mod\Arch\ArchSectionPlane.py", line 315, in getSVG
    objs, cutplane, onlySolids, clip, direction = getSectionData(source)
  File "D:\FreeCAD-build\Mod\Arch\ArchSectionPlane.py", line 132, in getSectionData
    p = FreeCAD.Placement(source.Placement)
<class 'AttributeError'>: 'TechDraw.DrawProjGroupItem' object has no attribute 'Placement'
7.67e-07 <App> Document.cpp(3440): Failed to recompute TD_test#ArchView: 'TechDraw.DrawProjGroupItem' object has no attribute 'Placement'
Recompute failed! Please check report view.
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19443 (Git)
Build type: Release
Branch: master
Hash: 74680b8a15ad37e53eee0d341e95cd32631d88a3
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
This will have to be fixed in ArchSectionPlane. Doesn't look like it knows how to handle a ProjectionGroup.

Do Architects use the traditional mechanical drawing multiview?
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: missing Arch view warning/error message

Post by uwestoehr »

wandererfan wrote: Sat Feb 01, 2020 7:45 pm This will have to be fixed in ArchSectionPlane. Doesn't look like it knows how to handle a ProjectionGroup.
Do Architects use the traditional mechanical drawing multiview?
I am not an architect. Maybe Yorik or Bernd can help us here?

I am currently updating the TechDraw Wiki pages and therefore just try out the different tools.
If e.g. an Arch View in a projection group is not sensible, I think TechDraw should then disable the menu and toolbar button to insert an Arch view there.
bernd wrote: .
yorik wrote: .
User avatar
wandererfan
Veteran
Posts: 6321
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: missing Arch view warning/error message

Post by wandererfan »

uwestoehr wrote: Sat Feb 01, 2020 7:15 pm result: since there is no Arch object of course it cannot be added. Nevertheless there should be a clear error or warning message
Should be fixed by git commit d6f9a6ddff.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: missing Arch view warning/error message

Post by vocx »

uwestoehr wrote: Sat Feb 01, 2020 7:54 pm ...
If e.g. an Arch View in a projection group is not sensible,...
TechDraw_ArchView (old TechDraw_NewArch) only works on Arch_SectionPlane objects. You have to create this object first, select it in the 3D view, and then use TechDraw_ArchView. It is not meant to be used with the other "views" created with TechDraw, certainly not projection views.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: missing Arch view warning/error message

Post by uwestoehr »

wandererfan wrote: Fri Feb 14, 2020 1:06 pm Should be fixed by git commit d6f9a6ddff.
Many thanks. However, since this commit I get also for the example file of this thread this error:

Code: Select all

Reading failed from embedded file: PartShape8.brp (133002 bytes, 49082 bytes compressed)
User avatar
wandererfan
Veteran
Posts: 6321
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: missing Arch view warning/error message

Post by wandererfan »

uwestoehr wrote: Fri Feb 14, 2020 3:23 pm Many thanks. However, since this commit I get also for the example file of this thread this error:

Code: Select all

Reading failed from embedded file: PartShape8.brp (133002 bytes, 49082 bytes compressed)
Do you get this message with any other files? PartShape8.brp would be one of the files inside the FCStd I think. The only files we read are the Template and the hatch files.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: missing Arch view warning/error message

Post by uwestoehr »

wandererfan wrote: Fri Feb 14, 2020 6:37 pm Do you get this message with any other files? PartShape8.brp would be one of the files inside the FCStd I think.
No, only with some files. They all have in common that they have TD pages inside. However, not all files having TD pages are affected. They have however in common that they have RichText annotations.
Post Reply