Welcome! Log In Create A New Profile

Advanced

Building bridges: How to create an arc in a tube

Posted by Replace 
Building bridges: How to create an arc in a tube
February 07, 2014 08:43AM
Let me explain: I would like to design a suspension bridge. (Think of the San Fransisco one)

The road is just a collection of cubes, as are the straight supports.
The suspension cables are vertical cylinders, however,
Everything hangs on the big "shore to shore" cables that folow an downside arc (probably hyperbolic, not circumferensic.

So I need to define a horizonta pipe that is deformed into an arc.

What function, or code would allow this to happen, or to simulate the end goal ?


Advice is appreciated
Thomas


www.3daybreaker.blogspot.com

Orca V4.4 rebuild to Ramps with Mk8 and E3D, as well as a Rostock Delta Mini and an OLO in backorder :-)
Re: Building bridges: How to create an arc in a tube
February 07, 2014 11:30AM
A hanging cable by itself will take on the shape of a catenary. When the weight of the cable is small compared to the weight of the road, the cable instead follows (almost) the shape of a parabola.

You can use this nifty perl script to sweep a profile in OpenSCAD. I'm on Windows running Strawberry Perl and all I need to do to create a parabolic cable from the command line is this:

perl path_extrude_2014-Jan-21.pl -polygon "(cos($t), sin($t))" -path "(10*($t-3.1415), 0, 1.5*($t-3.1415)*($t-3.1415))" -fn 100 -pn 20 > cable_test_3.scad


Re: Building bridges: How to create an arc in a tube
February 08, 2014 04:47PM
Uhh.. I am not familiar with native Perl, but if I understand it right:

you run the script and output it to the .SCAD file ?
So I can than later import it there and add the rest of the bridge parts ?

Or can I put the script code directly ion the OpenScad source file ?

Thomas


www.3daybreaker.blogspot.com

Orca V4.4 rebuild to Ramps with Mk8 and E3D, as well as a Rostock Delta Mini and an OLO in backorder :-)
Re: Building bridges: How to create an arc in a tube
February 08, 2014 06:12PM
Assuming you are on windows (I think on Linux perl is standard) and you have perl installed, and perl is on the correct path and everything (if you do the default strawberry install this should probably "just work") then, open up a windows command prompt... and at the command prompt type in the "perl path_extrude blah blah blah...".

Part of that "blah blah blah", this part at the end: "> cable_test_3.scad" tells windows to dump the output of the perl script into a file called "cable_test_3.scad". I've attached it so you can see what it looks like. Then you can put additional OpenSCAD code into cable_test_3.scad directly, or import it into another OpenSCAD file, etc.

cable_test_3.scad
Sorry, only registered users may post in this forum.

Click here to login