Placement using spreadsheet values...

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!
DAP
Posts: 74
Joined: Sun Jul 17, 2016 10:03 pm

Placement using spreadsheet values...

Postby DAP » Wed Apr 18, 2018 9:33 pm

I am attempting to create a part where part of the part is built, then it is rotated by about 15 degrees, then the rest of the part is added to it, so that the first part is at an angle to the second part. Both halves are rather complex and it would be much easier to build them square to the coordinate system.
I am trying to make this part parameterized, and to place all of the parameters in a spreadsheet. This includes the angle of the first part, and a translated position relative to the second part.
I have the first part built, and am attempting to rotate it, but I can't seem to reference spreadsheet values in the Placement dialog.
Is there a way to do what I am trying to do in FreeCAD?
User avatar
sgrogan
Posts: 5882
Joined: Wed Oct 22, 2014 5:02 pm

Re: Placement using spreadsheet values...

Postby sgrogan » Wed Apr 18, 2018 9:41 pm

DAP wrote:
Wed Apr 18, 2018 9:33 pm
Is there a way to do what I am trying to do in FreeCAD?
Use placement in the property (data tab) editor, instead of the dialog?
DAP
Posts: 74
Joined: Sun Jul 17, 2016 10:03 pm

Re: Placement using spreadsheet values...

Postby DAP » Wed Apr 18, 2018 10:08 pm

The tip of the body is a fillet. This does not have a placement in the data tab.
In fact, even if I enter constants in the Placement dialog, it does nothing to the part.
I can translate and rotate the part if I change the body properties, but then I can't add the second part of the design to the shifted and rotated part.
chrisb
Posts: 25649
Joined: Tue Mar 17, 2015 9:14 am

Re: Placement using spreadsheet values...

Postby chrisb » Thu Apr 19, 2018 12:09 am

It would be interesting which FreeCAD version you use. Follow the "IMPORTANT: ..." link above to find out how to tell us.
Next it is very interesting which workbench you use
  • In Part workbench you change the Placement of the object created by the last operation
  • In Part Design workbench of 0.16 you change the Placement of the first sketch
  • In Part Design workbench of 0.17+ you change the Placement of the body
DAP
Posts: 74
Joined: Sun Jul 17, 2016 10:03 pm

Re: Placement using spreadsheet values...

Postby DAP » Thu Apr 19, 2018 6:02 am

I'm using this now: OS: Linux Mint 18.3 Sylvia
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13515 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: e17b340949b75a226cc7d89989b0aa238ccfc75f
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)

Seems to be changing every two days at the moment.

At work, I have a version a few weeks older on Windows, but also 0.17.
If I move the placement on the body, how do I continue to add features to the body in the new coordinate system? I also need to reference features from the original body.

I have already created the object in OpenSCAD, and I am trying to recreate it in FreeCAD, so I can learn FreeCAD.
OpenSCAD_Version.png
OpenSCAD_Version.png (26.57 KiB) Viewed 414 times
The top part is built vertically with its base at [0,0,0] It is then shifted up and tilted back, and the feet are added as a hull between a slice of the bottom of the top piece, and several disks on the x,y plane.
I have the top part built in FreeCAD, but I have been unable to figure out how to shift it, and continue to add the feet to it.
FreeCAD_So_Far.png
FreeCAD_So_Far.png (28.3 KiB) Viewed 414 times
So, yes I can translate and rotate the body, but I cannot put a body inside another body, and I can't add features to the translated and rotated body without them also being translated and rotated the same amount. It is like I am working on a single piece of metal, and half way through the milling, I must remove the part from the vice, move it, and rotate before re-clamping it in the vice and continuing. I can't seem to figure out how to do this in FreeCAD.
chrisb
Posts: 25649
Joined: Tue Mar 17, 2015 9:14 am

Re: Placement using spreadsheet values...

Postby chrisb » Thu Apr 19, 2018 6:40 am

If you move the Body, of course everything inside moves as well, that's what it's all about! I cannot see any other sensible usage of a bodies placement. If you want to move things inside you can do so by changing the AttachmentOffset, which is always relative to the Body Placement.

You can use a body inside another body for boolean operations, but that is hardly necessary as we now have all these subtractive features.
DAP
Posts: 74
Joined: Sun Jul 17, 2016 10:03 pm

Re: Placement using spreadsheet values...

Postby DAP » Thu Apr 19, 2018 7:09 am

chrisb wrote:
Thu Apr 19, 2018 6:40 am
If you move the Body, of course everything inside moves as well, that's what it's all about! I cannot see any other sensible usage of a bodies placement. If you want to move things inside you can do so by changing the AttachmentOffset, which is always relative to the Body Placement.

You can use a body inside another body for boolean operations, but that is hardly necessary as we now have all these subtractive features.
Please tell me how to create a body that is a boolean of two other bodies. If I can do that, I can move forward.
chrisb
Posts: 25649
Joined: Tue Mar 17, 2015 9:14 am

Re: Placement using spreadsheet values...

Postby chrisb » Thu Apr 19, 2018 9:06 am

DAP wrote:
Thu Apr 19, 2018 7:09 am
Please tell me how to create a body that is a boolean of two other bodies.
Its in the wiki: PartDesign Boolean
Tilli
Posts: 93
Joined: Thu Jan 25, 2018 10:38 pm

Re: Placement using spreadsheet values...

Postby Tilli » Thu Apr 19, 2018 9:12 am

DAP wrote:
Thu Apr 19, 2018 7:09 am
chrisb wrote:
Thu Apr 19, 2018 6:40 am
If you move the Body, of course everything inside moves as well, that's what it's all about! I cannot see any other sensible usage of a bodies placement. If you want to move things inside you can do so by changing the AttachmentOffset, which is always relative to the Body Placement.

You can use a body inside another body for boolean operations, but that is hardly necessary as we now have all these subtractive features.
Please tell me how to create a body that is a boolean of two other bodies. If I can do that, I can move forward.
Hi

Not sure if it's exactly the issue you're asking about, but @NormandC helped me with Booleans.

He explained it to me directly and he also altered the relevant Wiki page to make it clearer and more accurate.

:)

[EDIT] : and @chrisb is obviously much faster at typing than myself :D
DAP
Posts: 74
Joined: Sun Jul 17, 2016 10:03 pm

Re: Placement using spreadsheet values...

Postby DAP » Thu Apr 19, 2018 5:43 pm

And this defeats the purpose:
"Tool bodies adopt the local origin of the active Body. If the active Body is not located at (0,0,0) in the global coordinate system, the tool bodies' placement need to be relative to the active Body. It may be easier to leave the active Body's placement at the origin before applying the Boolean feature, then to change its placement."
What I want to do is move the active body relative to a global coordinate system, and place my tools in a global coordinate system, apply the boolian and have a new body as a result. I don't see this happening if everything has to be relative to the active bodies coordinate system.