Skip to content

shapes3d.scad: create u_shape() module #1743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

twitchyliquid64
Copy link

I use this module all the time so thought it might be a useful addition.

Lmk if I'm doing this right!

@twitchyliquid64
Copy link
Author

   diff()
   u_shape(20, 20) {
     attach("bore_left", TOP, inside=true, shiftout=1) cyl(r=2, h=10);
     attach("bore_right", TOP, inside=true, shiftout=1) cyl(r=2, h=10);
   };

image

@amatulic
Copy link
Contributor

amatulic commented Jul 3, 2025

I don't know where I'd use this in my work, but I have some observations.

  • A simple shape like this is easy enough for anyone to model. Its usefulness, I think, comes from the demonstration of anchoring. As such, it could be an example in a tutorial.
  • I am not sure if 3dshapes.scad is the right place, if it's part of a general category of utility parts like clamps.
  • The default orientation is sub-optimal for 3D printing a U-shaped object that would undergo flex loads, as with a clamp. Layer bonds are the weakest feature of any print. To withstand flex loads, you would want this shape printed flat on the bed, so that there are no flex loads in a direction that would delaminate any layers.
  • Similarly, load-bearing shapes with sharp corners tend to be weaker than curved shapes. It isn't as much of a problem in this case if the two arms of the U are being compressed together except that the corner geometry would create an uneven load distribution across the part. The load on a C-clamp, however, is equivalent to forcing apart the two arms of the U, in which case the load becomes concentrated in the sharp concave corners, causing a crack to appear there earlier compared to a rounded shape.

This might be a good tutorial example. I confess I don't understand attachments in BOSL2, and what I see when I test the example here makes no sense to me with respect to where the holes end up.

@RAMilewski The attach documentation also mentions nothing about the parent anchors "bore_left" and "bore_right". They clearly work, but I can't find any documentation about what they do. I looked for these words in some of the tutorial pages too.

@twitchyliquid64
Copy link
Author

twitchyliquid64 commented Jul 3, 2025

Let me know what you want me to do with it - happy to move to tutorial, a utility parts file etc.

The default orientation is sub-optimal for 3D printing a U-shaped object that would undergo flex loads, as with a clamp.

The default orientation is one that is consistent with a U-shape. Is the norm for BOSL to assume everything is 3d-printed and to orient all parts that way? Happy to, just wasnt aware if so.

Similarly, load-bearing shapes with sharp corners tend to be weaker than curved shapes. It isn't as much of a problem in this case if the two arms of the U are being compressed together except that the corner geometry would create an uneven load distribution across the part. The load on a C-clamp, however, is equivalent to forcing apart the two arms of the U, in which case the load becomes concentrated in the sharp concave corners, causing a crack to appear there earlier compared to a rounded shape.

Love this feedback! It sounds like I should be adding a small fillet to the inside corners by default?

also mentions nothing about the parent anchors "bore_left" and "bore_right"

These are custom anchors for this part. Those anchors represent the 'center' of the U void, rather than the center of the whole part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants