User configurable

Good day, I am using the sketchup pro demo to design stuff out of small steel tubing. I’d like the ability to use arbitrary lengths of a square steel tube, with a few options in angles at each end, like 45 and 22.5 degrees. My first attempt was to use the Engineering toolbox extension, which has the knife tool, and all the steel tubing, to manually cut each angle and length. Then, I realized the sketchup pro demo has the 3D solid tools available, and these are easier to use then the “knife”. So, the angles aren’t so much a problem. I made a few different pieces with different angles, by creating separate component objects for the end angle piece, and a 3rd component which is the steel tube in between. To gain the scalability and get different lengths, I restricted the end angle pieces in the LenX, LenY, and LenZ attributes, such that the snap back to proper dimension when I scale in the Z direction to vary the length. Ok. Unfortunately, there is a “elasticity” in the scale tool, and I can’t scale the piece into a spot where I want it. It snaps back some amount as it recalculates the restriction on the end angles. To get around this, I tried having a user field for LenZ, but this has some other unintended consquences too. In the end, I’d like to be able to generate a cutlist so a steel distributor can get me the material. I know about Builder extension, but am not sure if this will do what I want. Anyone have any tips on the best way to achieve my aim? Thanks. My model in question is attached, and you can see what I mean hopefully. BenchGrinderStand.skp (417.0 KB)

What defines the size? Overall length, or the length of the straight part?

Any particular reason for having the Z-axis along the ‘length’ of the tube (for the short 22.5 777.5 component at least)? It would seem more natural to have length on red X axis, with width as green Y, and height as blue Z.

In the Dynamic Component (DC), you could use the Length attribute to define the length you want - either the length overall, or the length of straight.

Supposing it is the overall length that you define, then the length of the straight piece becomes the overall length, minus length of end1, minus length of end2.

The position of end1 is at the component origin (at least, in the ‘length’ direction), and its size stays fixed.

The start position of the straight piece is at the length of end1. The start position of end2 is at the length of end1 plus the length of the straight piece.

And you know all the relevant dimensions now.

With a DC, you wouldn’t use the scale tool.

Does that help?

PS. And you should hide the edges at the places where ends meet straight section.

Yes, that sounds promising. It also sounds like I need to reference dimensions of the end pieces to define the length of the straight piece, and the position of end1 and the length of the straigh piece to define the position of end2. What is the syntax for this? Or do you have a reference? Thanks John!

Sorry I can’t respond from my computer at the moment - but will look at it tomorrow when I shall have access again. (Just responding from my phone)

I’ve taken your short tube with both ends angled as an example, and made it into a dynamic component which you can resize to any specified overall length.

Here’s the SKP file:
Angled Tube DC.skp (411.5 KB)

I’ve modified the subcomponents by hiding the square end edges, deleting the square end face(s), and reorienting all the subcomponents so that their axes are the same as that of the combined tube, and with their X-axes all along the Sketchup world X-axis (red direction),

The formulae used to place the subcomponents are shown in the screenshot below, in the Formula view of the Dynamic Attributes dialogue box.

The only component option is to set the overall length. If you wanted instead to set the length of the straight part of the tube, modify the forumulae accordingly, and decide where you want the component origin to be. I’ve put it as shown in the screenshot, along the near lower edge of the straight section, in line with the point of End1, but you could choose to put it anywhere that is convenient for placing it in a larger structure, PROVIDED you keep X=0 in the component in line with the endpoint of End1.

If you wanted to elaborate, you could add some or all of the following features:

  • drop down lists of selectable end shapes, to include their X-dimension
  • overall tube dimensions in Y and Z directions
  • tube wall thickness

You’d then have to specify calculations to translate all these options into sizes and positions for inner and
outer tube wall faces, and X-positions and lengths for the ends and middle sections.

If you haven’t already, review the online help for Sketchup Dynamic Components at

Hope that’s enough to get you started.

PS. I haaven’t modified your layer structure, but you probably would be advised to delete all the layers that aren’t relevant to this particular component, purge the file, and re-save it.

PPS. Remember to IMPORT this .skp file into a new drawing to keep the Dynamic Components. If you just OPEN the file, you’ll have to Explode it once to make the DC attributes and options appear when you select the component, R-click, and choose Dynamic Component Options or Attributes.

And one final thought in this post: in retrospect, I shouldn’t have hidden ALL the edges of the End pieces’ square ends - unhide at least the near vertical edges on the ends, which should be visible in this view.

1 Like