Piping macro, designing in 3D view "Route5"
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Piping macro, designing in 3D view "Route1"
This is an excellent tool you made! Thank you for sharing this with the community.
/Paulo
STEMFIE.org
STEMFIE.org
Re: Piping macro, designing in 3D view "Route1"
+1
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Piping macro, designing in 3D view "Route1"
Sigh, download the macros, execute the macros, get this:
Select a Body, nothing changes...
Edit: and the dialog size can't be changed.
Open the macro file, figure there will be helpful comments as to what the code does.
Wrong, eight lines of license BS at the top of the file, essentially no comments. (you would not last long in a code review... )
So, how does one get it to run and once the dialog is correct, how do I make these magic pipes you show?
Select a Body, nothing changes...
Edit: and the dialog size can't be changed.
Open the macro file, figure there will be helpful comments as to what the code does.
Wrong, eight lines of license BS at the top of the file, essentially no comments. (you would not last long in a code review... )
So, how does one get it to run and once the dialog is correct, how do I make these magic pipes you show?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Piping macro, designing in 3D view "Route1"
The Body selection needs to be set "Active Body". This should show more dialog options.Select a Body, nothing changes...
Edit: and the dialog size can't be changed.
Open the macro file, figure there will be helpful comments as to what the code does.
Wrong, eight lines of license BS at the top of the file, essentially no comments. (you would not last long in a code review... )
So, how does one get it to run and once the dialog is correct, how do I make these magic pipes you show?
The instructions for usage are located on the third post of this thread.
If you help me finish my house I will write more code comments.
Simple instructions if the dialog is working.
To rotate a pipe section a sketch needs to be selected. This will show more dialog options.
To make a pipe you need a solid face, then select the face and select an edge (curve or round), that should do it.
Thanks for testing. I wish there is some way to know how other computers affect viewing.
Here is a version "Route3" that has some adjustablity to the dialog window. There are also a couple variables in the first few lines of the code if you need more width or height.
Last edited by freedman on Mon Jun 27, 2022 4:36 am, edited 2 times in total.
Re: Piping macro, designing in 3D view "Route1"
With the topological naming problem (TNP) I think it's best to make the pipe a single Body. If your routing a tube, wires or conduit, make your start and ending connectors first and then start a new Body for the pipe. Also to reduce TNP errors, don't add new edges to the piping profile.
When I run a pipe I set the OD to the required value and set the inner diameter to a small hole, this allows me to have a large face to select as I route. Once the pipe is done I go back and set the pipe inner dia. to the correct value.
When I run a pipe I set the OD to the required value and set the inner diameter to a small hole, this allows me to have a large face to select as I route. Once the pipe is done I go back and set the pipe inner dia. to the correct value.
Re: Piping macro, designing in 3D view "Route1"
Ok, so I got through that an made a pipe. But, what if I want to follow and arbitrary spline of my making?freedman wrote: ↑Mon May 30, 2022 2:04 amThe Body selection needs to be set "Active Body". This should show more dialog options.Select a Body, nothing changes...
Edit: and the dialog size can't be changed.
Open the macro file, figure there will be helpful comments as to what the code does.
Wrong, eight lines of license BS at the top of the file, essentially no comments. (you would not last long in a code review... )
So, how does one get it to run and once the dialog is correct, how do I make these magic pipes you show?
The instructions for usage are located on the first post of this thread.
If you help me finish my house I will write more code comments.
Simple instructions if the dialog is working.
To rotate a pipe section a sketch needs to be selected. This will show more dialog options.
To make a pipe you need a solid face, then select the face and select an edge (curve or round), that should do it.
Thanks for testing. I wish there is some way to know how other computers affect viewing.
Here is a version "Route3" that has some adjustablity to the dialog window. There are also a couple variables in the first few lines of the code if you need more width or height.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Piping macro, designing in 3D view "Route1"
How did you do this? I can't your macro to work with anything other than a circle-in-a-circle or on the XY_Plane.freedman wrote: ↑Wed May 25, 2022 2:31 pmNo errors!Have you done a geometry check on the resulting pipe solid?(with BOP check enabled)
I didn't expect errors because the macro doesn't create any geometry it just makes using FreeCAD easier.
Here is a complex shape (pic), No errors and easy to make. I'm running low on time right now but my next feature to add is subtractive piping. I will need to automate face/edge selections inside a solid because FreeCAD has some limitations selecting inside a solid. I really want to be able to make a fluid path inside a 3D printed part.
Thanks
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Re: Piping macro, designing in 3D view "Route1"
I haven't seen any issue with plane restrictions. Remember that to pipe requires a solid face i.e a padded surface no matter what the angle (as far as I know). I have been able to pipe any solid face as long as I have a curve in it somewhere to select.How did you do this? I can't get your macro to work with anything other than a circle-in-a-circle or on the XY_Plane.
In general, the mapmode requires an edge that is curved, an additivepipe requires a face to pipe. All the macro does is collect that info and make a pipe, it stops the process at sketching the pipe spline as you have seen. The sketch can be modified in any way, you can delete or add elements but I give a default curve or a strait line to work on. Any sketch element added will immediately be piped.
The sketch of coarse is plane based but the sketch can be rotated.
I started the hex pad (pic) on the XZ plane. I won't say this easy to build but it's not that hard once you get used to it.
- Attachments
-
- hex_a_pod.png (128.49 KiB) Viewed 1124 times
Re: Piping macro, designing in 3D view "Route1"
Piping a wire bundle and coloring faces looks pretty good, this could be very effective in production using a color printer. The bundle is actually a solid piped face "Pad002" until I want to split the wires out individually"Pad003".
I noticed that everytime I add a new pipe the colors get reset. Is this a known issue? I would wait until everything is routed and then apply color.
I'm also updating to Route4:
Route3 produced some long pipes as a default. When I can get some time I want to size the elbow radius to the pipe size and make it work correctly. I put a reasonable elbow radius in this version.
I noticed that everytime I add a new pipe the colors get reset. Is this a known issue? I would wait until everything is routed and then apply color.
I'm also updating to Route4:
Route3 produced some long pipes as a default. When I can get some time I want to size the elbow radius to the pipe size and make it work correctly. I put a reasonable elbow radius in this version.
- Attachments
-
- connector1.FCStd
- (334.93 KiB) Downloaded 31 times
-
- wire_color1.png (197.14 KiB) Viewed 1112 times
Last edited by freedman on Thu Jun 02, 2022 7:14 pm, edited 1 time in total.
Re: Piping macro, designing in 3D view "Route1"
Downloaded Route4.
Can't change the size, other than being able to reduce it a few pixels.
Start with this: Run macro, end up with this:
Can't change the size, other than being able to reduce it a few pixels.
Start with this: Run macro, end up with this:
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."