problem with referencing to a feature in a different body

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
Cekuhnen
Posts: 443
Joined: Sat Jul 10, 2021 11:37 pm

problem with referencing to a feature in a different body

Post by Cekuhnen »

I try to make a sketch reference in thee Base body in the sketch for the handle to the sketch for the container in the glass body
I can establish the link to the glass body but then nothing further is found

if i understand it right freecad does not allow this

and the only way is to use the spreadsheet to share a dimension or shape builder/sketch clone??
Screen Shot 2021-07-25 at 10.27.28 AM.png
Screen Shot 2021-07-25 at 10.27.28 AM.png (200.65 KiB) Viewed 570 times
here is the link to the model file
https://drive.google.com/file/d/1TslWTn ... sp=sharing


OS: macOS 10.16
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: (HEAD detached at 0.19.1)
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
MacOS Big Sur / Win 10

Designer | Faculty
Wayne State University
Interior - Industrial Design
drmacro
Veteran
Posts: 9002
Joined: Sun Mar 02, 2014 4:35 pm

Re: problem with referencing to a feature in a different body

Post by drmacro »

Are you implying that you want to reference the Glass object from the Base object?

If so, then yes you'd need to use a spreadsheet, dynamic data, or other technique.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: problem with referencing to a feature in a different body

Post by Syres »

Or give @Realthunder's LinkDaily a try, it would appear the user can do all sorts in the Expressions on that build.
User avatar
papyblaise
Veteran
Posts: 8024
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: problem with referencing to a feature in a different body

Post by papyblaise »

you can perfectly use external references, but not in PartDesign,
use sketcher and you can select Glass's sketch as a reference, then either open a new body and put the new sketch in it,
or you design the cup holder with Part and you reintroduce it as a basefeature in a new body if you think it is necessary
Attachments
porte goblelet.FCStd
(331.96 KiB) Downloaded 10 times
domad
Veteran
Posts: 2096
Joined: Mon Jun 22, 2020 12:16 pm

Re: problem with referencing to a feature in a different body

Post by domad »

Good evening to the Community!
I don't know if that's what you're trying to do
Attachments
ref_bodies_different.png
ref_bodies_different.png (170.89 KiB) Viewed 506 times
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: problem with referencing to a feature in a different body

Post by TheMarkster »

I'm not sure exactly what you're trying to do. You want to set a constraint to reference a property of Revolution001? For example, set an angle in the sketch to match the angle used in the revolution you could just do:

<<Revolution001>>.Angle

or if it's a named constraint in the Container sketch:

<<Container>>.Constraints.NameOfConstraint

The Body does not have a local scope for the names of the features. You can see this here where the Revolution in Glass was named Revolution001 since there was already a Revolution in Base.
User avatar
Cekuhnen
Posts: 443
Joined: Sat Jul 10, 2021 11:37 pm

Re: problem with referencing to a feature in a different body

Post by Cekuhnen »

i am so sorry for the confusion


in body "Base"
i would like to set a height of the handle

equal to the height dimension

in body "Glass"
sketch container
Screen Shot 2021-07-25 at 3.03.18 PM.png
Screen Shot 2021-07-25 at 3.03.18 PM.png (70.05 KiB) Viewed 466 times

so I know in spreadsheet i can write down a value but i would rather like to reference between different bodies and sample from sketches and features values needed

i hope this is more clear now
MacOS Big Sur / Win 10

Designer | Faculty
Wayne State University
Interior - Industrial Design
domad
Veteran
Posts: 2096
Joined: Mon Jun 22, 2020 12:16 pm

Re: problem with referencing to a feature in a different body

Post by domad »

Cekuhnen wrote: Sun Jul 25, 2021 7:06 pm ...........
...... Have you seen my previous intervention?
Does it seem to me that you explain that or not?
User avatar
Cekuhnen
Posts: 443
Joined: Sat Jul 10, 2021 11:37 pm

Re: problem with referencing to a feature in a different body

Post by Cekuhnen »

ah interesting with <<>> you can jump right to a container

this worked
or if it's a named constraint in the Container sketch:

<<Container>>.Constraints.NameOfConstraint
Screen Shot 2021-07-25 at 3.09.36 PM.png
Screen Shot 2021-07-25 at 3.09.36 PM.png (179.46 KiB) Viewed 459 times
Screen Shot 2021-07-25 at 3.09.44 PM.png
Screen Shot 2021-07-25 at 3.09.44 PM.png (54.95 KiB) Viewed 459 times
MacOS Big Sur / Win 10

Designer | Faculty
Wayne State University
Interior - Industrial Design
User avatar
Cekuhnen
Posts: 443
Joined: Sat Jul 10, 2021 11:37 pm

Re: problem with referencing to a feature in a different body

Post by Cekuhnen »

domad wrote: Sun Jul 25, 2021 7:12 pm
Cekuhnen wrote: Sun Jul 25, 2021 7:06 pm ...........
...... Have you seen my previous intervention?
Does it seem to me that you explain that or not?
Huh what ? i dont follow.
MacOS Big Sur / Win 10

Designer | Faculty
Wayne State University
Interior - Industrial Design
Post Reply