Is it/was it possible to Freeze a TechDraw View?

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
bensenior
Posts: 29
Joined: Mon Dec 07, 2020 7:55 pm

Is it/was it possible to Freeze a TechDraw View?

Post by bensenior »

Hi there,

I'm using FC 0.20 and getting to the point that I'm creating assembly documentation for an open hardware project using TechDraw.

My wish was to create multiple views on a page of a part being gradually folded, step-by-step. I can do this by altering angles in the part and capturing new views with each step, but if I hit "refresh" all the views get redrawn with the current position/state of the part and are thus suddenly identical.

I thought, in an earlier version, there was something like a Freeze=true/false in the view or data pane for a TV view, but perhaps I was mistaken?!?

Is it at all possible in TV to fix/freeze a view - to make it static or unlinked - so that the sequence of steps doesn't get broken by accident?!?

Many thanks in advance for any tips!
bensenior
Posts: 29
Joined: Mon Dec 07, 2020 7:55 pm

Re: Is it/was it possible to Freeze a TechDraw View?

Post by bensenior »

Allow my to answer my own question (blush).

Select the View.
In the Data pane look for Projection->XSource which will contain the reference to the part you generated the view from.

Select this via the ellipsis (...)
Choose "Clear" in the dialog that appears to unlink the view.

The view will no longer update as the part/model changes, even on refresh, because the underlying link no longer exists.
bensenior
Posts: 29
Joined: Mon Dec 07, 2020 7:55 pm

Re: Is it/was it possible to Freeze a TechDraw View?

Post by bensenior »

NOPE! NOPETY NOPE!
That approach works only so long as Freecad remains open. Once the file is closed and re-opened, because no source link is set, your views in Tech Draw will all be blank and you'll have lost a lot of work.

Will I have to create 30 different versions of my main file, with the model in 30 different poses, and one Techdraw page for each file?

Any other, better, ideas?
heron
Posts: 307
Joined: Mon Apr 20, 2020 5:32 pm

Re: Is it/was it possible to Freeze a TechDraw View?

Post by heron »

Some time ago I had a similar problem. I also looked for how to freeze the view and I did not find it. Finally, I solved it with the DraftShape2DView tool of the Draft workbench. https://wiki.freecadweb.org/Draft_Shape2DView
I don't think it's the best solution, just like I did.
I'll keep attention for else hint :mrgreen:
bensenior
Posts: 29
Joined: Mon Dec 07, 2020 7:55 pm

Re: Is it/was it possible to Freeze a TechDraw View?

Post by bensenior »

I've spent the evening trying to find a reliable way to produce multi-step documentation which also will stay up to date as models evolve. I have a plan... it may not be a good plan... but it is a plan...

I will expand the number of explicit control variables in my spreadsheet so that I have more fine grained control over position and angles of specific parts. I'll probably move all positional information into its own sheet to avoid too much redraw overhead.

In that positional sheet, I'll have lots of columns, each column relating to one documentation figure.

Then - worst case manually - I will copy the contents of the appropriate column into the "active column" and refresh that one view. Unfortunately this approach won't work for multiple view instances of the same model part in different positions on the page.

Best case, I'll use spreadsheet references or python to shift the columns and update the associated view (possible?!?)

I think part of what makes the whole thing difficult is that a view can't selectively save all the information about the position/value of all the model attributes at the moment the view was captured, and more generally, can't seem to override any expressions binding positions to a sheet.


I feel like it's a hack that might suffice for now... but it's quite a tricky problem.
bensenior
Posts: 29
Joined: Mon Dec 07, 2020 7:55 pm

Re: Is it/was it possible to Freeze a TechDraw View?

Post by bensenior »

Actually, it would be enough (for my use case) if each view just remembered the position and rotation information of the parts being captured by a view, and used these to temporarily override the model values during refresh.

Might it be simpler to implement that functionality in Techdraw rather than try cludgy workarounds?!? Anybody have any experience with Techdraw coding? Would that be a feasible beginners project for a moderately competent developer?
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Is it/was it possible to Freeze a TechDraw View?

Post by bitacovir »

bensenior wrote: Fri Apr 16, 2021 3:40 pm Hi there,

I'm using FC 0.20 and getting to the point that I'm creating assembly documentation for an open hardware project using TechDraw.

My wish was to create multiple views on a page of a part being gradually folded, step-by-step. I can do this by altering angles in the part and capturing new views with each step, but if I hit "refresh" all the views get redrawn with the current position/state of the part and are thus suddenly identical.

I thought, in an earlier version, there was something like a Freeze=true/false in the view or data pane for a TV view, but perhaps I was mistaken?!?

Is it at all possible in TV to fix/freeze a view - to make it static or unlinked - so that the sequence of steps doesn't get broken by accident?!?

Many thanks in advance for any tips!
What about TechDraw ActiveView?
https://wiki.freecadweb.org/TechDraw_ActiveView
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
bensenior
Posts: 29
Joined: Mon Dec 07, 2020 7:55 pm

Re: Is it/was it possible to Freeze a TechDraw View?

Post by bensenior »

Hey @bitacovir, good suggestion! From the name "Active View" I didn't assume that THAT would be the static one!

I have tried it, and see issues with that approach.
1) although static, it's also impossible to "redraw" them on demand as you'd need to for step by step documentation where positions need to be remembered.
2) it seems the AS IS render mode produces images which are not of adequate quality for documentation.
3) all other render modes in TechDraw appear to return the AS IS mode in the dev version of 0.2 that I have. I'm in the middle of nowhere in quarantine using my mobile data. I haven't got the data left to download a different version, so other experiments will have to wait.
bensenior
Posts: 29
Joined: Mon Dec 07, 2020 7:55 pm

Re: Is it/was it possible to Freeze a TechDraw View?

Post by bensenior »

SOLVED!!!

The (partial) solution was right there in tech draw all along.

Take a look at the Data pane in the PAGE object in the tree view. The page contains the views, and has an option "Keep Updated". If you set this to false, it won't update on refresh!

This is a partial solution for multi page/multi step documentation, because it'll all break the moment you try to update and things have adjusted their positions etc. But it is a good start.

I think it would still be a very interesting idea to explore caching object transformation data at the time of capture, so models can still update (if they remain similar enough to the old) that the cached transformations are applied and they appear correctly in the documentation.
bensenior
Posts: 29
Joined: Mon Dec 07, 2020 7:55 pm

Re: Is it/was it possible to Freeze a TechDraw View?

Post by bensenior »

BUG!?!

Toggle the page to not auto update. Save. Quit freecad.

Restart freecad. All tech draw views in the not auto updated pages are empty until you toggle auto update on and refresh the page. If the underlying model is in the wrong state (bits are folded in the wrong position) your documentation is automatically broken again.

Is this the expected behaviour?

Using 0.20R24613
Post Reply