Extrude Along Path
thingiverse
This OpenSCAD script generates a polyhedron by extruding a polygon along a specified 3D path using parametrically listed points. List comprehensions allow specifying both the path and polygon points. The native implementation of path extrusion in OpenSCAD involves copying the 2D origin-centered polygon along each point of the path, rotating copies around the origin to face the next point on the path, and orienting them for a perpendicular unit vector matching with the next copy's vector. The 'path_extrude.scad' script contains the most recent version of this algorithm. It also has a revision-controlled format available online. Updates from 2018 code include a rewritten code from scratch while preserving function signatures, fixing gimball lock issues by adjusting negative signs in rotation functions, and introducing tweening between two polygons with equal path lengths via 'exShape2' argument for simple linear scaling. Explicit scale and rotation options are available for tweaking polygons at each location. To use this script, place 'path_extrude.scad' in the same directory as your OpenSCAD code and add "use ;" to the top of your code. The syntax of the module is 'path_extrude(exPath, exShape, exShape2=[], exRots = [], exScale = [], merge=false)'. It creates an extruded path object by translating and rotating a shape defined by 'exShape' along a path described by 'exPath'. Optional arguments include additional rotation ('exRots'), scale factor ('exScale'), and merging the extruded path at the start and end points. Constrains on this script require that 'exPath' should be a vector of at least length 3 with 3D vectors, 'exShape' should be a vector of at least length 3 with 2D vectors representing a single closed polygon, 'exShape2' (optional) should be a single closed polygon with the same number of points as 'exShape', and 'exRots' and 'exScale' should be vectors of at least length 1. Examples provided include a pentagon spiral and a double rotated spiral using OpenSCAD code.
With this file you will be able to print Extrude Along Path with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Extrude Along Path.