Volker Philippent 66e7dc41fa Clean up 1 yıl önce
..
LICENSE 66e7dc41fa Clean up 1 yıl önce
README.md 66e7dc41fa Clean up 1 yıl önce
hull.scad 66e7dc41fa Clean up 1 yıl önce
linalg.scad 66e7dc41fa Clean up 1 yıl önce
lists.scad 66e7dc41fa Clean up 1 yıl önce
mirror.scad 66e7dc41fa Clean up 1 yıl önce
morphology.scad 66e7dc41fa Clean up 1 yıl önce
se3.scad 66e7dc41fa Clean up 1 yıl önce
shapes.scad 66e7dc41fa Clean up 1 yıl önce
so3.scad 66e7dc41fa Clean up 1 yıl önce
spline.scad 66e7dc41fa Clean up 1 yıl önce
trajectory.scad 66e7dc41fa Clean up 1 yıl önce
trajectory_path.scad 66e7dc41fa Clean up 1 yıl önce
transformations.scad 66e7dc41fa Clean up 1 yıl önce

README.md

scad-utils

Utility libraries for OpenSCAD

Morphology

contains basic 2D morphology operations

inset(d=1)             - creates a polygon at an offset d inside a 2D shape
outset(d=1)            - creates a polygon at an offset d outside a 2D shape
fillet(r=1)            - adds fillets of radius r to all concave corners of a 2D shape
rounding(r=1)          - adds rounding to all convex corners of a 2D shape
shell(d,center=false)  - makes a shell of width d along the edge of a 2D shape
                       - positive values of d places the shell on the outside
                       - negative values of d places the shell on the inside
                       - center=true and positive d places the shell centered on the edge

Examples

With a basic sample polygon shape,

module shape() {
    polygon([[0,0],[1,0],[1.5,1],[2.5,1],[2,-1],[0,-1]]);
}

and $fn=32;.

  • inset(d=0.3) shape();

  • outset(d=0.3) shape();

  • rounding(r=0.3) shape();

  • fillet(r=0.3) shape();

*shell(d=0.3) shape();

*shell(d=-0.3) shape();

*shell(d=0.3,center=true) shape();

Mirror

contains simple mirroring functions

mirror_x()
mirror_y()
mirror_z()

example:

module arrow(l=1,w=.6,t=0.15) {
    mirror_y() polygon([[0,0],[l,0],[l-w/2,w/2],[l-w/2-sqrt(2)*t,w/2],[l-t/2-sqrt(2)*t,t/2],[0,t/2]]);
}