Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
what is the best alternative to boolean controlled geometry in master sketch
cameron_white036
Member Posts: 6 ✭
First let me explain what I mean by "boolean controlled geometry in master sketch". Would like to do something that I don't think is possible so I am seeking alternative options that might make more sense
context
Here is an example of what I would like to do
- High level, say I'm trying to create a variable driven model of a wood framed wall (studs and such)
- I'd like to have a master sketch that just defines some basic measurements. Just wall height / length, window placement and window dimensions. a rectangle with some smaller rectangles inside it basically
- I'd like all this to be defined using variables. Just update the variables and get a new wall layout sketch
- I'd then use the dimensions from that master sketch to place parts (studs) in an assembly using linear patterns (among other things)
So far all well supported as I understand it
The problem
The problem is, I'd like to be able to support a variable number of windows. IE I'd like some of the smaller rectangles to either exist or not exist according to how I set the variables. Let's say my model could support 0 windows up through 4 windows (arbitrary fairly low upper bound to keep things simple). I'd like to be able to control all this using variables in a master sketch and have a downstream wall assembly update with the correct framing.
my initial thought was to have as many variables as I wanted windows to support. So I'd have something like
window_1_exists = true, window_1_height=whatever, (and then the rest of the variables to define window 1)
and then I would repeat this for window_2, window_3, up to however many windows I want to support
This is not possible however. I cannot define a boolean variable and use it to "add or remove" geometry (in this case just a rectangle for a window) from my master sketch
Possible solution
it seems that boolean including or removing of things does exist at the assembly level via assembly configuration checkboxes. It occurs to me that maybe there could be someway to use an abstract "master assembly" to roughly define the wall dimensions and window positions instead of a "master sketch" and then derive my completed assembly from that "master assembly"
I'm pretty new to onshape though and it would not surprise me if there is some reason that is quite a bad idea so I thought I'd ask here and see if anyone had any input before I invest too much time down that path. Thank you in advance for any input
Answers
Here is an option for you to look over and decide if it's something you would like to try. Window parts are derived into framing and adjusted there. Don't fallow the framing methods I know that are not exactly kosher.
https://cad.onshape.com/documents/4eb6f1e7314928f84553eafb/w/7df7e7c0fb0d4df32c432604/e/e79f9e1bbeb94307da9c08d2
Some of the trimmed studs are problematic for making a cut list. Maybe someone can make a suggestion. I'm too tired tonight to continue.
@cameron_white036 :
Do you need the windows to be different from each other?
Else you could set a linear pattern for the windows?
In the literal sense, having things disappear from a sketch based on booleans isn't possible.
have you checked out @EvanReese's series on functions? they can come in handy: https://www.youtube.com/playlist?list=PL3vRFwuO8F6Le7OVmeeg0W7Gh0ghDsuw3
With some changes to method I got a cut list. Will be a bunch of work to cut out window openings by this method. Not my favourite yet. I'll spend more time later to simplify since I may have to do some of this myself over the winter. Would be convenient to work in feet and inches for this kind of stuff until everyone gets converted to metric. LOL
https://cad.onshape.com/documents/4eb6f1e7314928f84553eafb/w/7df7e7c0fb0d4df32c432604/e/e79f9e1bbeb94307da9c08d2
some interesting ideas in here that I had not considered. Thank you for drafting it
Ideally, yes. I'd like to support arbitrary window arrangments in terms of the number of windows, dimensions of windows, an their placements on the wall. I am unfamiliar with the function series you mentioned. I will take a look. thanks for the tip!