[SOLVED] Ticket #4392 - [BUG] ArchView render mode and hidden objects

Discussions about the development of the TechDraw workbench
User avatar
vanuan
Posts: 188
Joined: Wed Oct 24, 2018 9:49 pm

[SOLVED] Ticket #4392 - [BUG] ArchView render mode and hidden objects

Postby vanuan » Wed Jul 01, 2020 4:01 pm

Steps to reproduce here: issue #4392

I'm wondering what does the "Render mode" really affect? What's its purpose from the user perspective? Why does it exist?
The wiki page doesn't describe much:
TechDraw_ArchView#Properties
Source: The section plane object to be displayed
All On: If hidden objects must be shown or not. If False, only objects that are visible in the 3D view are rendered
Render Mode: The render mode to use, Solid or Wireframe
Show Hidden: If the hidden geometry (the part of the goemetry that lies behind the section plane) is shown or not. It will be rendered in dashed line, which can be configured in the Arch preferences.
Show Fill: If cut areas must be filled with a grey color or not
Line Width: The width of the main lines. Cut lines and projected/2D line widths ratios can be configured in the Arch preferences
Font Size: The size of all texts that appear in this view
Last edited by Kunda1 on Mon Jul 13, 2020 7:40 pm, edited 2 times in total.
Reason: marked thread [SOLVED]
User avatar
wandererfan
Posts: 4045
Joined: Tue Nov 06, 2012 5:42 pm

Re: [BUG] ArchView render mode and hidden objects

Postby wandererfan » Thu Jul 02, 2020 12:30 am

vanuan wrote:
Wed Jul 01, 2020 4:01 pm
The ArchView is a black box as far as TechDraw is concerned. We'll have to get somebody from the Arch team to answer this.
carlopav wrote: ping
vocx wrote: ping
vocx
Posts: 4648
Joined: Thu Oct 18, 2018 9:18 pm

Re: [BUG] ArchView render mode and hidden objects

Postby vocx » Thu Jul 02, 2020 1:00 am

Render mode solid shows solids as shaded, while wireframe only shows the outline. I think they work quite well.

But the new modes "Coin" and "Coin mono" were added recently by Yorik; I'm not entirely sure what the difference is, probably some option in Coin.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
carlopav
Posts: 1461
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: [BUG] ArchView render mode and hidden objects

Postby carlopav » Thu Jul 02, 2020 4:27 am

We should ping Yorik.
From what I can recall it affects the way the SVG is computed: coin modes rely on coin to output the SVG. They are less precise but way faster. The other options rely on OCC. They should output a more precise SVG, but they should be slow on big models because of many Boolean operations OCC uses to compute the SVG.
follow my experiments on BIM modelling for architecture design
User avatar
vanuan
Posts: 188
Joined: Wed Oct 24, 2018 9:49 pm

Re: [BUG] ArchView render mode and hidden objects

Postby vanuan » Thu Jul 02, 2020 5:10 am

wandererfan wrote:
Thu Jul 02, 2020 12:30 am
The ArchView is a black box as far as TechDraw is concerned.
What do you mean? It's located in the TechDraw Mod, isn't it?
https://github.com/FreeCAD/FreeCAD/blob ... ch.cpp#L49
carlopav wrote:
Thu Jul 02, 2020 4:27 am
From what I can recall it affects the way the SVG is computed
Ok. So the "render mode" property should only affect the appearance/performance of the generated view, not the list of objects to be rendered, right? This means hidden objects rendering should not be affected by this property. So the bug is valid, right? This means "wireframe" should not render hidden objects too.

The current behavior is:

Wireframe mode: hidden objects are always rendered
Solid mode: hidden objects are rendered according to the "All on" property
Coin(mono) mode: hidden objects are never rendered
User avatar
vanuan
Posts: 188
Joined: Wed Oct 24, 2018 9:49 pm

Re: [BUG] ArchView render mode and hidden objects

Postby vanuan » Thu Jul 02, 2020 5:39 am

Ok, I got it:
https://github.com/FreeCAD/FreeCAD/blob ... ne.py#L385

So while it's inherited from TechDraw::DrawViewSymbol, it's rendered by the ArchSectionPlane in the Arch Mod. Hm...

Another bug is that when I change the "All on" property, it isn't re-rendered, even if I force it to recompute. It's only re-rendered when changing the render mode from Wireframe to Solid and vice versa.
User avatar
vanuan
Posts: 188
Joined: Wed Oct 24, 2018 9:49 pm

Re: [BUG] ArchView render mode and hidden objects

Postby vanuan » Thu Jul 02, 2020 5:43 am

Yet another issue with the render mode is that the orientation is inconsistent.

Is this ArchView even useful? I can't even display dimensions on a page. Maybe it's a placeholder for additional features that are not implemented yet?
carlopav
Posts: 1461
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: [BUG] ArchView render mode and hidden objects

Postby carlopav » Thu Jul 02, 2020 8:04 am

yorik wrote:
Tue Jun 30, 2020 11:07 am
ping
Those features are really recent, so probably there is still something to tune or to add :)
follow my experiments on BIM modelling for architecture design
User avatar
vanuan
Posts: 188
Joined: Wed Oct 24, 2018 9:49 pm

Re: [BUG] ArchView render mode and hidden objects

Postby vanuan » Thu Jul 02, 2020 10:25 am

The partial fix is here:
https://github.com/FreeCAD/FreeCAD/pull/3674
It fixes hidden object rendering for "wireframe" and "solid" modes.

Coin and Coin mono render modes are still not affected and do not render hidden objects.

Also, the issue with orientation, will post a separate bug.
User avatar
Kunda1
Posts: 7687
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4392 - [BUG] ArchView render mode and hidden objects

Postby Kunda1 » Thu Jul 02, 2020 6:00 pm

Mod edit: OP opened issue #4392. I've prepended it to the title of this thread.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features