Drawing link object in a page with techdraw

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: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Drawing link object in a page with techdraw

Post by wandererfan »

realthunder wrote: ping
in TR001_Beam+End_Plate_Drawing.FCStd (previous post), calling Part::Feature::getShape(TR001) returns
a Compound that looks like this:
SEgetShapebrep.png
SEgetShapebrep.png (17.45 KiB) Viewed 1084 times
The endplates should be aligned with the beam as here:
TR001_Beam_Correct.png
TR001_Beam_Correct.png (12.52 KiB) Viewed 1084 times
Should I expect the endplates to be in their final position, or do I need to disassemble the Compound and apply a placement
on the sub-shapes?

Thanks.
Attachments
SEgetShape.brep
(56.54 KiB) Downloaded 37 times
DDM
Posts: 88
Joined: Tue Feb 05, 2019 9:06 am

Re: Drawing link object in a page with techdraw

Post by DDM »

Should I expect the endplates to be in their final position, or do I need to disassemble the Compound and apply a placement
on the sub-shapes?
Yes, the end plates should be in the final position.
It isn't a compound. I created the TR001 using "Make link group/Simple Group".

My steps were:

1) for the beam (P001): a structural element from arch workbench
2) for the end plates (P002): sketch--->>extrude (part workbench) --->>> structure (arch workbench)
3) move the end plate to the final position
3) links of P001 end P002 (for P002 I set the "element count" property to 2 and I move one end plate at the end of the beam)
4) "link trasnform" property of the links set to TRUE
5) create the link group (TR001)
6) create a link of the Link Gruop in the "TR001_Beam+End_Plate_Drawing.FCStd" file
7) create the page and the drawing of the LK_TR001, LK_P001, LK_P002
in TR001_Beam+End_Plate_Drawing.FCStd (previous post), calling Part::Feature::getShape(TR001) returns
a Compound
I think that the link object does not see the placement of the arch object, but it use the placement of the base element (i.e. the placement of the extrude part or the sketch).

Marco
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Drawing link object in a page with techdraw

Post by wandererfan »

DDM wrote: Thu Mar 26, 2020 8:24 pm It isn't a compound. I created the TR001 using "Make link group/Simple Group".
Yes, but I'm not referring to how TR001 was created.

The compound is returned from Part::Feature::getShape(). This is one of the functions that TD uses to retrieve the OpenCascade shape for objects to be drawn. Usually getShape provides ready to use shapes, but here it does not. Hence the question.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Drawing link object in a page with techdraw

Post by realthunder »

wandererfan wrote: Thu Mar 26, 2020 6:48 pm Should I expect the endplates to be in their final position, or do I need to disassemble the Compound and apply a placement
on the sub-shapes?
It's a bug in handling of link array with LinkTransform. PR submitted here.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
DDM
Posts: 88
Joined: Tue Feb 05, 2019 9:06 am

Re: Drawing link object in a page with techdraw

Post by DDM »

Yes, but I'm not referring to how TR001 was created.
The compound is returned from Part::Feature::getShape(). This is one of the functions that TD uses to retrieve the OpenCascade shape for objects to be drawn. Usually getShape provides ready to use shapes, but here it does not. Hence the question.
Sorry @Wandererfan, I don't understand the question...Thanks for the expalnation, very useful to understand how TD works...

Cheers,
Marco
DDM
Posts: 88
Joined: Tue Feb 05, 2019 9:06 am

Re: Drawing link object in a page with techdraw

Post by DDM »

I tried to set FALSE the property "Link Transform" and to place the Link parts in the final position (See screenshot001)

Now TD draw the TR001 correctly...

Here atteched the last example (V1 version)...

But there is another problem.
When I close the file with the page (TR001_Beam+End_Plate_Drawing_V1.FCStd) and I open the same file I lose the single parts and the report view show this:

DVP::execute - No Sources (but document is restoring) - ProjItem002

Here atteched the screenshot of what I see (Screenshot002)

Thanks for looking in to it...

Marco
Attachments
TR001_Beam+End_Plate_Drawing_V1.FCStd
(11.06 KiB) Downloaded 34 times
Screenshot_002.png
Screenshot_002.png (146.54 KiB) Viewed 1017 times
Screenshot_001.png
Screenshot_001.png (100.15 KiB) Viewed 1017 times
Beam+End_Plate_V1.FCStd
(26.67 KiB) Downloaded 50 times
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Drawing link object in a page with techdraw

Post by wandererfan »

realthunder wrote: Fri Mar 27, 2020 4:44 am It's a bug in handling of link array with LinkTransform. PR submitted here.
Much better. Thank you!
Attachments
EndPlates_Fixed.png
EndPlates_Fixed.png (31.54 KiB) Viewed 993 times
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Drawing link object in a page with techdraw

Post by wandererfan »

DDM wrote: Fri Mar 27, 2020 11:27 am But there is another problem.
When I close the file with the page (TR001_Beam+End_Plate_Drawing_V1.FCStd) and I open the same file I lose the single parts and the report view show this:
DVP::execute - No Sources (but document is restoring) - ProjItem002
I get a whole series of warning messages:

Code: Select all

<PropertyLinks> PropertyLinks.cpp(774): Lost link to TR001_Beam_End_Plate_Drawing Link001 while loading, maybe an object was not loaded correctly
<PropertyLinks> PropertyLinks.cpp(774): Lost link to TR001_Beam_End_Plate_Drawing Link001 while loading, maybe an object was not loaded correctly
11.221 <App> Document.cpp(2718): Reload partial document Beam_End_Plate
DVP::execute - No Sources (but document is restoring) - ProjItem003
DVP::execute - No Sources (but document is restoring) - ProjItem003
QXcbConnection: XCB error: 3 (BadWindow), sequence: 7163, resource id: 61110124, major code: 40 (TranslateCoords), minor code: 0
I don't know what most of them mean, but I know how to fix the Views. Update the Source property of the affected Views (click on the empty field, then press the ellipsis button and select TR001.
fixLostLink.png
fixLostLink.png (65.86 KiB) Viewed 991 times
DDM
Posts: 88
Joined: Tue Feb 05, 2019 9:06 am

Re: Drawing link object in a page with techdraw

Post by DDM »

I don't know what most of them mean, but I know how to fix the Views. Update the Source property of the affected Views (click on the empty field, then press the ellipsis button and select TR001.
I don't see the objects P001 and P002 to update the source (see screnshot_003). I can use only the TR001 as source for ProjGroup001 and ProjGroup002...

Did I make a mistake?

Thanks for your help...
Attachments
Screnshot_003.PNG
Screnshot_003.PNG (145.01 KiB) Viewed 972 times
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Drawing link object in a page with techdraw

Post by wandererfan »

DDM wrote: Fri Mar 27, 2020 6:36 pm I don't see the objects P001 and P002 to update the source (see screnshot_003). I can use only the TR001 as source for ProjGroup001 and ProjGroup002...

Did I make a mistake?
I don't see them either.

Do you get these messages in the Report View?

Code: Select all

<PropertyLinks> PropertyLinks.cpp(774): Lost link to TR001_Beam_End_Plate_Drawing Link001 while loading, maybe an object was not loaded correctly
<PropertyLinks> PropertyLinks.cpp(774): Lost link to TR001_Beam_End_Plate_Drawing Link001 while loading, maybe an object was not loaded correctly
Post Reply