Hi Pilou,
> And the very cool thing is that you can make any number of different "Windows" in the same time!!!
Indeed, that was my original goal, but I think our models are a little different. Think about a model of a building where you have many windows of differing sizes and locations as well as interior partition walls for rooms. My intent was to put a 2D curve on the outside of the walls wherever a window was to be located. Using the two phase selection model (like Boolean Difference), the script allows selecting all the walls to be cut followed by selecting all the window curves. Then the script examines the wall behind each window’s curve to determine that wall’s thickness and finally the script cuts and frames each window into its wall. Since a door is similar to a window, the script can also work for cutting and framing doors, but doesn’t go so far as to make the doors themselves.
> Your last challenge put a frames & Glass in each piercing…
Well…it already does that for my intended use… ;-}
Originally the “probe depth” was fixed at 15 inches which I thought would be sufficient for models of buildings. I like to avoid hidden constants if I can, and so to allow for other use cases, I exposed it as an option. The purpose of this probe depth is so that the script can figure out how thick each wall is while allowing for the selected walls to be of differing thickness. Ideally probe depth should only be a little deeper than the wall is thick. This probing business is kind of a hack because I couldn’t figure out another way to have the script discover the adjacent objects…something that I was asking Michael about on the V5 wish list thread.
When you make the probe depth super deep like you are showing, that causes the script to make a mistake in determining the adjacent wall’s thickness: it blasts through multiple walls. With a 200cm probe depth, you’re telling the script that a single wall may be up to 200cm thick, but that’s not what your model shows.
You’re also putting the window curve well outside of the wall rather than on the wall like I was originally thinking.
Both of these things suggest that maybe I can improve the logic a bit to avoid the errors of one window and frame poking through multiple walls, and the pane of glass not being inside of the wall. The challenge is to work on many different types of walls, some of which can have multiple layers with spaces in between the layers.
Thanks for providing a different use case to think about!
--Larry
|