Thingiverse
Yet another Bezier library for OpenSCAD by arpruss
by Thingiverse
Last crawled date: 3 years ago
This is yet another Bezier library, which takes a list of nodes and control points and generates a list of points that you can then feed into polygon() or some other function. The Bezier curves can be either 2D or 3D, but I've only been using it for 2D.
The library is designed so one can lay out 2D Bezier curves basically in one's head. But if you prefer to lay them out graphically, you can use Inkscape plus this plugin to design Bezier curves for this library.
One of the things I wanted was the ability to have an easy way to include smooth control points--control points that ensure that curve through the node has no cusp.
To use, first do use; and then call the function Bezier(pointList) to generate output points. There is an optional precision=x parameter. With that parameter, about 1/x points will be generated per segment (excepting 2D segments that are a straight line--these are optimized to two points). Default is precision=0.05.
The pointList is a list of points arranged as follows:[node,control,control,node,control,control,node,...]
I recommend that in your code you flag the control points with /*C*/ so you don't get lost in a long list of points.
Each segment of the Bezier curve consists of two nodes, with two control points in between them. You can also have these special control points:
SYMMETRIC(): This makes the control point be on the same line and at the same distance to the node as the control point on the other side
SMOOTH_REL(x): This is like SYMMETRIC() except that the distance of the control point to the node is x times the distance of the other control point to the node (can be negative for special effects); SYMMETRIC() is in fact shorthand for SMOOTH_REL(1)
SMOOTH_ABS(x): This is like SYMMETRIC() except that the distance of the control point to the node is exactly x (can be negative for special effects)
OFFSET(v): This makes the control point be at the neighboring node plus the vector v
POLAR(r,angle): Like OFFSET(v) but specified in polar coordinates; equivalent to OFFSET(r*[cos(angle),sin(angle)]); only works in 2D
SHARP(): Puts the control point at the neighboring node; equivalent to OFFSET([0,0]) (or OFFSET([0,0,0]))
You can't have SMOOTH_*() and/or SYMMETRIC() control points on both sides of a node--the library then wouldn't know which line to place the control points on.
Finally, at the end of your list of points (and only there) you can add one or more REPEAT_MIRRORED(normalVector) points each of which stitches at the end of the path what came before but reflects it in the direction of the normalVector. For instance, if you want to draw a rounded plus sign, you can just include the first quarter, and then two REPEAT_MIRRORED() items.
There is also a utility function DecodeSpecialBezierPoints(p) which takes a node/control point list p and decodes all the special points (SMOOTH_*(), etc.) into ordinary 2D vectors. This is useful if, say, you want to take a Bezier curve and transform it in some way.
See the sample polygons in the source code for examples.
If you just want to use Bezier splines to smooth out the corner of a path, you can use:PathToBezier(path,offset=2,tension=0.551915024494,closed=false)
This returns a Bezier path which rounds off each corner in the path at offset distance from the corner. The tension parameter specifies what fraction of the offset the control nodes are to be added at: the default is designed to make right angles be very close to circular arcs. You will still need to feed the resulting path into the Bezier() function to render it.
Note that REPEAT_MIRRORED() can be used (multiple times if need be) at the end of the path fed into PathToBezier: this allows you to quickly build up more complex shapes. For instance, the rounded plus board for a solitaire game can be generated with: PathToBezier([[1,0],[1,1.5/3.5],[1.5/3.5,1.5/3.5],REPEAT_MIRRORED([-1,1]),REPEAT_MIRRORED([1,0]), REPEAT_MIRRORED([0,1])],offset=0.1)
A useful included module for debugging Bezier curves is BezierVisualize(p).
Updates:
January 8, 2020: Remove warning in newer OpenSCAD versions.
December 12, 2019: PathToBezier() added.
December 1, 2019: SMOOTH_ABS() and other functions work together with LINE() on the other side of the node.
The library is designed so one can lay out 2D Bezier curves basically in one's head. But if you prefer to lay them out graphically, you can use Inkscape plus this plugin to design Bezier curves for this library.
One of the things I wanted was the ability to have an easy way to include smooth control points--control points that ensure that curve through the node has no cusp.
To use, first do use
The pointList is a list of points arranged as follows:[node,control,control,node,control,control,node,...]
I recommend that in your code you flag the control points with /*C*/ so you don't get lost in a long list of points.
Each segment of the Bezier curve consists of two nodes, with two control points in between them. You can also have these special control points:
SYMMETRIC(): This makes the control point be on the same line and at the same distance to the node as the control point on the other side
SMOOTH_REL(x): This is like SYMMETRIC() except that the distance of the control point to the node is x times the distance of the other control point to the node (can be negative for special effects); SYMMETRIC() is in fact shorthand for SMOOTH_REL(1)
SMOOTH_ABS(x): This is like SYMMETRIC() except that the distance of the control point to the node is exactly x (can be negative for special effects)
OFFSET(v): This makes the control point be at the neighboring node plus the vector v
POLAR(r,angle): Like OFFSET(v) but specified in polar coordinates; equivalent to OFFSET(r*[cos(angle),sin(angle)]); only works in 2D
SHARP(): Puts the control point at the neighboring node; equivalent to OFFSET([0,0]) (or OFFSET([0,0,0]))
You can't have SMOOTH_*() and/or SYMMETRIC() control points on both sides of a node--the library then wouldn't know which line to place the control points on.
Finally, at the end of your list of points (and only there) you can add one or more REPEAT_MIRRORED(normalVector) points each of which stitches at the end of the path what came before but reflects it in the direction of the normalVector. For instance, if you want to draw a rounded plus sign, you can just include the first quarter, and then two REPEAT_MIRRORED() items.
There is also a utility function DecodeSpecialBezierPoints(p) which takes a node/control point list p and decodes all the special points (SMOOTH_*(), etc.) into ordinary 2D vectors. This is useful if, say, you want to take a Bezier curve and transform it in some way.
See the sample polygons in the source code for examples.
If you just want to use Bezier splines to smooth out the corner of a path, you can use:PathToBezier(path,offset=2,tension=0.551915024494,closed=false)
This returns a Bezier path which rounds off each corner in the path at offset distance from the corner. The tension parameter specifies what fraction of the offset the control nodes are to be added at: the default is designed to make right angles be very close to circular arcs. You will still need to feed the resulting path into the Bezier() function to render it.
Note that REPEAT_MIRRORED() can be used (multiple times if need be) at the end of the path fed into PathToBezier: this allows you to quickly build up more complex shapes. For instance, the rounded plus board for a solitaire game can be generated with: PathToBezier([[1,0],[1,1.5/3.5],[1.5/3.5,1.5/3.5],REPEAT_MIRRORED([-1,1]),REPEAT_MIRRORED([1,0]), REPEAT_MIRRORED([0,1])],offset=0.1)
A useful included module for debugging Bezier curves is BezierVisualize(p).
Updates:
January 8, 2020: Remove warning in newer OpenSCAD versions.
December 12, 2019: PathToBezier() added.
December 1, 2019: SMOOTH_ABS() and other functions work together with LINE() on the other side of the node.
Similar models
thingiverse
free
Bezier Ribbons 3D by WilliamAAdams
...ly want to get a sense for what's happening here, you might want to play with the model in openscad, or spin the .stl around.
thingiverse
free
Bezier curve for OpenJSCAD by glebkudr
...rve function for use with openjscad. only for 4 points and very simple. you can combine curves if you need more complex patterns.
thingiverse
free
Bezier Library for OpenScad by ckirby
...ts".
at the moment, there is no documentation! but there is a test file that runs through most of the available features.
thingiverse
free
Customisable bezier low-poly vase by bdbbdb
...ezier curves are very strange (loops, non-smooth), not all combinaisons have been tested and some might give you strange designs.
thingiverse
free
Libraries for Beziers and paths for openscad. by MeowFace
...ng objects follow paths in paths.scad. note that i haven't produce stls of them and they will likely take a while to produce.
thingiverse
free
Node matrix pattern generator by pkrysiak
...ile does do the inverse but the customiser times out if you use it so you will have to download the files and compile it yourself
thingiverse
free
Bezier Mesh Surface V0.6 by WilliamAAdams
... the normals pointing in the wrong direction for all cases, nor the short leg syndrome on the triangles, but one step closer now.
thingiverse
free
Public Domain OpenScad Bezier Function by WilliamAAdams
...w different ways of using the beast. perhaps the coolest is using a bezier curve to change color over the surface of the object.
thingiverse
free
Bezier Heart in OpenScad by WilliamAAdams
...t, whatever.
and, on top of that, it's a simple example of how you can use the bezier function to construct something simple.
thingiverse
free
OpenSCAD Conic Bezier Curve by donb
...e. a conic section). please see wikipedia for more info.
conic arc bã©zier curves (3 control points) are used by truetype fonts.
Arpruss
thingiverse
free
Watch band part by arpruss
...watch band part by arpruss
thingiverse
my son needed this.
thingiverse
free
Smiley face stencil by arpruss
...smiley face stencil by arpruss
thingiverse
simple smiley face stencil.
thingiverse
free
Folding chair foot by arpruss
...folding chair foot by arpruss
thingiverse
quick and dirty folding chair foot. customizable.
thingiverse
free
Customizable hex maze by arpruss
...customizable hex maze by arpruss
thingiverse
generates a hex-cell maze using recursive backtracking.
thingiverse
free
Customizable cable clip by arpruss
...ustomizable cable clip by arpruss
thingiverse
this is a simple customizable cable clip.
this uses and bundles my bezier library.
thingiverse
free
Customizable unicorn horn by arpruss
...ingiverse
customize twist, rounding, height, diameter and number of lobes.
uses (and bundles) my tube mesh and bezier libraries.
thingiverse
free
Wooden railway bridge support by arpruss
...wooden railway bridge support by arpruss
thingiverse
yet another support for brio-style wooden railroad bridges. customizable.
thingiverse
free
Saturn cookie cutter by arpruss
...tter was generated with inkscape and some plugins. instructions on how to do this are here. you can customize various dimensions.
thingiverse
free
Randomized leafy snowflake by arpruss
...domized snowflake generator for blockscad (with an openscad-based customizer exported from it, and variables moved to beginning).
thingiverse
free
Smiley face by arpruss
...inflation scripts. there is a positive version where the eyes and mouth stick out, and a negative version where they are cut out.
Bezier
3ddd
free
VAUGHAN Beziers Shade Lantern
... beziers , shade
люстра vaughan beziers shade lantern.
turbosquid
$18
BEZIER POWDER VANITY
...ier powder vanity for download as max, max, 3ds, fbx, and obj on turbosquid: 3d models for games, architecture, videos. (1550949)
turbosquid
$15
BEZIER 26in CLOSED NIGHTSTAND
...26in closed nightstand for download as 3ds, max, obj, and fbx on turbosquid: 3d models for games, architecture, videos. (1260885)
turbosquid
$15
BEZIER 4-DRAWER DRESSER
...ezier 4-drawer dresser for download as 3ds, max, obj, and fbx on turbosquid: 3d models for games, architecture, videos. (1260881)
3ddd
$1
RH BEZIER
...arm patina
2 drawers slide smoothly on soft-close glides
wipe with a soft, dry cloth
dimensions
26"w x 22"d x 22"h
3ddd
$1
RH/ BEZIER VANITY COLLECTION
...ндивидуальное имя на английском языке.
другие мои моделиhttp://3ddd.ru/users/scion/models
быстрых рендеров!
3d_export
$5
Classic mirror frame 3D Model
...mirror frame 3d model 3dexport classic mirror frame hard bezier mode style interior classic mirror frame 3d model ruwolf...
3d_ocean
$5
Chinese Lampion
...included file .3ds, .fbx, .blend, obj, the object using bezier as the mesh of the lampion’s...
3d_export
$7
Security Camera CCTV CCD
...axes that make animation easier<br>the cable uses a beveled bezier curve that allows animation<br>non-overlapping uvs<br>.blend<br>.obj<br>.stl<br>.fbx<br>this model is suitable for...
3d_export
$9
Vintage Radio Alien design 1958 - c4d fbx 3ds obj
...infographie prades pyrenees-orientales perspective images de synthese 3d narbonne bezier montpellier toulouse france visite virtuelle electromenager darty boulanger fnac...
Openscad
thingiverse
free
OpenSCAD sphere
...openscad sphere
thingiverse
basic project for openscad.
thingiverse
free
Openscad Football by KySyth
...openscad football by kysyth
thingiverse
openscad not tested
thingiverse
free
Openscad Apple by KySyth
...openscad apple by kysyth
thingiverse
openscad apple = not tested
thingiverse
free
Plugs with openscad by benengel
...plugs with openscad by benengel
thingiverse
plugs with openscad and fontawesome
thingiverse
free
Openscad spirals by mafmuf
...openscad spirals by mafmuf
thingiverse
just fooling around with openscad.
thingiverse
free
Practice on OpenScad by ajensen906
...practice on openscad by ajensen906
thingiverse
a very crude practice on openscad
thingiverse
free
Batteries in OpenSCAD by roman_hegglin
...batteries in openscad by roman_hegglin
thingiverse
common batteries as modules for openscad.
thingiverse
free
OpenScad Propeller by KySyth
...se
trying to make a propeller with openscad = not tested
this is some of the results
added the openscad file but still need work
thingiverse
free
Openscad Cloud by Twanne
...openscad cloud by twanne
thingiverse
openscad cloud.
size can be adjusted
thingiverse
free
Geomag for OpenScad by vicnet
...geomag for openscad by vicnet
thingiverse
openscad file to design geomag things.
Library
3d_ocean
$5
Library
...library
3docean
book book case library
library
3d_export
$6
library
...library
3dexport
a ready-made model of a library for use in peru
3d_ocean
$5
Library
...library
3docean
book books furniture home home design interior library
home design…
turbosquid
$15
library
...turbosquid
royalty free 3d model library for download as max on turbosquid: 3d models for games, architecture, videos. (1351741)
turbosquid
$9
Library
...turbosquid
royalty free 3d model library for download as max on turbosquid: 3d models for games, architecture, videos. (1433110)
turbosquid
$7
Library
...turbosquid
royalty free 3d model library for download as max on turbosquid: 3d models for games, architecture, videos. (1363568)
turbosquid
$5
Library
...turbosquid
royalty free 3d model library for download as max on turbosquid: 3d models for games, architecture, videos. (1309343)
3ddd
$1
classic library
...classic library
3ddd
library
classic library
3dsmax 2008 vray
3d_export
$10
Library
...library
3dexport
3d_export
free
library
...library
3dexport
Another
turbosquid
$15
ANOTHER BATHROOM
...quid
royalty free 3d model another bathroom for download as on turbosquid: 3d models for games, architecture, videos. (1171460)
turbosquid
$24
Another World
... available on turbo squid, the world's leading provider of digital 3d models for visualization, films, television, and games.
turbosquid
$39
Another Red Curb
...ee 3d model another red curb for download as ma, obj, and fbx on turbosquid: 3d models for games, architecture, videos. (1182913)
turbosquid
$9
Another Deberenn Sofa
...model another deberenn sofa for download as max, obj, and fbx on turbosquid: 3d models for games, architecture, videos. (1497850)
turbosquid
$2
Another picnic table
... model another picnic table for download as max, obj, and fbx on turbosquid: 3d models for games, architecture, videos. (1426381)
turbosquid
$15
door to another world
...oor to another world for download as 3ds, obj, fbx, and blend on turbosquid: 3d models for games, architecture, videos. (1334842)
3d_export
free
another hacksaw
...another hacksaw
3dexport
. . . 3d model of a hacksaw. 3d model files: - 3ds max 2017 (scanline) - obj (low poly) . . .
turbosquid
$12
Another Country Side Table
... another country side table for download as max, obj, and fbx on turbosquid: 3d models for games, architecture, videos. (1496053)
turbosquid
$29
Furniture - "Another country" modern sofa
...another country" modern sofa for download as obj and c4d on turbosquid: 3d models for games, architecture, videos. (1186189)
3d_ocean
$29
Another Tron Light Cycle with the Rider and Trail
...ther tron light cycle with the rider and the light trail. high quality 3d model,all the materials and lights are included. the...