How to move parts relative to eachother?

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!
evan542
Posts: 17
Joined: Sat Mar 29, 2014 3:31 am

How to move parts relative to eachother?

Post by evan542 »

OS: Ubuntu 13.10
Platform: 64-bit
Version: 0.13.1830 (Git)
Branch: releases/FreeCAD-0-13
Hash: ec7636d7aaf2612e9b43cff5d6a424037d53e505
Python version: 2.7.5+
Qt version: 4.8.4
Coin version: 4.0.0a
SoQt version: 1.5.0
OCC version: 6.5.4

Hi all,

I'm relatively new to FreeCAD so please excuse my ignorance.

I was trying to figure out how parts can be grouped together and placed relatively to eachother.

Consider a simple example where you have two square boxes of different sizes and you want to place them flush against eachother and the face of the smaller box to be centered on the face of the larger box. How would this work?

Thank you!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: How to move parts relative to eachother?

Post by jmaustpc »

The answer is complicated and depends on so many things.

However some tips that might help....
If you upgrade to the PPA daily version of FreeCAD you will get a lot more features.
You could try the Draft WB "move" tool also
edit menu Placement (optionally relative movement) and Alignments tools.

The other thing is you could possible change the way you have modelled your object, rathern than move two cubes around you could go to the PartDesign WB and sketch the first square...pad to cube then mount a sketch to a faces of that Padded cube and then pad that second sketch thus making your second attached cube.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: How to move parts relative to eachother?

Post by jmaustpc »

Another thought...you can not move a PartDesign solid directly, you have to move the first of the sketches on which it is based. So if you want to use Draft Move tool on a PartDesign solid you must first either create a Draft Clone or a "Part WB... Part Menu...simple copy" of that PartDesign solid and then apply Draft Move to that duplicate object.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: How to move parts relative to eachother?

Post by bejant »

evan542 wrote: I was trying to figure out how parts can be grouped together
In the Hierarchy Tree of the attached model, right-click on "20140329b_Evan542", then from the pop-up window select "Group". When you do this a new Folder named "Group" will appear in the Hierarchy Tree. You can drag and drop items into this folder to group them, and you can create more Groups too.
evan542 wrote:Consider a simple example where you have two square boxes of different sizes and you want to place them flush against eachother and the face of the smaller box to be centered on the face of the larger box. How would this work?
We need to keep track of where everything is located in the 3D space. In the attached file there are two cubes, one is 30x30x30mm and the other is 15x15x15mm. Distance Constraints of the appropriate length were used to center the smaller Sketch001 on the face of the larger cube, but linking to external geometry could be used too. Then the smaller cube was moved up Z = 30mm so the bottom of the small cube is flush with the top of the larger cube.
20140329b_Evan542.jpg
20140329b_Evan542.jpg (9.07 KiB) Viewed 6290 times
Attachments
20140329b_Evan542.FCStd
(19.35 KiB) Downloaded 60 times
evan542
Posts: 17
Joined: Sat Mar 29, 2014 3:31 am

Re: How to move parts relative to eachother?

Post by evan542 »

OS: Ubuntu 13.10
Platform: 64-bit
Version: 0.14.3369 (Git)
Branch: master
Hash: 8693bfab1abc0ba4191d30ab50f8c465bbb920a3
Python version: 2.7.5+
Qt version: 4.8.4
Coin version: 4.0.0a
SoQt version: 1.5.0
OCC version: 6.7.0


Hi everyone,

thank you for your responses! I've started using the daily builds so I re pasted the "about FreeCAD" part above.

With regards to grouping, I found that but it doesn't then allow me to treat it is as one part for example with regards to placement etc. I then tried union/fusion and it worked. I also noticed the "up arrow" in the draft module which while created a new part called "block" it was nowhere to be found. Is "union" good practice?

Thank you for the example. I was wondering how did you move the cube. I was hoping for some operation where you impose a constraint in 3D in a similar way that you can impose constraints in 2D in Sketcher. Or if not a constraint to select the surface of the small and large cube and say they should be parallel.

thanks again!
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: How to move parts relative to eachother?

Post by bejant »

evan542 wrote:Is "union" good practice?
When you did the Union operation you combined two separate objects into one single object. Whether Union is good practice depends on that you're trying to do; it depends on the situation.
evan542 wrote: I was wondering how did you move the cube

Select it in the Tree View, then click the Data tab at the bottom, click all the way to the right of the Placement property window:
Image
(This screen grab was from a different model than yours)

Now change Z (in the left column) from 0 to 30, click Apply or OK at the bottom.
evan542
Posts: 17
Joined: Sat Mar 29, 2014 3:31 am

Re: How to move parts relative to eachother?

Post by evan542 »

I was afraid that was the way you moved it.. That will mean I'll have to do all the math :p

Thanks though!
mario52
Veteran
Posts: 4698
Joined: Wed May 16, 2012 2:13 pm

Re: How to move parts relative to eachother?

Post by mario52 »

hi
use Draft_Move
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: How to move parts relative to eachother?

Post by quick61 »

evan542 wrote:I was afraid that was the way you moved it.. That will mean I'll have to do all the math :p

Thanks though!
Well, with a construction aid, like a sketch, that math can be greatly reduced to big_cube - small_cube / 2. in the case of a 20 mm cube and 15 mm cube, that would be 20-15=5/2=2.5. Using that dimension, and looking at this quick video, you can see how a simple one line sketch can be used as an aid to snap the small cube in the correct position to have it centered on the face of the big cube. As with most things FreeCAD, there is usually more than one way to get things done. ;)

Mark

OS: Ubuntu 13.10
Platform: 64-bit
Version: 0.14.3369 (Git)
Branch: master
Hash: 8693bfab1abc0ba4191d30ab50f8c465bbb920a3
Python version: 2.7.5+
Qt version: 4.8.4
Coin version: 4.0.0a
SoQt version: 1.5.0
OCC version: 6.7.0
This post made with 0.0% Micro$oft products - GOT LINUX?
evan542
Posts: 17
Joined: Sat Mar 29, 2014 3:31 am

Re: How to move parts relative to eachother?

Post by evan542 »

nice post! That was closer to what I was hoping especially how you moved the midpoint to the end point. Now, I'm a bit confused about that I read this (http://www.freecadweb.org/wiki/index.ph ... Draft_Snap) which I think is the essense of how you moved it. Did you click on "midpoint" clicked the point you wanted then clicked on "edge point" and again selected the point you wanted?

Just want to make sure I've got it right.

Thanks!
Post Reply