Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
How can you smoothly connect two circles on different planes with a tube?
christopher_brett
Member Posts: 17 ✭
How can you smoothly connect two circles on different planes with a tube? The tube must have constant diameter along its length. The tube must be the shortest possible (i.e. a straight tube with curved connections on either end).
I'm aware of "3D fit spline", which you could use to join the centres of the two circles and then sweep, however this will give the whole thing a curve (though you can fiddle with the curve with magnitudes). This uses more material than ideal, and is a little more awkward to 3D print. I want a straight tube with curved connections at either end instead.
Loft is also out I think, as that wouldn't result in a tube with a constant diameter (it would change from a circle profile to an oval and back along its length).
Here's an example:
Here's very nearly what I want, using a bunch of planes and sketches:
However, I can't get both connections lining up with the straight piece. From one sketch I can get this far:
From the other end, in a different plane, I can then do this:
However I can't connect the points in the way that I want because the geometry from the first sketch doesn't allow it (it would need to change the angle and length of the long straight line):
I achieved basically the same thing with the same problem using revolves and extrudes (find the line of revolution that revolves the circle toward the other circle, extrude from it's end).
I think the basic problem in both cases is I need a line to point to a place that can't be determined until the other side has been defined, but in order to define that side, it needs the first side to be defined. I think I could solve it mathematically in one step, but I think the fact that I'm having to do it in separate sketches prevents this approach. Maybe that means I need to resort to feature script? It really feels like this should be possible without though! What am I missing?
Here's an Onshape document with an example: https://cad.onshape.com/documents/bca273998578cc2603c134a3/w/4c4563f13cf1b97e498478d4/e/5026a0b792d398ad4e365a63?renderMode=0&uiState=6613c033fdf56b1bbead94b4
I'm aware of "3D fit spline", which you could use to join the centres of the two circles and then sweep, however this will give the whole thing a curve (though you can fiddle with the curve with magnitudes). This uses more material than ideal, and is a little more awkward to 3D print. I want a straight tube with curved connections at either end instead.
Loft is also out I think, as that wouldn't result in a tube with a constant diameter (it would change from a circle profile to an oval and back along its length).
Here's an example:
Here's very nearly what I want, using a bunch of planes and sketches:
However, I can't get both connections lining up with the straight piece. From one sketch I can get this far:
From the other end, in a different plane, I can then do this:
However I can't connect the points in the way that I want because the geometry from the first sketch doesn't allow it (it would need to change the angle and length of the long straight line):
I achieved basically the same thing with the same problem using revolves and extrudes (find the line of revolution that revolves the circle toward the other circle, extrude from it's end).
I think the basic problem in both cases is I need a line to point to a place that can't be determined until the other side has been defined, but in order to define that side, it needs the first side to be defined. I think I could solve it mathematically in one step, but I think the fact that I'm having to do it in separate sketches prevents this approach. Maybe that means I need to resort to feature script? It really feels like this should be possible without though! What am I missing?
Here's an Onshape document with an example: https://cad.onshape.com/documents/bca273998578cc2603c134a3/w/4c4563f13cf1b97e498478d4/e/5026a0b792d398ad4e365a63?renderMode=0&uiState=6613c033fdf56b1bbead94b4
0
Comments
https://cad.onshape.com/documents/caa2280c222cedaa072e46a4/v/fcdb972ee7d4cf3e737197a3/e/fd8456441926342d6857b449?jumpToIndex=1094
https://cad.onshape.com/help/Content/3d_fit_spline.htm?Highlight=3D spline
However, the length of the first and last lines is not automatically calculated. If it's too far away, I get a straight section before it arcs. If it's too close, it fails to generate (because the arc would have to start before the circle). I could figure out the exact right length using the angle of the direct line and the arc radius, however the length of the first and last lines affects that angle, so I'm back in the same situation where I need to base a number on something that the number is itself dependent on. I think I could calculate it with a bit more complex geometry - create a circle jutting out from the first circle, angled towards the second, likewise create a circle jutting out from the second circle, angled towards the first, connect these two new circles with a line, the line must be tangent to both new circles, from that I should be able to work out the right angles / distances. I'd rather not have to do that though.
I also got pretty close by adjusting the lengths manually until there is only a sliver of straight section before it arcs.
I would still like a full general solution to this.
I have updated https://cad.onshape.com/documents/bca273998578cc2603c134a3/w/4c4563f13cf1b97e498478d4/e/5026a0b792d398ad4e365a63?renderMode=0&uiState=6613c033fdf56b1bbead94b4 with the "3D lines" FS plus manual adjustment of lengths approach.
Maybe I'm in to rounding error territory?
I could try actually using a revolve feature for the bends. Currently it's using a sweep along the arc, then the straight section, then the other arc. In theory, both methods should produce exactly the same result though, right? And not throw an error...
I think the issue is that I've got the wrong arc on both ends, because the arc points at the other circle's centre, rather than the centre of the face that will be created by the other circle's arc sweep. So the arcs are not tangential to the straight line. So sweeping through an arc and the straight section creates intersecting geometry. Even with the bodge of sweeping in 3 parts and unioning, the resultant part is not completely perfect - the angles are fractionally wrong, the faces of the arc sweeps do not perfectly face each other.
I've blown the diameter up in the new example to highlight the problems with this approach. You can see we end up with an oval profile for the straight section, with gaps, overlaps, and non-tangential lines.
I'd still like a solution to this that doesn't involve manually fiddling with the section lengths as is necessary in the "3D lines" FS approach.
Using the 3D Lines FS plus a couple of reference lines to help the FS define the vertices...you get this. The length of the reference lines are not equal because the angles between the 3D Line and the Front plane and Top plane are not equal. You can make the reference lines longer, but make those lines any shorter you start to run into intersecting geometry issues.
This is the ONLY sketch geometry needed to create this.
Here is a link to show how I did it.
https://cad.onshape.com/documents/aa0f564cea4d3c2e58403a32/w/a47373c020f45b158092f9e3/e/153f29ec599c8f67a78ff4ce
The straight section before the bend shouldn't be there. I may settle for it as so close as to be practically perfect, but it's frustrating I can't find a pure calculated solution to this. I'd still like to find one.
I'd really like to figure out a full calculated solution for this problem though, to satisfy my own curiosity as well as to avoid the approximations in the part. If I can get my head around the maths, I could then turn it into a feature script so that nobody else needs to get their head around the maths .
https://cad.onshape.com/documents/b4df260cd6c0f6af7b693e59/w/595244fe7ddc779f4d027b7a/e/5cc7221e73e82757e9665f06
Thanks @dirk_van_der_vaart. That's a nice fully calculated solution, but it doesn't quite do what I wanted (bend, straight section, bend, like it's gutter pipe) which means it uses a bit more material than necessary - largely inconsequential, but now I'm driven mostly by my own curiosity to find a full solution. Also, you have to tune the start and end 3d fit spline magnitudes this way, whereas a bend, straight, bend approach should be fully calculable.
However, I'm struggling to extend this to the case where the circles' angles don't happen to line up so neatly and I need to solve it in 3D. A hand with the maths would be greatly appreciated.
I see this as the top edge and bottom edge of the bend sections being near tangental to each other. Of course to resolve any non-manifold errors there would have to be some minuscule gap between the two.
In the meantime, I found a sketch solution that does slightly more of what I want than previous approximations. I can get it to bend with the same radius as the tube at one end by constraint, but not the other. In this solution, you only need to manually fiddle with one length to get it to approximate on one side, which is slightly better than the "3D lines" FS solution: