Could we TechDraw like this?

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
wandererfan
Veteran
Posts: 6321
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Could we TechDraw like this?

Post by wandererfan »

freedman wrote: Wed Aug 21, 2019 12:33 am My bad also, it states in the docs that it is introduced in 0.19. I'm not sure how a release works, will this be added to 0.18 or is it just bug fixes?
Generally, point releases (18.2, 18.3, etc) are bug fixes.

Hard to backport this one, I think. It is attached to most of the other cosmetic changes in v0.19.
freedman
Veteran
Posts: 3466
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Could we TechDraw like this?

Post by freedman »

One more question please. Is there a way to disable HLR or skip the HLR process, maybe a switch I could use in a macro? I would like to see what is possible using other approaches for pre or post processing. If there was a FreeCAD version in the past where it was possible to turn it off, I could use that also.
I presume that with HLR disabled we could still get a drawing but with all the lines and dots showing. Hoping that's true.
Thanks
User avatar
wandererfan
Veteran
Posts: 6321
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Could we TechDraw like this?

Post by wandererfan »

freedman wrote: Wed Aug 21, 2019 11:32 am One more question please. Is there a way to disable HLR or skip the HLR process, maybe a switch I could use in a macro? I would like to see what is possible using other approaches for pre or post processing. If there was a FreeCAD version in the past where it was possible to turn it off, I could use that also.
I presume that with HLR disabled we could still get a drawing but with all the lines and dots showing. Hoping that's true.
Thanks
Not really, no. HLR provides the list of edges that we draw. Even the old Drawing WB used the HLR routines.

You could take all the edges in your shape and project them onto the paper plane yourself, but you wouldn't know which ones were visible and which were hidden unless you did the same work that HLR does.

Ask all the questions you want. If you figure out a solution, I'll buy you a beer at the very least.
freedman
Veteran
Posts: 3466
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Could we TechDraw like this?

Post by freedman »

I'll post this in the off chance it sparks a brain cell. It's old.
https://www.opencascade.com/content/hlr ... mes-faster
User avatar
wandererfan
Veteran
Posts: 6321
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Could we TechDraw like this?

Post by wandererfan »

freedman wrote: Wed Aug 21, 2019 8:02 pm I'll post this in the off chance it sparks a brain cell. It's old.
https://www.opencascade.com/content/hlr ... mes-faster
The biggest truth in that thread is "Having a topologically and geometrically correct shape is a must for all occ operations (specially for boolean) ! Sewing is only one fix that should be applied among the others !"

Many of the drawing/HLR problems are due to shape issues. I'd love to have some code that would fix the problems that Part CheckGeometry finds.
freedman
Veteran
Posts: 3466
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Could we TechDraw like this?

Post by freedman »

How about this:
Could we get a geometry list and run it against the HLR list and come up with two files (maybe more), hidden lines and view lines. Does this then happen:
1) The HLR would never need to run again on that view unless the model changes, dimensions come from the stored files.
2) Hidden line displaying would be lightning fast.
3) At document open, the HLR would not need to run, file data would be used.
4) The code required to make the additional files is just logic, no need for complicated processing.
User avatar
wandererfan
Veteran
Posts: 6321
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Could we TechDraw like this?

Post by wandererfan »

freedman wrote: Thu Aug 22, 2019 11:57 pm How about this:
Could we get a geometry list and run it against the HLR list and come up with two files (maybe more), hidden lines and view lines. Does this then happen:
1) The HLR would never need to run again on that view unless the model changes, dimensions come from the stored files.
2) Hidden line displaying would be lightning fast.
3) At document open, the HLR would not need to run, file data would be used.
4) The code required to make the additional files is just logic, no need for complicated processing.
We could serialize and save the drawing geometry(lines). We don't do this now - we recreate the geometry on every recompute.
This would fix the startup delay. Might have to do this anyway as part of the transition to updating drawings only on demand.

"just logic"? :lol:
user1234
Veteran
Posts: 3511
Joined: Mon Jul 11, 2016 5:08 pm

Re: Could we TechDraw like this?

Post by user1234 »

wandererfan wrote: Fri Aug 23, 2019 12:08 pm We could serialize and save the drawing geometry(lines).
This is pretty common on commercial CAD software. Also with the new link function, this is maybe no bad idea. I have an assembly where 19 parts have drawing in it. When i open this assembly, it loads a pretty long time. But i think this is minor issue and no bug. This is a feature request. Also i can live with that.

freedman wrote: Could we get a geometry list and run it against the HLR list and come up with two files (maybe more), hidden lines and view lines.

The HLR would never need to run again on that view unless the model changes, dimensions come from the stored files.

Hidden line displaying would be lightning fast.
This must be line list, but the idea is not bad. But every line need a property (show/hide). But the drawing has also a property with hide/show hidden lines. Also a drawing need this property in the future. That makes conficts. That is a very big task. Also this all makes only sense when the topological naming issue is solved.

And who develop that? (I can not do that, i am to weak to do that).

Greetings
user
freedman
Veteran
Posts: 3466
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Could we TechDraw like this?

Post by freedman »

Here is a link, Mr. parry is using SVG to a drawing.
http://freecadamusements.blogspot.com/2014/03/
"just logic"? :lol:
I thought you would get a laugh out of that statement, I was speaking to logic of extracting lines,vertex,ect..
Did you find a formal spec. for the brep output?
User avatar
wandererfan
Veteran
Posts: 6321
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Could we TechDraw like this?

Post by wandererfan »

freedman wrote: Fri Aug 23, 2019 5:15 pm I was speaking to logic of extracting lines,vertex,ect..
Did you find a formal spec. for the brep output?
Getting the existing lines, vertices, etc from OCC is pretty straight forward and well documented. We don't look inside the brep file except for loading and saving.
Post Reply