• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
OpenScad Surface Solids 1.2 3D Printer File Image 1
OpenScad Surface Solids 1.2 3D Printer File Image 2
OpenScad Surface Solids 1.2 3D Printer File Image 3
OpenScad Surface Solids 1.2 3D Printer File Image 4
OpenScad Surface Solids 1.2 3D Printer File Image 5
OpenScad Surface Solids 1.2 3D Printer File Image 6
OpenScad Surface Solids 1.2 3D Printer File Thumbnail 1
OpenScad Surface Solids 1.2 3D Printer File Thumbnail 2
OpenScad Surface Solids 1.2 3D Printer File Thumbnail 3
OpenScad Surface Solids 1.2 3D Printer File Thumbnail 4
OpenScad Surface Solids 1.2 3D Printer File Thumbnail 5
OpenScad Surface Solids 1.2 3D Printer File Thumbnail 6

OpenScad Surface Solids 1.2

WilliamAAdams avatarWilliamAAdams

June 17, 2011

thingiverse-icon
DescriptionCommentsTags

Description

I was sitting around the kitchen table wondering how I could model a playground slide, or those water slide tubes.

This thing adds hermite curve/surface support to the OpenScad Surface Solids library.

The basic Hermite interpolation calculation has actually been lurking for a while, but now it's put to good usage. With this, there is now a lerp (linear interpolation), berp (bezier interpolation), and herp (hermite interpolation) in the library.

A Hermite curve is defined by two endpoints, and the tangent vectors to those points. It is somewhat related to a Bezier curve. In fact, I use the same Bernstein basis functions to express it. Some people may find it easier to deal with, some harder, but it's just another tool in the box to help you create surfaces.

In this particular case, I've added a 'sweep_hermite()' module to the renderer. This is really easy to work with. You define one curve to be your 'profile', and you define another curve to be the path along which you'll sweep that profile. The module will take care of creating the appropriate polyhedra to fill in the solid. You can give a thickness, and it will extrude in that direction. This is similar to the linear_extrude.

This also shows a general mechanism for doing sweeps with curves. To make it fully generalized, and to reduce the amount of code needed to support different curves, I'll be further developing the matrix representation of curves. That will essentially be the same as having function pointers for surface creation, if you catch my drift.

I've added some visual debugging support. If you decide to show the control frame, you'll get a nice rendering of the profile and sweeep curves, complete with their tangent vectors.

Using tangent vectors is interesting. You need to be mindful that a vector has a length and direction. The length influences the strength of pull in the particular direction. It's best if you think of them centered at [0,0,0] and point them in the direction you want them to go. You'll have to play around with setting them to get the gist of it.

It occurs to me that this might be a good tool to use while learning about different types of curves and surfaces. Particularly with the visual debugging, and the added bonus that you get to print out a physical thing after you've done all your hard playing around.

I made the license public domain, as this is well trod ground.

Are Splines in the offing?

At any rate...

License:

Public Domain

Related Models

Christmas Reindeer kit card preview image

Christmas Reindeer kit card

tone001 profile image

tone001

21,181

PCI/PCI-E Slot Covers - 10 Designs preview image

PCI/PCI-E Slot Covers - 10 Designs

Vector3dArt profile image

Vector3dArt

1,047

Custom QR Code Luggage / Bag Tag preview image

Custom QR Code Luggage / Bag Tag

vlycser profile image

vlycser

9,005

HyperCube 3D Printer/CNC preview image

HyperCube 3D Printer/CNC

Tech2C profile image

Tech2C

14,965

Adjustable GPU Graphics Card Support Bracket preview image

Adjustable GPU Graphics Card Support Bracket

Dušan Sedlačík profile image

Dušan Sedlačík

426

Dual Text Illusion v2.0 preview image

Dual Text Illusion v2.0

neverland forge profile image

neverland forge

1,362

Filler - The Customizable Filament Holder that fills your printer! preview image

Filler - The Customizable Filament Holder that fills your printer!

HugoHuge profile image

HugoHuge

13,650

3D print PCIE slot for 120mm Fan to replace fans on GPU preview image

3D print PCIE slot for 120mm Fan to replace fans on GPU

Sunshine profile image

Sunshine

110