PVC Pipe and Fittings Library: Difference between revisions
(Added a thought of mine for others to consider, no pressure.) |
(Organizational Changes + Additions) |
||
Line 1: | Line 1: | ||
=Basics= | |||
* This is a library of all the current PVC Pipe and Fittings that have been made in freecad for OSE | |||
=Pipes= | =Pipes= | ||
The dimensions of the PVC pipes can be found here [[PVC_Pipe]]. | The dimensions of the PVC pipes can be found here [[PVC_Pipe]]. | ||
Wikipedia on Nominal Pipe Size (NPS) [https://en.wikipedia.org/wiki/Nominal_Pipe_Size], | Wikipedia on Nominal Pipe Size (NPS) [https://en.wikipedia.org/wiki/Nominal_Pipe_Size], | ||
Line 8: | Line 17: | ||
The default pipe length is 1ft. When a user uses a macro, the macro stores the last user's input. | The default pipe length is 1ft. When a user uses a macro, the macro stores the last user's input. | ||
=== Macro === | === Macro === | ||
To create pipes use [[File:create-pipe.fcmacro]] and a coresponding CSV file [[File:pipe.csv]] with dimensions. On a unix-like system ensure that the file name is '''p'''ipe.csv. | To create pipes use [[File:create-pipe.fcmacro]] and a coresponding CSV file [[File:pipe.csv]] with dimensions. On a unix-like system ensure that the file name is '''p'''ipe.csv. | ||
Line 19: | Line 31: | ||
[[File:pvc-pipe-gui-screenshot.png|thumb]] | [[File:pvc-pipe-gui-screenshot.png|thumb]] | ||
[[File:pvc-pipe-cad-screenshot.png|thumb]] | [[File:pvc-pipe-cad-screenshot.png|thumb]] | ||
==Notations== | ==Notations== | ||
* O.D. - outer diameter. | * O.D. - outer diameter. | ||
* Average I.D. - average inner diameter (why average?). This dimension determines the size of the pipe. | * Average I.D. - average inner diameter (why average?). This dimension determines the size of the pipe. | ||
* Min. Wall - thickness of the pipe wall. | * Min. Wall - thickness of the pipe wall. | ||
* Schedule - determines (indirectly) the thickness of the wall. | * Schedule - determines (indirectly) the thickness of the wall. | ||
=Elbows= | =Elbows= | ||
Line 30: | Line 49: | ||
Useful links: [https://www.aetnaplastics.com/site_media/media/attachments/aetna_product_aetnaproduct/204/PVC%20Sch%2040%20Fittings%20Dimensions.pdf] | Useful links: [https://www.aetnaplastics.com/site_media/media/attachments/aetna_product_aetnaproduct/204/PVC%20Sch%2040%20Fittings%20Dimensions.pdf] | ||
==90° - Elbows == | == 90° - Elbows == | ||
Described by 3 dimensions: | Described by 3 dimensions: | ||
pipe size, schedule, G,H,M. Other dimensions are derived from NPS pipe-dimensions. | pipe size, schedule, G,H,M. Other dimensions are derived from NPS pipe-dimensions. | ||
Line 37: | Line 57: | ||
I use dimension names from why Aetna Plastics, but I do not know, why they use "G" for 90°-elbows and "J" for | I use dimension names from why Aetna Plastics, but I do not know, why they use "G" for 90°-elbows and "J" for | ||
other elbows. | other elbows. | ||
=== Macro === | === Macro === | ||
To create an 90° elbow, run [[File:create-elbow-90.FCMacro]]. | To create an 90° elbow, run [[File:create-elbow-90.FCMacro]]. | ||
Line 44: | Line 67: | ||
[[File:pvc-elbow-90-cad-screenshot.png|thumb]] | [[File:pvc-elbow-90-cad-screenshot.png|thumb]] | ||
==alpha° - Elbows (Non-90° Elbows) == | |||
== alpha° - Elbows (Non-90° Elbows) == | |||
alpha, pipe size, schedule, H,J,M. Other dimensions are derived from NPS pipe-dimensions. | alpha, pipe size, schedule, H,J,M. Other dimensions are derived from NPS pipe-dimensions. | ||
=== Macro === | === Macro === | ||
To create an elbow with an arbitrary angle alpha from 0° to 180°, run [[File:create-elbow-alpha.FCMacro]]. | To create an elbow with an arbitrary angle alpha from 0° to 180°, run [[File:create-elbow-alpha.FCMacro]]. | ||
[[File:pvc-elbow-alpha-gui-screenshot.png|thumb]] | [[File:pvc-elbow-alpha-gui-screenshot.png|thumb]] | ||
[[File:pvc-elbow-alpha-cad-screenshot.png|thumb]] | [[File:pvc-elbow-alpha-cad-screenshot.png|thumb]] | ||
= Couplings = | = Couplings = | ||
== Simple Coupling == | == Simple Coupling == | ||
A general coupling is described by 10 Dimensions: POD1, PID1, L, M, N. The dimensions POD1 and PID1 are not from a official specifications. | A general coupling is described by 10 Dimensions: POD1, PID1, L, M, N. The dimensions POD1 and PID1 are not from a official specifications. | ||
They are derived from pipe size and schedule. | They are derived from pipe size and schedule. | ||
[[File:simple-coupling.png]] | [[File:simple-coupling.png]] | ||
==Reducer Coupling== | ==Reducer Coupling== | ||
The reducer coupling is described by 8 Dimensions: 4 Pipe dimensions (they follows from pipe sizes and schedule), L, M, M1, and N. | The reducer coupling is described by 8 Dimensions: 4 Pipe dimensions (they follows from pipe sizes and schedule), L, M, M1, and N. | ||
Line 68: | Line 105: | ||
[[File:pvc-coupling-gui-screenshot.png|thumb]] | [[File:pvc-coupling-gui-screenshot.png|thumb]] | ||
[[File:pvc-coupling-cad-screenshot.png|thumb]] | [[File:pvc-coupling-cad-screenshot.png|thumb]] | ||
== Macro == | == Macro == | ||
Line 77: | Line 116: | ||
* A simple csv is here [[File:coupling.csv]]. Note, when downloaded from the OSE wiki, the file will be stored as '''C'''oupling.csv, on a linux system it must be renamed to '''c'''oupling.csv. | * A simple csv is here [[File:coupling.csv]]. Note, when downloaded from the OSE wiki, the file will be stored as '''C'''oupling.csv, on a linux system it must be renamed to '''c'''oupling.csv. | ||
* CSV files with more parts can also be found in [https://github.com/rkrenzler/ose-piping-library-data]. | * CSV files with more parts can also be found in [https://github.com/rkrenzler/ose-piping-library-data]. | ||
= Bushings = | = Bushings = | ||
Bushings are described by dimensions N, L and pipe dimensions. As pipe dimensions we use POD, PID1, and POD1. | Bushings are described by dimensions N, L and pipe dimensions. As pipe dimensions we use POD, PID1, and POD1. | ||
[[File:bushing-dimensions.png]] | [[File:bushing-dimensions.png]] | ||
=== Macro === | === Macro === | ||
To install macros follow instructions in [[PVC Pipe and Fittings Library#Installation]]. | To install macros follow instructions in [[PVC Pipe and Fittings Library#Installation]]. | ||
Line 95: | Line 140: | ||
[[File:pvc-bushing-gui-screenshot.png|thumb]] | [[File:pvc-bushing-gui-screenshot.png|thumb]] | ||
[[File:pvc-bushing-cad-screenshot.png|thumb]] | [[File:pvc-bushing-cad-screenshot.png|thumb]] | ||
=Tees= | =Tees= | ||
== Almost General Tees == | == Almost General Tees == | ||
Described by parameters G, G1, G2, H, H1, H2, M, M1, and pipe dimensions. As pipe dimensions we use POD, POD1, PID, PID1. | Described by parameters G, G1, G2, H, H1, H2, M, M1, and pipe dimensions. As pipe dimensions we use POD, POD1, PID, PID1. | ||
[[File:tee-dimensions.png]] | [[File:tee-dimensions.png]] | ||
=== Macro === | === Macro === | ||
Line 106: | Line 159: | ||
[[File:pvc-tee-gui-screenshot.png|thumb]] | [[File:pvc-tee-gui-screenshot.png|thumb]] | ||
[[File:pvc-tee-cad-screenshot.png|thumb]] | [[File:pvc-tee-cad-screenshot.png|thumb]] | ||
Line 112: | Line 166: | ||
[[File:simple-tee-dimensions.png]] | [[File:simple-tee-dimensions.png]] | ||
=== Macro === | === Macro === | ||
Run [[File:create-tee.fcmacro]] to create a tee. | Run [[File:create-tee.fcmacro]] to create a tee. | ||
Line 120: | Line 179: | ||
== Almost General Cross == | == Almost General Cross == | ||
Described by dimensions G, G1, G2, G3, H, H1, H2, H3, M, M1, and pipe dimensions. As pipe dimensions we use POD, POD1, PID, and PID1. | Described by dimensions G, G1, G2, G3, H, H1, H2, H3, M, M1, and pipe dimensions. As pipe dimensions we use POD, POD1, PID, and PID1. | ||
[[File:cross-dimensions.png]] | [[File:cross-dimensions.png]] | ||
=== Macro === | === Macro === | ||
To install macros follow instructions in [[PVC Pipe and Fittings Library#Installation]]. | To install macros follow instructions in [[PVC Pipe and Fittings Library#Installation]]. | ||
Line 134: | Line 197: | ||
[[File:pvc-cross-gui-screenshot.png|thumb]] | [[File:pvc-cross-gui-screenshot.png|thumb]] | ||
[[File:pvc-cross-cad-screenshot.png|thumb]] | [[File:pvc-cross-cad-screenshot.png|thumb]] | ||
=Genaerated Library Parts= | =Genaerated Library Parts= | ||
<gallery perrow=6> | <gallery perrow=6> | ||
File:pvc-pipe-cad-screenshot.png |'''SCH80 1" PVC pipe''' - size:5kb - FreeCAD -[[File:pvc-pipe-test.fcstd]], | File:pvc-pipe-cad-screenshot.png |'''SCH80 1" PVC pipe''' - size:5kb - FreeCAD -[[File:pvc-pipe-test.fcstd]], | ||
Line 179: | Line 246: | ||
</gallery> | </gallery> | ||
=Macros= | =Macros= | ||
Line 186: | Line 257: | ||
FreeCAD community provides a little tutorials for [https://www.freecadweb.org/wiki/Macros creation] and [https://www.freecadweb.org/wiki/How_to_install_macros installation] of macros. | FreeCAD community provides a little tutorials for [https://www.freecadweb.org/wiki/Macros creation] and [https://www.freecadweb.org/wiki/How_to_install_macros installation] of macros. | ||
== Installation == | == Installation == | ||
The video isntructions are here [https://youtu.be/9FlW4C4nk68]. | The video isntructions are here [https://youtu.be/9FlW4C4nk68]. | ||
Line 195: | Line 269: | ||
# Now copy all files from the downloaded '''macros''' directory to the FreeCAD macro directory. In this example "/home/ose-developer/.FreeCAD/Macro/". | # Now copy all files from the downloaded '''macros''' directory to the FreeCAD macro directory. In this example "/home/ose-developer/.FreeCAD/Macro/". | ||
# Select a FreeCAD menu item "Macro"->"Macros..." then select the corresponding macro -- it startart with "create-..." and click "Create". | # Select a FreeCAD menu item "Macro"->"Macros..." then select the corresponding macro -- it startart with "create-..." and click "Create". | ||
== How to create a pipe macro == | == How to create a pipe macro == | ||
Steps to create GUI: | Steps to create GUI: | ||
The original instruction are taken from [https://wiki.qt.io/QtCreator_and_PySide] but I (Ruslan) have problems with them. I adjusted them to FreeCAD. | The original instruction are taken from [https://wiki.qt.io/QtCreator_and_PySide] but I (Ruslan) have problems with them. I adjusted them to FreeCAD. | ||
Line 210: | Line 287: | ||
#: If you use the FreeCAD macro editor, pay attention that the indention of pyside-uic and of the editor are the same. | #: If you use the FreeCAD macro editor, pay attention that the indention of pyside-uic and of the editor are the same. | ||
# Insert content of the methods setupUi(self, Dialog) and retranslateUi(self, Dialog) from pipe-dialog.py (How can I insert here a block of python code?) into your macro file. | # Insert content of the methods setupUi(self, Dialog) and retranslateUi(self, Dialog) from pipe-dialog.py (How can I insert here a block of python code?) into your macro file. | ||
== Remarks about the coupling macro == | == Remarks about the coupling macro == | ||
To create a simple coupling or a reduced we internally use a more general coupling. | To create a simple coupling or a reduced we internally use a more general coupling. | ||
Line 224: | Line 302: | ||
The offset a1 is calculated in such a way, that the thinest part of the middle section is not thinner than the walls on of the both sockets. | The offset a1 is calculated in such a way, that the thinest part of the middle section is not thinner than the walls on of the both sockets. | ||
Lengths a2, a3, a4 and angle b1 are derived from the dimensions and are only used to calculate a1. | Lengths a2, a3, a4 and angle b1 are derived from the dimensions and are only used to calculate a1. | ||
= FAQ = | = FAQ = | ||
* Do we really want to 3D-print pipe fittings? Somehow I have doubt about mechanical properties of the 3D-printed products. | * Do we really want to 3D-print pipe fittings? Somehow I have doubt about mechanical properties of the 3D-printed products. | ||
*: Yes. For high pressure applications - 300 PSI - we would have to be very careful. For low pressure, such as 5 PSI, it's not a problem. Eventually, we want to refine printing techniques where our fittings can do what standard schedule 80 ABS fittings can do. | *: Yes. For high pressure applications - 300 PSI - we would have to be very careful. For low pressure, such as 5 PSI, it's not a problem. Eventually, we want to refine printing techniques where our fittings can do what standard schedule 80 ABS fittings can do. | ||
** Also with things such as part baking/anealing, composite filaments, and SLA or SLS Printers, very durable parts can be made | ** Also with things such as part baking/anealing, composite filaments, and SLA or SLS Printers, very durable parts can be made | ||
=See Also= | |||
* | |||
=Useful Links= | |||
* |
Revision as of 16:25, 4 February 2018
Basics
- This is a library of all the current PVC Pipe and Fittings that have been made in freecad for OSE
Pipes
The dimensions of the PVC pipes can be found here PVC_Pipe. Wikipedia on Nominal Pipe Size (NPS) [6],
A pipe is described by its outeder diameter OD, its inner diameter ID and its length L.
The default pipe length is 1ft. When a user uses a macro, the macro stores the last user's input.
Macro
To create pipes use File:Create-pipe.fcmacro and a coresponding CSV file File:Pipe.csv with dimensions. On a unix-like system ensure that the file name is pipe.csv.
The macro creates a vertically pipe with one end (base) of the pipe onto the x-y plane. The center of the base has coordinates (0,0,0). The other end points to the positive direction of the z-axis.
Rationale: FreeCAD places in the same way a new cylinder. We mimic this FreeCAD behavior for the UI consistency.
Notations
- O.D. - outer diameter.
- Average I.D. - average inner diameter (why average?). This dimension determines the size of the pipe.
- Min. Wall - thickness of the pipe wall.
- Schedule - determines (indirectly) the thickness of the wall.
Elbows
Useful links: [7]
90° - Elbows
Described by 3 dimensions: pipe size, schedule, G,H,M. Other dimensions are derived from NPS pipe-dimensions.
One can create 90° with alpha°-elbow macro. Just set alpha=90° and J = G. I use dimension names from why Aetna Plastics, but I do not know, why they use "G" for 90°-elbows and "J" for other elbows.
Macro
To create an 90° elbow, run File:Create-elbow-90.FCMacro.
alpha° - Elbows (Non-90° Elbows)
alpha, pipe size, schedule, H,J,M. Other dimensions are derived from NPS pipe-dimensions.
Macro
To create an elbow with an arbitrary angle alpha from 0° to 180°, run File:Create-elbow-alpha.FCMacro.
Couplings
Simple Coupling
A general coupling is described by 10 Dimensions: POD1, PID1, L, M, N. The dimensions POD1 and PID1 are not from a official specifications. They are derived from pipe size and schedule.
Reducer Coupling
The reducer coupling is described by 8 Dimensions: 4 Pipe dimensions (they follows from pipe sizes and schedule), L, M, M1, and N.
Macro
To install macros follow instructions in PVC Pipe and Fittings Library#Installation.
Run File:Create-coupling.fcmacro to create a simple coupling or a reducer coupling. Ensure that you have a valid coupling.csv file in the same directory as the macro. To add new parts you need to change your coupling.csv.
- A simple csv is here File:Coupling.csv. Note, when downloaded from the OSE wiki, the file will be stored as Coupling.csv, on a linux system it must be renamed to coupling.csv.
- CSV files with more parts can also be found in [8].
Bushings
Bushings are described by dimensions N, L and pipe dimensions. As pipe dimensions we use POD, PID1, and POD1.
Macro
To install macros follow instructions in PVC Pipe and Fittings Library#Installation.
Run File:Create-bushing.FCMacro to create a reducer bushing fitting. Ensure that you have a valid bushing.csv file in the same directory as the macro. To add new parts you need to change your bushing.csv.
- A simple CSV is here File:Bushing.csv.
- CSV files with more parts can also be found in [9].
Tees
Almost General Tees
Described by parameters G, G1, G2, H, H1, H2, M, M1, and pipe dimensions. As pipe dimensions we use POD, POD1, PID, PID1.
Macro
Run File:Create-tee.fcmacro to create a tee.
Simple Tees
Described by parameters G, G1, H, H1, L, M, and pipe dimensions. As pipe dimensions we use POD, POD.
Macro
Run File:Create-tee.fcmacro to create a tee.
Cross
Almost General Cross
Described by dimensions G, G1, G2, G3, H, H1, H2, H3, M, M1, and pipe dimensions. As pipe dimensions we use POD, POD1, PID, and PID1.
Macro
To install macros follow instructions in PVC Pipe and Fittings Library#Installation.
Run File:Create-cross.FCMacro to create a (reducing) cross fitting. Ensure that you have a valid cross.csv file in the same directory as the macro. To add new parts you need to change your cross.csv.
- A simple csv is here File:Cross.csv. Note, when downloaded from the OSE wiki, the file will be stored as Cross.csv, on a linux system it must be renamed to cross.csv.
- CSV files with more parts can also be found in [10].
Genaerated Library Parts
SCH80 1" PVC pipe - size:5kb - FreeCAD -File:Pvc-pipe-test.fcstd,
90°-elbow test file - size:17kb - FreeCAD -File:Pvc-elbow-90-test.fcstd,
Tee test file - size:24kb - FreeCAD -File:Pvc-tee-test.fcstd
Coupling test file - size:12kb - FreeCAD -File:Pvc-coupling-test.fcstd
Cross test file - size:29kb - FreeCAD -File:Pvc-cross-test.fcstd
3" Tee - size:17kb - FreeCAD -File:Pvc-bushing-test".fcstd
3" Elbow - size:4kb - FreeCAD -File:Pvc-elbow-3".fcstd
3" Tee - size:7kb - FreeCAD -File:Pvc-tee-3".fcstd
Library of STEP Downloads from McMaster Carr
Comparable in size to generated parts - except for some parts which are way too heavy.
1" PVC Elbow - size:19kb - FreeCAD -File:1"-pvc-elbow.fcstd,
1" PVC Tee - size:25kb - FreeCAD -File:1"-pvc-tee.fcstd,
1" PVC Valve - size:500kb - FreeCAD -File:1"-pvc-valve.fcstd,
1"-3/4" PVC Bushing - size:13kb - FreeCAD -File:1"-34"-reducer.fcstd,
1" PVC Cross - size:13kb - FreeCAD -File:1"-cross.fcstd,
2" PVC Elbow - size:157kb - FreeCAD -File:2"-elbow.fcstd,
- 2"-tee.jpg
2" PVC Tee - size:8kb - STEP -[1] - FreeCAD - File:2"-pvc-tee.fcstd
- 2"-tee-short.jpg
2" PVC Tee - Short Nonstandard - size:4kb - STEP -[2] - FreeCAD - File:2"-pvc-tee-short.fcstd
- 2"-3"-bushing.jpg
2"-3" bushing - size:161kb - STEP -[3] - FreeCAD - File:2"-3"-bushing.fcstd
- 3"-2"-reducer.jpg
2"-3" reducer. Note difference between a reducer and a bushing (last one) - size:161kb - Menards -[4] - FreeCAD - File:3"-2"-reducer.fcstd
- 3"-2"-reducer.jpg
2"-1" reducer. - size:10kb - STEP -[5] - FreeCAD - File:2"-1"-PVC-reducer.fcstd
Macros
Macros are now in a git repository for the macros is https://github.com/rkrenzler/ose-piping-library. The CSV tables with parameters can be found in https://github.com/rkrenzler/ose-piping-library-data
FreeCAD community provides a little tutorials for creation and installation of macros.
Installation
The video isntructions are here [11].
- Download ose-piping-library from [12]. To run the macros you only need the content of the directory macros. The macros directory contains macro files with extension .FCMacro, drawing with dimensions .png and some .csv tables with part parameters for testing. The more realistic .CSV tables can be downloaded from [13].
- Determine the directory where FreeCAD looks for macros: Menu "Edit"->"Preferences"->"Macro". Look at the settings "Macro path". It is for example "/home/ose-developer/.FreeCAD/Macro/".
- Now copy all files from the downloaded macros directory to the FreeCAD macro directory. In this example "/home/ose-developer/.FreeCAD/Macro/".
- Select a FreeCAD menu item "Macro"->"Macros..." then select the corresponding macro -- it startart with "create-..." and click "Create".
How to create a pipe macro
Steps to create GUI: The original instruction are taken from [14] but I (Ruslan) have problems with them. I adjusted them to FreeCAD.
- Create with QT Designer a Dialog based on QDialog class. Save the name for example add-nps-pvc-pipe-dialog.ui.
- Convert add-nps-pvc-pipe-dialog.ui to python code running
- pyside-uic add-nps-pvc-pipe-dialog.ui -o pipe-dialog.py
- or call
- pyside-uic --indent=0 add-nps-pvc-pipe-dialog.ui -o pipe-dialog.py
- to use tabs as indention.
- If you use the FreeCAD macro editor, pay attention that the indention of pyside-uic and of the editor are the same.
- Insert content of the methods setupUi(self, Dialog) and retranslateUi(self, Dialog) from pipe-dialog.py (How can I insert here a block of python code?) into your macro file.
Remarks about the coupling macro
To create a simple coupling or a reduced we internally use a more general coupling. This general coupling is described by 9 dimensions: POD, PID, POD1, PID1, X1, X2, N, M, M1. The dimensions POD, PID, POD1, and PID1 are derived from the pipe sizes. The are abbreviations of Pipe Outer Diameter and Pipe Inner Diameter. The dimensions X1 and X2 are not official dimension names.
The offset a1 is calculated in such a way, that the thinest part of the middle section is not thinner than the walls on of the both sockets. Lengths a2, a3, a4 and angle b1 are derived from the dimensions and are only used to calculate a1.
FAQ
- Do we really want to 3D-print pipe fittings? Somehow I have doubt about mechanical properties of the 3D-printed products.
- Yes. For high pressure applications - 300 PSI - we would have to be very careful. For low pressure, such as 5 PSI, it's not a problem. Eventually, we want to refine printing techniques where our fittings can do what standard schedule 80 ABS fittings can do.
- Also with things such as part baking/anealing, composite filaments, and SLA or SLS Printers, very durable parts can be made
See Also