ProjectionGroup, LockPosition, AutoDistribute and Restore

Discussions about the development of the TechDraw workbench
wandererfan
Posts: 2350
Joined: Tue Nov 06, 2012 5:42 pm

ProjectionGroup, LockPosition, AutoDistribute and Restore

Postby wandererfan » Sun Jan 20, 2019 1:02 pm

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
Posts: 120
Joined: Mon Jul 11, 2016 5:08 pm

Re: ProjectionGroup, LockPosition, AutoDistribute and Restore

Postby user1234 » Sun Jan 20, 2019 5:31 pm

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 5 times
SpindelCover.FCStd
(331.42 KiB) Downloaded 5 times
wandererfan
Posts: 2350
Joined: Tue Nov 06, 2012 5:42 pm

Re: ProjectionGroup, LockPosition, AutoDistribute and Restore

Postby wandererfan » Mon Jan 21, 2019 2:09 pm

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 142 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
Posts: 2845
Joined: Wed Oct 05, 2011 7:36 am

Re: ProjectionGroup, LockPosition, AutoDistribute and Restore

Postby ickby » 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.
wandererfan
Posts: 2350
Joined: Tue Nov 06, 2012 5:42 pm

Re: ProjectionGroup, LockPosition, AutoDistribute and Restore

Postby wandererfan » Mon Jan 21, 2019 2:30 pm

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
Posts: 120
Joined: Mon Jul 11, 2016 5:08 pm

Re: ProjectionGroup, LockPosition, AutoDistribute and Restore

Postby user1234 » Thu Jan 24, 2019 10:20 pm

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