# Thread: Pipe tee pieces calculations

1. ## Pipe tee pieces calculations

Hi All,

This is my first post and hope its in the right place.

So I am close to completion of my first CNC machine. It is a plasma pipe and tube cutter. I have done most of it on my own, including the programming. But I have ran into a problem I cannot get right. I have figured out most of the formulas i need to cut all the different pipe fittings, but one. The tee piece.

I was wandering if anyone has some advise in which direction to look, or help on this.

Basically what I am looking for is a way to calculate the curve of the cut on the joining pipe and the hole required on the insertion pipe. I am sure there is a way so that the same formula can be used for all angels of joining.

I hope this makes sense.

Thanks for the help in advance.

Wes-Leigh

2. ## Cutting Cylinder Intesection Patterns

I've looked at the querry for a couple of days and hoped somebody who had done the cuts would jump in with a good answer. There is a web page on the topic but most people do not have the level of mathametical sophistication required to read it. See Steinmetz Solid -- from Wolfram MathWorld

It is probably possible to develop parametric equations that would be more useful to you but doing so would require the mathametical analyst to better understand your machine. For example, if your machine could rotate the pipe being cut while moving the pipe clamp in x & y then two equations that specified x and y as a function of rotation angle would be useful but with other machine designs those equations would not be helpful.

To go further you probably should provide a bit of information about your machine. Not necessarily propriatary detail but at least information on how many and what degrees of freedom your machine provides. Further that extra detail might allow others to put the question in a perspective where they could respond.

Tom

3. I think you are talking about saddle joints. Try the following from a web search:

Pipe Joint Template Software

EZpipe

4. Hi Tom.

Thanks, I'll look through the website and see if I can come up with something.

The machine I have built has 2 axis. One routes the 360 and the other is a 6 meter track. Both are driven by steppers with pullies and chain. So I have full freedom of pipe movement. I have been through both links that txcncman posts before. (thanks ) that's where I got my first steps from. I reckoned mabe the basic circle graph function will be important. Which it is. But the more I think about it the more I see there must be more. I figured there can't just be x and y involved there has to be z. That's the trick part.

There several pipe cutting templates generators out there and that's what I'm looking for. But I want to hard code it into my machine. ( thought I'd be smart and instead of using G code I have started writing a specialized code, called it P code lol....... Ok it seemed funnier at the time.)

But what ever I manage to turn up I will keep you posted. ( luckily I have always enjoyed math and excelled at it)

Thanks again
Wes

5. Here is eg. code for the end of a 70mm OD pipe on to a 80mm OD pipe. 90deg. T junction
Is this the type of code you require?

A0 X0.
A15 X-1.0392
A30 X-4.0313
A45 X-8.5755
A60 X-13.8992
A75 X-18.6211
A90 X-20.6351
A105 X-18.6211
A120 X-13.8992
A135 X-8.5755
A150 X-4.0313
A165 X-1.0392
A180 X0.
A195 X-1.0392
A210 X-4.0313
A225 X-8.5755
A240 X-13.8992
A255 X-18.6211
A270 X-20.6351
A285 X-18.6211
A300 X-13.8992
A315 X-8.5755
A330 X-4.0313
A345 X-1.0392
A360 X0.

6. Hi kiwi,

Yes that is the type of code I'm looking for, but I want to know how to generate it.

But I have got it. I'll post up a explanation as to how I got it tonight when I'm in front of the pc.

It's really simple and I have to thank tom for the link he posted on the math theory behind it all.

Later
Wes

7. Originally Posted by Wes-Leigh
...Yes that is the type of code I'm looking for, but I want to know how to generate it.
See attached picture on a method to determining the X points.
Tee junction. Trunk Pipe 80mm. Joining Pipe 70mm. 45deg. No offset. Figures shown are at 30 degrees.
Calculate figures A to F, then X = F - (E + C).

8. Originally Posted by Wes-Leigh
...But I have got it. I'll post up a explanation as to how I got it tonight when I'm in front of the pc.
It's really simple and I have to thank tom for the link he posted on the math theory behind it all.
As I am unable to open the link Tom posted (must be a security thing) I am looking foward to reading your explanation.

9. Originally Posted by Wes-Leigh
....Yes that is the type of code I'm looking for, but I want to know how to generate it.
But I have got it. I'll post up a explanation as to how I got it tonight when I'm in front of the pc...
Not sure how far you got with your problem as I haven't seen your explanation post.

Here is a formula to calculate X as per the picture I posted #7.

X = (R1/Sin(JA))-(((R1-Sqr(R1^2-(Cos(AP)*R2)^2))/Sin(JA))+((Tan(90-JA)*(Sin(AP)*R2))))

10. Originally Posted by Wes-Leigh
....But what ever I manage to turn up I will keep you posted....
Originally Posted by Wes-Leigh
...I'll post up a explanation as to how I got it tonight when I'm in front of the pc....
Pity you can't find the time to post your explanation, we all would like to know what you came up with.

11. ## Found Sometime

Hi All,

Terribly sorry bout taking so long.

Been reli busy programming my cnc machine. I'm doing it all from scratch in C# with a netduino plus. and there is so much i need to learn to get the control of the machine right.

But any way, after seeing kiwi's reply I just sat down and thought i better get this done lol (sometimes all u need is a reminder and a little shove :P)

so the maths behind it all.....

TomB gave the first clue to my answer.... The Steinmetz Solid . This solid is a cross made of two intersecting pipes. they give you the equations as follows (gonna post the formulas in a almost program friendly way):

x(t) = radius_pipe_2 * cos t
y(t) = radius_pipe_2 * cos t

now to use these formulas in a 2d sense (remember we cutting a "flat pattern" in theory) think of a cross. if we hold one end and rotate it. the cross would rotate around the y axis. the length of the cross you holding to rotate is in the x axis. so that means the the pipe intersecting the pipe we holding is in our z axis.

so what this means wen we try and cut the template for the wave and hole we need to remember that we need to some how use all three axis on a 2d plane.

this can be used to make a 90 degree tee piece with pipe. so this solved one problem for me. but i had to further the calculations so that i could come to a point wer i can add in a angle of the joint. this took some digging and research and tinkering with shapes. and i was getting the point wer i wanted to just give up, but then i found a very nice site.

cheaphack: Update to pipemiter.rb

Nick Johnson seems to have the formulas nailed very nicely and this has assisted me so much. i only needed to change a few things. i have written a test unit to draw the shapes on screen for me in vb.net (my native language) i'll post the code now.

12. ## Code

so as promised here is the code.

Code:
```
Dim zr As Double = radius * Cos(i)
Dim yr As Double = radius * Sin(i)
Dim xr As Double = (Sqrt(r_sqrd - zr * zr) + yr * Sin(_angle)) / Cos(_angle)
Dim xc = Cos(_angle) * xr + -(Sin(_angle)) * yr + 0 * zr
Dim yc As Double = Sin(_angle) * xr + Cos(_angle) * yr + 0 * zr
Dim zc As Double = 0 * xr + 0 * yr + 1 * zr
Dim tc As Double = Atan2(xc, zc)
Dim dc As Double = radius * tc

y_move = dc
x_move = yc```
the above code is used to make the hole in the one pipe.

Code:
```            Dim zr As Double = radius * Cos(i)
Dim yr As Double = radius * Sin(i)
Dim xr As Double = (Sqrt(r_sqrd - zr * zr) + yr * Sin(_angle)) / Cos(_angle)
Dim dr As Double = radius * (i)

y_move = dr
x_move = xr```
the above code is used to make the wave cut to fit in the hole.

i is in a loop that runs from 0 to two_Pi
_angle is the angel of the joint
radius is the pipe that is the branch.

if you need any help with more explanation please feel free to contact me.

and it looks like they will fit........ next is to figure out how to make it off set :P

Page 1 of 2 12 Last