How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

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!
SixHourDays
Posts: 10
Joined: Wed May 15, 2019 10:44 pm

How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Post by SixHourDays »

Hello,
My version is 0.18, I'm attempting to design an arcade cabinet in the PartDesigner. I have 2 goals - to model it fully assembled in 3D, and to prepare a .dwg for my local shop to CNC. This is only my 3rd day of FreeCAD, so forgive my noobness. I've attached the file and a photo.

So far, I've done this in Part Designer:
1st Body, sketched and padded a side wall with the shape I want
Made a ShabeBinder of the inner edges & verts of the wall, moved it to next Body
2nd Body, new sketch based on ShapeBinder to make a cross member, padded out cross member
3rd Body, same as 2nd

At that point, I tried to copy the shapes, then arrange them into a 4'x8' sheet so they could be CNC'd. Basically take the cross members, turn 90' and translate beside the sidewall..making 3 shapes to cut in the sheet.

But I couldn't figure out how to do it. Arch Panel Cut doesn't work on these Bodies. Surely I don't need to eyeball transform each one - there must be a way to 'snap' a body so that it's flat to a plane? Please understand I don't mean project it to 2d - just to align a body's broad face to a plane.


Also - should I build it differently altogether? Please let me know! I'm doing my best following tutorials.
Capture.PNG
Capture.PNG (8 KiB) Viewed 1193 times
Version info:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16110 (Git)
Build type: Release
Branch: (HEAD detached at upstream/releases/FreeCAD-0-18)
Hash: f7dccfaa909e5b9da26bf50c4a22ccca9bb10c40
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Attachments
testing.FCStd
(36.12 KiB) Downloaded 26 times
Last edited by SixHourDays on Fri May 17, 2019 3:27 pm, edited 1 time in total.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Post by bejant »

Hi SixHourDays, and welcome! I can't address everything but I hope I can give you enough to help you get further along.

SixHourDays wrote: Wed May 15, 2019 11:25 pm But I couldn't figure out how to do it. Arch Panel Cut doesn't work on these Bodies.
I haven't learned the Arch WB > Panel tool but I'm not sure that it will work on a Body container. I think you'll have to choose the Sketch that is inside each Body container because the Panel tool works with 2D shapes. Fore more info, see here: https://www.freecadweb.org/wiki/Arch_CompPanel

So for the upper and lower marquees you'll need a Sketch of the upper faces of each (because of the bevels, the top faces are the largest). You can create a Sketch on the top of each marquee panel to get the size, then make a Draft or Arch WB > Clone of each Sketch to use with the Panel tool. It's not shown in the attached image, but I made a Clone of the Sketch for the right wall, changed the Data Tab > Property > Scale X from 1 to -1 to make a mirror image of the Sketch to place on the 4'x8' sheet (just a Draft WB > Rectangle). To use the Panel tool, the Property > Make Face of the Rectangle must be toggled to True if it wasn't already. I also changed the Property > Reversed of the right wall Pad from False to True because my rectangle is at Z = 0 and I wanted the top of Pad to be on the same Z = 0 Plane as the Rectangle.

Just to see how the pieces might lay out on a 4' x 8' sheet I made Clones of the marquee Pads, then used Arch or Draft > Move tool (4-way blue arrow, first tool in the Draft Modification toolbar) along with Arch or Draft WB > Snaps to position the Pads on the rectangle, but instead I think you should use the new Sketches you create on the top faces of the marquee Pads. Just so you know, Sketches can be moved with the Arch or Draft WB > Move tool.

SixHourDays wrote: Wed May 15, 2019 11:25 pm Also - should I build it differently altogether?
I think you're doing fine, so far.

I used Tools > Dependency Graph and saw that for some reason Sketch003 and Sketch004 are outside of their respective Bodies. You can drag-and drop each Sketch back into the respective Body in the history tree. Dependency Graph info:
https://www.freecadweb.org/wiki/Std_DependencyGraph


20190516a.png
20190516a.png (13.62 KiB) Viewed 1113 times

20190515a-testing.FCStd
(49.37 KiB) Downloaded 23 times


OS: Ubuntu 18.04.2 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.18.1.
Build type: Release
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)


Strikethrough = edit because I swapped the image for a better one and then changed the text accordingly.
Last edited by bejant on Thu May 16, 2019 3:06 pm, edited 1 time in total.
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Post by chrisb »

Hi SixHoursDay, welcome. The next step would not be to create another body, but to change to PathWorkbench and create a job with the three objects. That would create clones, which you can rearrange.

As you don't want to CNC yourself you still can use the same technique:
- Create a clone of each body and hide the originals.
- Then change the placement to rotate them all into one plane
- Use Transform tool to rearrange them; this can, of course, also be done by changing the placement directly.

Edit: cross post with early-bird-bejant.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Post by chrisb »

SixHourDays wrote: Wed May 15, 2019 11:25 pm Also - should I build it differently altogether?
Not altogether, but there are some aspects to consider.

Instead of repeating the length of Pad002 you could use Expressions to reuse the length of Pad001.

After reading bejant's post I head a look at the dependency graph as well, and found more issues there:
You reference the ShapeBinder SBRightWall from two different bodies. That's not allowed. A ShapeBinder is like a proxy of its source object to be used in one body. You will have to create a ShapeBinder in each of them.

And there is something which should not have happened: body RighWall has no origin. Do you have any idea how that could have happened?

@other_forum_members: There was a post with some python code to recreate origin. Has someone a link to it?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
meme2704
Veteran
Posts: 2926
Joined: Sat Apr 01, 2017 2:47 pm
Location: Vosges

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Post by meme2704 »

Hi
I figured it could be handled with Sheetmetal, and I discovered that it was improved by creating an unfold sketch.
certainly, the result is not complete because it is necessary to manually retouch the shape of the lower shelf, and move the panels of 2 shelves to place them properly in the 4x8 sheet
Attachments
étagère.PNG
étagère.PNG (10.34 KiB) Viewed 1152 times
étagère.FCStd
(34.98 KiB) Downloaded 22 times
SixHourDays
Posts: 10
Joined: Wed May 15, 2019 10:44 pm

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Post by SixHourDays »

chrisb wrote: Thu May 16, 2019 5:52 am
SixHourDays wrote: Wed May 15, 2019 11:25 pm Also - should I build it differently altogether?
Not altogether, but there are some aspects to consider.

Instead of repeating the length of Pad002 you could use Expressions to reuse the length of Pad001.

After reading bejant's post I head a look at the dependency graph as well, and found more issues there:
You reference the ShapeBinder SBRightWall from two different bodies. That's not allowed. A ShapeBinder is like a proxy of its source object to be used in one body. You will have to create a ShapeBinder in each of them.

And there is something which should not have happened: body RighWall has no origin. Do you have any idea how that could have happened?

@other_forum_members: There was a post with some python code to recreate origin. Has someone a link to it?
Thank you all for being welcoming and helpful - these parts of the internet get rarer every day.

Bejant, Meme2704 - I will get to your replies, once I get the following sorted :-)

chrisb: I'd like to understand the 'proper' way to build this; so lets go over what I should do for some parts of this diagram.
Firstly, the origin - as I recall, I literally just made an XY plane sketch in an otherwise empty file to start off the Rightwall. But, later, I Mirrored that body to make a LeftWall - which I deleted for the file I provided (you have a simpler file than my real one here). Could that have nuked the origin? I thought it was weird that LeftWall assumed Rightwall as a child.

Next up: dependency graph. Yes, it's a mess - this is because I'm abusing ShapeBinders from ignorance. Here's my real workflow: make a shapeBinder of a body I want to reference, then move the shapebinder to a temp body (collecting several shapebinders there). I do this so that I can link to the external edges of multiple other bodies (sometimes you want to use 2 or 3 shapebinder edges in a sketch). Then with the sketch done, I copy the sketch out to a new Body - it asks what kind of link I want, I say reference. And now, I have a sketch in a new Body, ready to pad, but still referring to the varying SB's (so if I change earlier Bodies the sketch updates appropriately).

Here's how I arrived at that workflow - all I really wanted to do was build MarqueeUpper, referring to edges in RightWall. But in a new Body, you can't link to external edges of another body. Ok so what if we build the MarqueeUpper sketch inside of RightWall, then copying the sketch out into a new Body? Unfortunately this copies the whole Rightwall with it from dependency, so I don't want that either.

This is when I found ShapeBinders - which are quite buggy to create, by the way. If you rotate the camera while creating them, it's broken until you reload the file... not fun. Picking a face also doesn't seem to work. The only way I could create them succesfully was to do the vertex & edge picking version. So I create a shapebinder - and again unfortunately, you still can't refer to it from another Body!

Because there will be roughly 10 crossmembers, I didn't want to go through the buggy ShapeBinder creation that many times, certainly not to make one for every time I refer to RightWall... so I figured out how to reuse them with some sneaky moves between bodies. This (in my head) essentially makes an N:1 link between sketches and shapebinders. That's not ok to do? Can I ask why not? If I'm reading your implication right, I'm supposed to create a ShapeBinder inside MarqueeUpper referring to RightWall, and again create one inside MarqueeLower referring to RightWall?


Finally - yes, I will use an Expression to link all the cross member lengths to Pad001
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Post by chrisb »

SixHourDays wrote: Thu May 16, 2019 2:54 pm This (in my head) essentially makes an N:1 link between sketches and shapebinders. That's not ok to do? Can I ask why not? If I'm reading your implication right, I'm supposed to create a ShapeBinder inside MarqueeUpper referring to RightWall, and again create one inside MarqueeLower referring to RightWall?
Yes tha't the way to go, but it is far more simple than what you did. The ShapeBinder is used to prohibit direct access from inside of a body to something outside. To refer from a sketch to a ShapeBinder in another body is even worse, because it is a reference from inside of one body into another body.

Here is the workflow for your model which I would follow:
- Start in PartDesign workbench, not in Sketcher, that will create the sketches immediately inside of the active body.
- Create RightWall body with all its sketches and features
- Create a new body, it will be active; you can rename it to MarqueeLower
- Select from the existing RightWall body what is needed in MarqueeLower, and create a ShapeBinder. I recommend to ShapeBind the Sketch
- The ShapeBinder is created in the active body, which still is MarqueeLower, no need to move anything
- Hide RighWall, so it will not get in the way with the ShapeBinder
- Create the sketch in MarqueeLower, use the ShapeBinder for external references.
- Do the same with MarqueeUpper, again nothing to be moved.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Post by chrisb »

SixHourDays wrote: Thu May 16, 2019 2:54 pm This is when I found ShapeBinders - which are quite buggy to create, by the way. If you rotate the camera while creating them, it's broken until you reload the file... not fun. Picking a face also doesn't seem to work.
I frequently use ShapeBinders, and I frequently move the camera while creating them without any issues. To trace down a possible error you should:
- Add your FreeCAD info as described following the IMPORTANT link above.
- Give a step by step description of what you are doing and what you expect, and where you encounter the error.

To select a face you may have to start either with some faces selected or without any selection at all, Than you can add faces, edges, and vertices with the AddGeometry button. If you have added a whole body no faces can be selected. This is possibly a bug, which others should please confirm (its bold to attract other forum regulars).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Post by bejant »

chrisb wrote: Thu May 16, 2019 4:41 pm To select a face you may have to start either with some faces selected or without any selection at all, Than you can add faces, edges, and vertices with the AddGeometry button. If you have added a whole body no faces can be selected. This is possibly a bug, which others should please confirm (its bold to attract other forum regulars).
It got my attention, but first I have to expand my knowledge of ShapeBinders. Maybe I can look into the behavior a bit further this weekend.
SixHourDays
Posts: 10
Joined: Wed May 15, 2019 10:44 pm

Re: How do I transform PartDesigner Bodies into a plane representing a 4x8 sheet?

Post by SixHourDays »

chrisb wrote: Thu May 16, 2019 4:41 pm
SixHourDays wrote: Thu May 16, 2019 2:54 pm This is when I found ShapeBinders - which are quite buggy to create, by the way. If you rotate the camera while creating them, it's broken until you reload the file... not fun. Picking a face also doesn't seem to work.
I frequently use ShapeBinders, and I frequently move the camera while creating them without any issues. To trace down a possible error you should:
- Add your FreeCAD info as described following the IMPORTANT link above.
- Give a step by step description of what you are doing and what you expect, and where you encounter the error.

To select a face you may have to start either with some faces selected or without any selection at all, Than you can add faces, edges, and vertices with the AddGeometry button. If you have added a whole body no faces can be selected. This is possibly a bug, which others should please confirm (its bold to attract other forum regulars).
Hi, I added my exact version info to the OP.

Here are steps to reproduce breaking the camera when making a Shape Binder:
new document
part design wb
create new body
create new sketch, XY plane
draw any full constrained sketch
create new pad from sketch, any size
create 2nd new body & activate
create new shape binder
click Task's Object button (don't click the pad yet!)
note camera rotate / pan with shift+rightclick is fine, and camera cube control is fine
now select the pad in the view
note the camera breaks, and the camera control cube goes away

it will remain broken until you reload a file.
Add / Remove Geo buttons seem fine to use - it's just Object button causing problems.
Post Reply