Tube Bending

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
jonasthomas
Posts: 162
Joined: Wed Feb 01, 2012 3:29 am

Tube Bending

Post by jonasthomas »

I been playing around with designing a set of 3d printable recirculating bearings for my next printer and I had the need to create some bent tubes that do not lay in a flat 2d plan. In this project I had I've been experimenting with physically bending hydraulic brake line tubing as well which got me thinking.
I briefly chatting with normandc on the irc about this and it sounds like there there isn't a specific utility for pipe bending in non-planar situations

I was thinking that it might be fun to mimic my pipe bending tool to model a bent tube.
If I stay planar the sketch polyline with arc works well with sweep but doesn't address non-planar conditions.

I haven' experimented yet with this extensively but it seems like a dwire can be non-planar.

An arc would be tangent to the previous element but the center of the arc should be able to be rotated in 3d space about the line (Just like a physical pipe bending)
Questions.
Are there any freecad utilities for 3d pipe bending?
If answer ==yes
Could some one point me to them
Else
Are dwires the way to go?
As far a rotating center of the arc around the tangent point, is that something that I would need to write from scratch?
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Tube Bending

Post by NormandC »

Hello Jonas,
jonasthomas wrote:Are there any freecad utilities for 3d pipe bending?
No. There are a lot of general tools missing before thinking about such specific tools that only a minority of users will need.
jonasthomas wrote:Are dwires the way to go?
The problem with DWires is that they only support straight segments. For tube bending you need arcs. Basically what the sweep needs as path is a wire. Those can be made with the Part "Create Primitives" utility, Draft tools or sketches.
jonasthomas wrote:If I stay planar the sketch polyline with arc works well with sweep but doesn't address non-planar conditions.
This is something that can be addressed with the existing tools, all that is needed is a little ingenuity.

You can create a wire from the intersection of surfaces with the Image Part Section tool.
FC_tube_bending_example_01.png
FC_tube_bending_example_01.png (16.29 KiB) Viewed 6825 times
FC_tube_bending_example_02.png
FC_tube_bending_example_02.png (7.04 KiB) Viewed 6825 times
Then you can close this with a properly placed sketch. As I said on IRC, you can use the Placement utility and Draft Move to place sketches into position.

You can then create sweeps and join them to get this:
FC_tube_bending_example_03.png
FC_tube_bending_example_03.png (20.58 KiB) Viewed 6824 times
EDIT: I could also have use Draft Upgrade on Section and Sketch003 to get a Wire. This would require a single sweep rather than two, but it would have destroyed both Section and Sketch003 and produced a non-editable sweep path.
Attachments
tube_bending_example_normandc1.fcstd
(29.65 KiB) Downloaded 207 times
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Tube Bending

Post by NormandC »

One thing you asked on IRC after I had logged off:
jonasthomas wrote:What I need is a utility map a sketch to the end of the pipe and the create another perpendicular sketch (for the sweep line) passing through the centerline of the pipe. I guess I would need to rotate that sketch along the centerline of the previous pipe to get the bend direction going where I need it.. (I take it nothing like this in freecad at the moment?)
Datum planes/axes are sorely needed tools, some of them have been added in the jriegel/devassembly2 branch, but it's not usable at the moment.

You may be interested in the macro: Macro WorkFeatures
jonasthomas
Posts: 162
Joined: Wed Feb 01, 2012 3:29 am

Re: Tube Bending

Post by jonasthomas »

normandc wrote: You may be interested in the macro: Macro WorkFeatures
Very interesting, but it seems to be missing a perpendicular plane to point.
(It seems it seems like there is still some work to be done on this.)
I noticed that workplanes can't be deleted, it would be nice to be able to map a sketch to a plane.

Doesn't quite give me what I'm looking for, still very impressive work. Thank you for pointing that out.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Tube Bending

Post by NormandC »

jonasthomas wrote:Very interesting, but it seems to be missing a perpendicular plane to point.
A plane can be created with an axis and a point. Can't you use that?

I'll admit I have yet to test this module.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Tube Bending

Post by NormandC »

Hello Jonas,

This subject has been popular recently, with two different people doing tube frame designs.

Contrary to what I previously said:
NormandC wrote:The problem with DWires is that they only support straight segments. For tube bending you need arcs.
I had completely forgotten that a DWire has a Fillet parameter to fillet all corners with a set radius. So it can actually be used to create sweep paths appropriate for tube bending.

See viewtopic.php?f=3&t=9538&p=77726#p77735

The limitation is that you can only use coordinates (global or relative), you cannot for example enter a degree.

For straight paths, you might be interested in the fact that the Arch Frame tool works like a Sweep, but contrary to the Sweep it centers and aligns the profile automatically, which is pretty cool. It doesn't work with paths containing arcs though.
viewtopic.php?f=3&t=9640
Post Reply