How to get visible lines at intersections of planes?
-
Hi,
I work for a custom cabinetry retailer, and i'm currently using SketchUp to create a parts library for a line of cabinetry we carry. i already have most of the necessary features incorporated into the component cabinet (doors hinged left and right, adjustable width, depth, and height, adjustable # of shelves, adjustable # of vertical partitions, etc). but the features i want to focus on are the adjustable # of shelves and the adjustable # of vertical partitions, for these are the features that present the problem of not producing lines where they intersect. in the picture below, you can see that lines are visible where the shelves terminate on the inside face of the left and right cabinet sides. likewise, you can see visible lines where the vertical partitions terminate on the inside faces of the upper and lower decks. but if you look at the intersections of the shelves and the vertical partitions, you can see that there are no lines physically drawn there:
now these intersections aren't too hard to spot so long as the cabinet is viewed from a specific range of angles...but due to the shading method used on the interior vertical and horizontal faces, certain viewing angles cause these intersections to disappear altogether (see picture below, and compare it to picture above):
now i understand that these "lines" are not visible because none of the shelves nor any of the vertical partitions actually terminate at any of those intersections, and SketchUp therefore does not recognize those intersections as actual physical lines...rather the shelves start on the inside face of one of the cabinet sides, then go through the vertical partition(s), and terminate on the inside face of the other cabinet side. likewise, the vertical partitions start on the inside face of one of the cabinet decks, go through the shelf (or shelves), and terminate on the inside face of the other cabinet deck. i was hoping that someone might know about a SketchUp function that can add visible lines to the intersections of planes, and that i simply haven't found it yet. but the more i look, the more i get the feeling that there is no such function.
i've tried a few things so far, but to no avail. my first attempted solution was to create 2 vertical rectangles (rectangles in the y-z plane) of a height and depth matching the cross-section of one shelf, and separated horizontally by a distance matching the thickness of one vertical partition. i then made the two rectangles into a single sub-component of the overall cabinet component. once the sub-component is positioned properly in the cabinet, the rectangles themselves get hidden by the shelf (or shelves), while the lines that make up the edges of the rectangles are visible at the intersections of the shelves and vertical partitions. you can see this in the picture below - note that this sub-component, named <shelf_seams>, and its copies, are highlighted in the outliner window, and are also visible in the component cabinet itself as blue lines that stand out against the rest (which are black):
the above picture also makes it obvious that i was able to give the <shelf_seams> sub-component the same predefined "Copies" attribute that i gave to the <shelf> sub-component, whether you're looking at the outliner window or the cabinet itself. but then i started playing around w/ the number of center partitions, and i immediately noticed a problem:
when i switch to an even number of vertical partitions (which consequently eliminates the possibility of there being a "center" vertical partition, because the formula for partition quantity is designed to space them evenly), the <shelf_seams> sub-component does not mimic the change in vertical partition quantity and location. the intuitive solution would be to use the "Copies" attribute again, this time to make the <shelf_seams> sub-component mimic the quantity and distribution behavior of the vertical partition(s)...
...and this is the conundrum - as you've already seen, the <shelf_seams> sub-component is already using its "Copies" attribute to mimic the quantity and distribution behavior of the <shelf> sub-component! and so it can't also be used to mimic the quantity and distribution behavior of the <part_vert> sub-component (the vertical partition(s))...well actually it can, but then shelf quantity and vertical partition quantity would always have to be the same (which is out of the question, b/c i'll undoubtedly run into scenarios in which a cabinet will get more shelves than partitions or vice versa).
if only there were a way to have more than just one "Copies" attribute per component...that would solve the problem i believe. perhaps there is a way to incorporate more than just one "copies" attribute into a single component, and i just haven't figured it out yet? if anyone knows definitively whether or not i am truly limited to a single "Copies" attribute per component, please let me know...and if i'm not limited to a single "Copies" attribute per component, could you please show me how to "add" a 2nd "Copies" attribute to the component? and, of course, if none of this is possible, i'm open to alternative suggestions...
also, i've uploaded the full cabinet component just in case anyone wants to download it and play around with it...it might help you visualize better what i've done so far, or perhaps help you help me come up with a solution to my conundrum.
TIA,
Eric
-
I think you could use intersect (with selection) to create those lines or use a boolean (pro) and add them together.
-
@kaas said:
I think you could use intersect (with selection) to create those lines or use a boolean (pro) and add them together.
thanks for the quick response. i tried the former (intersect with selection):
...and it worked - initially...
...but once i change either the shelf quantity or the vertical partition quantity (or both), this happens:
you can see in the above picture that even though i switched to a "1 shelf, 1 vertical partition" configuration following the use of the intersect (with selection) function, several lines generated by the intersect function remain from the "2 shelves, 2 vertical partitions" configuration. also, note that its not just the lines of intersection that remain, but also the long edges of the vertical partitions...why would those lines be generated by the intersection function when they're not lines of intersection? and is it weird that the previous vertical partition edges are left over, but the previous shelf edges are not? should not just the intersection lines be left over?
at any rate, is there a way to get the lines generated by the intersection function to "relocate" along with the shelves and vertical partitions whenever their quantities are changed? or perhaps there's a way to get the previously generated lines to delete and have new ones regenerated any time i choose to change the shelf and/or vertical partition quantity? when i'm sitting with a client and showing him/her different shelf and partition configurations, i can't be highlighting specific sub-components and performing the intersection function on them every time i change the configuration. i need the new intersection lines to just "be there" when i change the configuration.
-
you'll want to be inside of the group of component and use "intersect with model".
or preferably for less geometry and a cleaner model you'd cut each of those pieces as they would be in real life.
Using dynamic components you may be able to get the results you want with dynamic shelving and dividers. I am not one to ask on how to go about it though.
-
@krisidious said:
you'll want to be inside of the group of component and use "intersect with model".
sketchup is not letting me intersect a group in a component to another group in another component. in other words, i can't seem to intersect the right face (a group) of the vertical partition (a component) with the top face (another group) of the shelf (another component). it only allows me to select whole components and intersect them with other components. and anyways, the "intersect to model" seems to do the same thing as the "intersect with selection" in that it generates lines that don't go away after i change the shelf or partition quantity. in addition to that strange behavior, this time if i move/relocate the whole cabinet, the previously generated, out of place lines don't travel with the cabinet, but rather remain stationary on the grid so to speak.
@krisidious said:
or preferably for less geometry and a cleaner model you'd cut each of those pieces as they would be in real life.
Using dynamic components you may be able to get the results you want with dynamic shelving and dividers. I am not one to ask on how to go about it though.
i had actually thought of that already and tried to implement individual shelves "between" the vertical partitions (so that their ends, which would terminate on the faces of the partitions, had visible lines). i was partially successful in that i was able to get a shelf (or shelves) to to adjust in width according to the number of partitions. but i couldn't figure out how to make copies to fill in the spaces between other partitions. i figured it couldn't be much harder than creating evenly spaced full-width shelves or full-height partitions (as i've already done successfully). but the even spacing of those shelves and vertical partitions are centered on the height and width of the cabinet respectively. component-wise, my shelves are not "centered" on the cabinet, and therefore do not extend to each side from the center. rather they start from the left inside face and extend to either the right inside face, or the closest vertical partition. i've uploaded the model for you to download so you can see how the shelves are positioned to start on the left inside face. in the mean time, here are a few pictures of how the shelf functions as i change the number of vertical partitions:
-
Perhaps each of you vertical partitions should have the options within them of how many shelves?
-
As for the intersection, I don't believe you can achieve that within dynamic components. I don't think that the geometry is actually drawn, but written to be drawn on demand. Does that make sense? I mean, from what I gather, that the component is actually textual and the geometry is representational of that text dynamically... so any lines that exist at any time within it must be written out in the options.
-
I would rethink how this DC works.
Each vertical can be positioned and sized as you desire, using a single definition that is 1"x1"x1" that you 'scale' in lengths of XYZ.
The exact same for each of the shelves... so one shelf 'box' does all...
You just need to do some convoluted calculating in the functions to locate each shelf appropriately - say offset 0.5mm from its start-vertical's right-hand-most face, and its total 'LenX' then 'scaled' to say the ('gap' - 1mm). Leaving small gaps between the shelf's ends and the verticals will mean these ends always show properly, and then all of the objects are also much more like the 'real world', where the shelves would be cut slightly smaller that the gap into which they will be fitted... -
i still don't know if we're limited to just the one predefined "Copies" attribute in the component attributes menu, or if a 2nd, 3rd, 4th, etc. can be added somehow...if it were possible, it would solve this issue straight away. so if anyone knows definitively whether this is possible or not, please let me know.
@krisidious said:
Perhaps each of you vertical partitions should have the options within them of how many shelves?
i'll have to ponder this some more and see where it takes me...i'll let you know if this direction takes me anywhere...
@tig said:
I would rethink how this DC works.
Each vertical can be positioned and sized as you desire, using a single definition that is 1"x1"x1" that you 'scale' in lengths of XYZ.
The exact same for each of the shelves... so one shelf 'box' does all...
You just need to do some convoluted calculating in the functions to locate each shelf appropriately - say offset 0.5mm from its start-vertical's right-hand-most face, and its total 'LenX' then 'scaled' to say the ('gap' - 1mm). Leaving small gaps between the shelf's ends and the verticals will mean these ends always show properly, and then all of the objects are also much more like the 'real world', where the shelves would be cut slightly smaller that the gap into which they will be fitted...looks that bad to you, eh? i thought it was a pretty good way to start out...nevertheless, being that you are advanced user, i'm definitely interested in your opinion and i am looking to learn.
as regards the small "real life" gap between the ends of the shelves and the partitions, i don't think its necessary in order to guarantee that the ends of the shelves will show properly. as long as the shelves actually terminate at or on the faces of the partitions (and don't actually run the full interior width of the cabinet and through the partitions), the lines that define those shelf-partition intersections (the borders of the rectangles that form the ends of the shelves) will always be visible. and if i ever need to add that small gap, i know its just a simple matter of adding or subtracting a small integer value to or from the size definition.
also, if you could elaborate on scaling in terms of lengths of XYZ? i'm assuming you're not talking about using the predefined "Scale Tool" attribute, right?
TIA,
Eric -
ok, so i finally came up with a solution that works. i can now change the number of evenly spaced vertical partitions such that individual shelves (or sets of shelves) span the exact distance between them, making the lines that define ends of the shelves visible as they would be in reality:
the explanation of how i got here and the hurdles i had to overcome would be quite verbose, so i'm just going to upload the component for you to download and play with. if anyone has questions about how or why i might have done something a certain way, feel free to ask. also, if anyone has suggestions on how to make this cabinet component less complex geometry/rendering-wise, i'm all ears. i know there's probably more geometry present than is necessary in order to make this cabinet work as i intend, but i'm a beginner, so that's to be expected...i don't know all of the ins and outs of SketchUp yet.
thanks,
EricPS - how difficult would it be to add a 2nd predefined "Copies" attribute (not my own custom attribute) to the component attributes dialog box?...or is it even possible? this would make my model simpler with respect to the amount of geometry present with the component in its most basic form (0 shelves, 0 vertical partitions), if not in the amount of overall geometry rendered when many shelves and/or vertical partitions are present.
Advertisement