ProjectionGroup, LockPosition, AutoDistribute and Restore

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

ProjectionGroup, LockPosition, AutoDistribute and Restore

Post by wandererfan »

continuing from Big TechDraw Comments Thread.
user1234 wrote: Sat Jan 19, 2019 9:28 pm LockPosition == true and AutoDistribute == false. But everytime when i reload a file, the views are not on the position where i saved them.
I can see from your video that the Views are not restored to the right places, but I haven't been able to duplicate with my test files. Can you share a file with the problem? You can PM it to me if the file is confidential.

wf
user1234
Veteran
Posts: 3483
Joined: Mon Jul 11, 2016 5:08 pm

Re: ProjectionGroup, LockPosition, AutoDistribute and Restore

Post by user1234 »

Helle!

Here. I also have a second drawing with the same issue. The parts are not confidential. I built a SK30 Spindemotor with an optional automatic tool holder. When it is finish (in RL) the i show this here. But this will be in the spring or summer (at first without automatic). In my workshop it is now to cold for my machines.

Btw.: this should not be a criticism of your work. Your work is awsome, the TechDraw workbench made huge progress. I am very happy about your work in FreeCAD.

Sorry for bad engish.

Greetings
user
Attachments
SpindleShaft.FCStd
(364.84 KiB) Downloaded 36 times
SpindelCover.FCStd
(331.42 KiB) Downloaded 38 times
User avatar
wandererfan
Veteran
Posts: 6309
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: ProjectionGroup, LockPosition, AutoDistribute and Restore

Post by wandererfan »

user1234 wrote: Sun Jan 20, 2019 5:31 pm this should not be a criticism of your work.
No worries! A bug is a bug.

This git commit 90fd3ae483 may fix some of your problems, but your files have "link goes out of allowed scope" errors (see red lines in Dependency Graph). This might be a contributing factor if the errors are blocking a recompute somewhere.

Page is inside a Group (Drawing) which is inside a PartContainer(SpindleCover), but the Dimensions, Hatches, etc are all outside the Group & PartContainer.
TDObjsOutOfScope.png
TDObjsOutOfScope.png (74.39 KiB) Viewed 1061 times
I think this is the first time I've seen a TD Page inside a container. Thanks for finding this condition.

Probably better for pages to live outside any containers for now. I will have to look at the scope of Links inside the code.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: ProjectionGroup, LockPosition, AutoDistribute and Restore

Post by ickby »

@wandererfan: you can use all link properties without the scope restirictions by either using setScope function or by using the global scope link properties, e.g. like this
Of course only if relative placements between the pages and the linked objects are not relevant.
User avatar
wandererfan
Veteran
Posts: 6309
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: ProjectionGroup, LockPosition, AutoDistribute and Restore

Post by wandererfan »

ickby wrote: Mon Jan 21, 2019 2:16 pm @wandererfan: you can use all link properties without the scope restirictions by either using setScope function or by using the global scope link properties, e.g. like this
Of course only if relative placements between the pages and the linked objects are not relevant.
Thanks. We use setScope(Global) when linking to source objects (Bodies, Part::Features, etc), but it never occurred to me that links between drawing components might need global scope too.
user1234
Veteran
Posts: 3483
Joined: Mon Jul 11, 2016 5:08 pm

Re: ProjectionGroup, LockPosition, AutoDistribute and Restore

Post by user1234 »

Hello!
wandererfan wrote: Mon Jan 21, 2019 2:09 pm This git commit 90fd3ae483 may fix some of your problems
Yes, now the drawings restore in place. Thanks for that!
wandererfan wrote: Mon Jan 21, 2019 2:09 pm I think this is the first time I've seen a TD Page inside a container.
The reason why i do this because when i import single parts to assemblys, the drawing is with the part und when i move the part, the drawing moves with the part and can not accidental break a reference - in theory ..... i hope you understand what i mean.

Thank you for fixing the restore drawing in place issue.

Sorry for bad english.

Greetings
user
Post Reply