Stretch lumber with angled end

I’m new, so this is probably something simple, but I’d appreciate some help.

I created a DC called “Lumber” with options to choose sizes like 2x4, 1x6, etc. I also gave it a custom attribute to specify an angle to be cut on the end. I was hoping to end up with a “board” with an angled end that I can scale to various lengths.

I implemented it with a DC containing 2 groups, one a rectangular slab, the other a triangular slab. My formula on the LenZ attribute of the triangle uses a simple trig function of the angle and the width of the piece. All seemed to work fine.

However, I notice that whenever I specify a new angle in the Component Options dialog, I get a new item in the Components window named Lumber#1, Lumber#2, etc.

Can someone please suggest a better approach?

Thanks!

Can you upload your file?

use all components instead of groups… it should look something like this:
(click pic for larger view)

(not included is a way to deal with the board end being 90º )

Hi Jeff

I’ve done your method but it doesn’t work as I expected . To get the miter cut 20º I have to enter 70º to the Angle field.

Could you help me ?

Thanks

Unfortunately nothing will stop SketchUp from creating new component definitions every time a DC is manipulated in a way that changes the internal structure. Only transformations affecting all parts equally, and changing purely text attributes don’t create new definitions. Furthermore, when you change back a component so that it becomes identical to another already existing DC instance, the definitions won’t merge.

Anssi

Thanks, Jeff. Your directions worked great for making the pieces I need.

Thanks, Anssi, for your clarification about component duplication. Unfortunately, this seems quite a stumbling block. I would be using dozens of instances of the component in the model, and I surely don’t want that many individual items in my Components window.

I tried the idea of immediately Exploding the new instance and then saving it as a Group. This did allow me to subsequently use the DC to create another instance without duplicating itself. However, the exploded/grouped instance no longer scales properly. Also, care would be needed to avoid exploding the first (only?) instance and accidentally deleting the underlying sub-components.

Does anyone have a different approach to the idea of scaling the length of an object while retaining the shape of its end?

Thanks!

Dave

yeah, the way i wrote it draws the long angle… in the same way a speed square works but opposite the way most saw’s miter gauges work…

one way to do it the way you’re looking for, would be to add another custom attribute to the mitered_board component named angle2 …so you’ll have :

angle = 60º
angle2 = 90 - angle

then for lenang, change it to = height / tan(angle2)


i see now… i didn’t clearly read the problem prior to responding :wink:

Two things component definitions are invariant when you scale, rotate, move. But when you scale a component the angle on the top will change, so it would seem you use two components, one for the wedge and other for the board. It almost seems there is as much effort in using a DC as just a simple entity, so in the component browser there would be one dimensional board by say 12" lg and your " wedge". You need to scale at the plum cut end of the board other wise the wedge angle will be affected also. If you want to get cute you may be able to make a proxy and the do a mass replace with real thing. That functionality is native capability of SU.
Sorry I have free SU so have zero experience with creating DCs.

perhaps the best solution is to consider “profile builder 2”, a very worth while investment

once loaded extruded profiles can be created and matched to a cut end, which can be further extruded without distortion

further to this by placing the profile created object within a DC, other attributes can be placed. and labels created for layout

A simple example attached (though in metric), you need the profile builder to extend the exposed entities and use the SketchUp report writer to get correct sizes for this

Cheers
Philip

lumber.skp (89.2 KB)

1 Like