diff --git a/README.md b/README.md index 02fa5440..a77ecf6d 100644 --- a/README.md +++ b/README.md @@ -50,127 +50,127 @@ See [examples](examples). ## Documentation - 2D - - [arc](https://openhome.cc/eGossip/OpenSCAD/lib-arc.html) - - [pie](https://openhome.cc/eGossip/OpenSCAD/lib-pie.html) - - [rounded_square](https://openhome.cc/eGossip/OpenSCAD/lib-rounded_square.html) - - [line2d](https://openhome.cc/eGossip/OpenSCAD/lib-line2d.html) - - [polyline2d](https://openhome.cc/eGossip/OpenSCAD/lib-polyline2d.html) - - [hull_polyline2d](https://openhome.cc/eGossip/OpenSCAD/lib-hull_polyline2d.html) - - [hexagons](https://openhome.cc/eGossip/OpenSCAD/lib-hexagons.html) - - [polytransversals](https://openhome.cc/eGossip/OpenSCAD/lib-polytransversals.html) - - [multi_line_text](https://openhome.cc/eGossip/OpenSCAD/lib-multi_line_text.html) - - [voronoi2d](https://openhome.cc/eGossip/OpenSCAD/lib-voronoi2d.html) + - [arc](https://openhome.cc/eGossip/OpenSCAD/lib2x-arc.html) + - [pie](https://openhome.cc/eGossip/OpenSCAD/lib2x-pie.html) + - [rounded_square](https://openhome.cc/eGossip/OpenSCAD/lib2x-rounded_square.html) + - [line2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-line2d.html) + - [polyline2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-polyline2d.html) + - [hull_polyline2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-hull_polyline2d.html) + - [hexagons](https://openhome.cc/eGossip/OpenSCAD/lib2x-hexagons.html) + - [polytransversals](https://openhome.cc/eGossip/OpenSCAD/lib2x-polytransversals.html) + - [multi_line_text](https://openhome.cc/eGossip/OpenSCAD/lib2x-multi_line_text.html) + - [voronoi2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-voronoi2d.html) - 3D - - [rounded_cube](https://openhome.cc/eGossip/OpenSCAD/lib-rounded_cube.html) - - [rounded_cylinder](https://openhome.cc/eGossip/OpenSCAD/lib-rounded_cylinder.html) - - [crystal_ball](https://openhome.cc/eGossip/OpenSCAD/lib-crystal_ball.html) - - [line3d](https://openhome.cc/eGossip/OpenSCAD/lib-line3d.html) - - [polyline3d](https://openhome.cc/eGossip/OpenSCAD/lib-polyline3d.html) - - [hull_polyline3d](https://openhome.cc/eGossip/OpenSCAD/lib-hull_polyline3d.html) - - [function_grapher](https://openhome.cc/eGossip/OpenSCAD/lib-function_grapher.html) - - [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) - - [starburst](https://openhome.cc/eGossip/OpenSCAD/lib-starburst.html) - - [voronoi3d](https://openhome.cc/eGossip/OpenSCAD/lib-voronoi3d.html) + - [rounded_cube](https://openhome.cc/eGossip/OpenSCAD/lib2x-rounded_cube.html) + - [rounded_cylinder](https://openhome.cc/eGossip/OpenSCAD/lib2x-rounded_cylinder.html) + - [crystal_ball](https://openhome.cc/eGossip/OpenSCAD/lib2x-crystal_ball.html) + - [line3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-line3d.html) + - [polyline3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-polyline3d.html) + - [hull_polyline3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-hull_polyline3d.html) + - [function_grapher](https://openhome.cc/eGossip/OpenSCAD/lib2x-function_grapher.html) + - [polysections](https://openhome.cc/eGossip/OpenSCAD/lib2x-polysections.html) + - [starburst](https://openhome.cc/eGossip/OpenSCAD/lib2x-starburst.html) + - [voronoi3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-voronoi3d.html) - Transformation - - [along_with](https://openhome.cc/eGossip/OpenSCAD/lib-along_with.html) - - [hollow_out](https://openhome.cc/eGossip/OpenSCAD/lib-hollow_out.html) - - [bend](https://openhome.cc/eGossip/OpenSCAD/lib-bend.html) - - [shear](https://openhome.cc/eGossip/OpenSCAD/lib-shear.html) + - [along_with](https://openhome.cc/eGossip/OpenSCAD/lib2x-along_with.html) + - [hollow_out](https://openhome.cc/eGossip/OpenSCAD/lib2x-hollow_out.html) + - [bend](https://openhome.cc/eGossip/OpenSCAD/lib2x-bend.html) + - [shear](https://openhome.cc/eGossip/OpenSCAD/lib2x-shear.html) - Functon - - [rotate_p](https://openhome.cc/eGossip/OpenSCAD/lib-rotate_p.html) - - [cross_sections](https://openhome.cc/eGossip/OpenSCAD/lib-cross_sections.html) - - [paths2sections](https://openhome.cc/eGossip/OpenSCAD/lib-paths2sections.html) - - [path_scaling_sections](https://openhome.cc/eGossip/OpenSCAD/lib2-path_scaling_sections.html) - - [bijection_offset](https://openhome.cc/eGossip/OpenSCAD/lib-bijection_offset.html) - - [in_polyline](https://openhome.cc/eGossip/OpenSCAD/lib-in_polyline.html) - - [in_shape](https://openhome.cc/eGossip/OpenSCAD/lib-in_shape.html) - - [midpt_smooth](https://openhome.cc/eGossip/OpenSCAD/lib-midpt_smooth.html) - - [trim_shape](https://openhome.cc/eGossip/OpenSCAD/lib-trim_shape.html) - - [triangulate](https://openhome.cc/eGossip/OpenSCAD/lib-triangulate.html) + - [rotate_p](https://openhome.cc/eGossip/OpenSCAD/lib2x-rotate_p.html) + - [cross_sections](https://openhome.cc/eGossip/OpenSCAD/lib2x-cross_sections.html) + - [paths2sections](https://openhome.cc/eGossip/OpenSCAD/lib2x-paths2sections.html) + - [path_scaling_sections](https://openhome.cc/eGossip/OpenSCAD/lib2x-path_scaling_sections.html) + - [bijection_offset](https://openhome.cc/eGossip/OpenSCAD/lib2x-bijection_offset.html) + - [in_polyline](https://openhome.cc/eGossip/OpenSCAD/lib2x-in_polyline.html) + - [in_shape](https://openhome.cc/eGossip/OpenSCAD/lib2x-in_shape.html) + - [midpt_smooth](https://openhome.cc/eGossip/OpenSCAD/lib2x-midpt_smooth.html) + - [trim_shape](https://openhome.cc/eGossip/OpenSCAD/lib2x-trim_shape.html) + - [triangulate](https://openhome.cc/eGossip/OpenSCAD/lib2x-triangulate.html) - Path - - [arc_path](https://openhome.cc/eGossip/OpenSCAD/lib-arc_path.html) - - [circle_path](https://openhome.cc/eGossip/OpenSCAD/lib-circle_path.html) - - [bspline_curve](https://openhome.cc/eGossip/OpenSCAD/lib2-bspline_curve.html) - - [bezier_curve](https://openhome.cc/eGossip/OpenSCAD/lib-bezier_curve.html) - - [bezier_surface](https://openhome.cc/eGossip/OpenSCAD/lib-bezier_surface.html) - - [bezier_smooth](https://openhome.cc/eGossip/OpenSCAD/lib-bezier_smooth.html) - - [helix](https://openhome.cc/eGossip/OpenSCAD/lib-helix.html) - - [golden_spiral](https://openhome.cc/eGossip/OpenSCAD/lib-golden_spiral.html) - - [archimedean_spiral](https://openhome.cc/eGossip/OpenSCAD/lib-archimedean_spiral.html) - - [sphere_spiral](https://openhome.cc/eGossip/OpenSCAD/lib-sphere_spiral.html) - - [torus_knot](https://openhome.cc/eGossip/OpenSCAD/lib-torus_knot.html) + - [arc_path](https://openhome.cc/eGossip/OpenSCAD/lib2x-arc_path.html) + - [circle_path](https://openhome.cc/eGossip/OpenSCAD/lib2x-circle_path.html) + - [bspline_curve](https://openhome.cc/eGossip/OpenSCAD/lib2x-bspline_curve.html) + - [bezier_curve](https://openhome.cc/eGossip/OpenSCAD/lib2x-bezier_curve.html) + - [bezier_surface](https://openhome.cc/eGossip/OpenSCAD/lib2x-bezier_surface.html) + - [bezier_smooth](https://openhome.cc/eGossip/OpenSCAD/lib2x-bezier_smooth.html) + - [helix](https://openhome.cc/eGossip/OpenSCAD/lib2x-helix.html) + - [golden_spiral](https://openhome.cc/eGossip/OpenSCAD/lib2x-golden_spiral.html) + - [archimedean_spiral](https://openhome.cc/eGossip/OpenSCAD/lib2x-archimedean_spiral.html) + - [sphere_spiral](https://openhome.cc/eGossip/OpenSCAD/lib2x-sphere_spiral.html) + - [torus_knot](https://openhome.cc/eGossip/OpenSCAD/lib2x-torus_knot.html) - Extrusion - - [box_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-box_extrude.html) - - [ellipse_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-ellipse_extrude.html) - - [stereographic_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-stereographic_extrude.html) - - [rounded_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-rounded_extrude.html) + - [box_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-box_extrude.html) + - [ellipse_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-ellipse_extrude.html) + - [stereographic_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-stereographic_extrude.html) + - [rounded_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-rounded_extrude.html) - 2D Shape - - [shape_taiwan](https://openhome.cc/eGossip/OpenSCAD/lib-shape_taiwan.html) - - [shape_arc](https://openhome.cc/eGossip/OpenSCAD/lib-shape_arc.html) - - [shape_pie](https://openhome.cc/eGossip/OpenSCAD/lib-shape_pie.html) - - [shape_ellipse](https://openhome.cc/eGossip/OpenSCAD/lib-shape_ellipse.html) - - [shape_square](https://openhome.cc/eGossip/OpenSCAD/lib-shape_square.html) - - [shape_trapezium](https://openhome.cc/eGossip/OpenSCAD/lib-shape_trapezium.html) - - [shape_cyclicpolygon](https://openhome.cc/eGossip/OpenSCAD/lib-shape_cyclicpolygon.html) - - [shape_pentagram](https://openhome.cc/eGossip/OpenSCAD/lib-shape_pentagram.html) - - [shape_starburst](https://openhome.cc/eGossip/OpenSCAD/lib-shape_starburst.html) - - [shape_superformula](https://openhome.cc/eGossip/OpenSCAD/lib-shape_superformula.html) - - [shape_glued2circles](https://openhome.cc/eGossip/OpenSCAD/lib-shape_glued2circles.html) - - [shape_path_extend](https://openhome.cc/eGossip/OpenSCAD/lib-shape_path_extend.html) + - [shape_taiwan](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_taiwan.html) + - [shape_arc](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_arc.html) + - [shape_pie](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_pie.html) + - [shape_ellipse](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_ellipse.html) + - [shape_square](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_square.html) + - [shape_trapezium](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_trapezium.html) + - [shape_cyclicpolygon](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_cyclicpolygon.html) + - [shape_pentagram](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_pentagram.html) + - [shape_starburst](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_starburst.html) + - [shape_superformula](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_superformula.html) + - [shape_glued2circles](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_glued2circles.html) + - [shape_path_extend](https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_path_extend.html) - 2D Shape Extrusion - - [bend_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-bend_extrude.html) - - [path_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-path_extrude.html) - - [ring_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-ring_extrude.html) - - [helix_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-helix_extrude.html) - - [golden_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-golden_spiral_extrude.html) - - [archimedean_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-archimedean_spiral_extrude.html) - - [sphere_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-sphere_spiral_extrude.html) + - [bend_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-bend_extrude.html) + - [path_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-path_extrude.html) + - [ring_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-ring_extrude.html) + - [helix_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-helix_extrude.html) + - [golden_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-golden_spiral_extrude.html) + - [archimedean_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-archimedean_spiral_extrude.html) + - [sphere_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib2x-sphere_spiral_extrude.html) - Utilities - - [util/sub_str](https://openhome.cc/eGossip/OpenSCAD/lib2-sub_str.html) - - [util/split_str](https://openhome.cc/eGossip/OpenSCAD/lib2-split_str.html) - - [util/parse_number](https://openhome.cc/eGossip/OpenSCAD/lib2-parse_number.html) - - [util/reverse](https://openhome.cc/eGossip/OpenSCAD/lib2-reverse.html) - - [util/slice](https://openhome.cc/eGossip/OpenSCAD/lib2-slice.html) - - [util/sort](https://openhome.cc/eGossip/OpenSCAD/lib2-sort.html) - - [util/rand](https://openhome.cc/eGossip/OpenSCAD/lib2-rand.html) - - [util/fibseq](https://openhome.cc/eGossip/OpenSCAD/lib2-fibseq.html) + - [util/sub_str](https://openhome.cc/eGossip/OpenSCAD/lib2x-sub_str.html) + - [util/split_str](https://openhome.cc/eGossip/OpenSCAD/lib2x-split_str.html) + - [util/parse_number](https://openhome.cc/eGossip/OpenSCAD/lib2x-parse_number.html) + - [util/reverse](https://openhome.cc/eGossip/OpenSCAD/lib2x-reverse.html) + - [util/slice](https://openhome.cc/eGossip/OpenSCAD/lib2x-slice.html) + - [util/sort](https://openhome.cc/eGossip/OpenSCAD/lib2x-sort.html) + - [util/rand](https://openhome.cc/eGossip/OpenSCAD/lib2x-rand.html) + - [util/fibseq](https://openhome.cc/eGossip/OpenSCAD/lib2x-fibseq.html) - Matrix - - [matrix/m_cumulate](https://openhome.cc/eGossip/OpenSCAD/lib2-m_cumulate.html) - - [matrix/m_translation](https://openhome.cc/eGossip/OpenSCAD/lib2-m_translation.html) - - [matrix/m_rotation](https://openhome.cc/eGossip/OpenSCAD/lib2-m_rotation.html) - - [matrix/m_scaling](https://openhome.cc/eGossip/OpenSCAD/lib2-m_scaling.html) - - [matrix/m_mirror](https://openhome.cc/eGossip/OpenSCAD/lib2-m_mirror.html) - - [matrix/m_shearing](https://openhome.cc/eGossip/OpenSCAD/lib2-m_shearing.html) + - [matrix/m_cumulate](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_cumulate.html) + - [matrix/m_translation](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_translation.html) + - [matrix/m_rotation](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_rotation.html) + - [matrix/m_scaling](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_scaling.html) + - [matrix/m_mirror](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_mirror.html) + - [matrix/m_shearing](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_shearing.html) - Turtle - - [turtle/turtle2d](https://openhome.cc/eGossip/OpenSCAD/lib2-turtle2d.html) - - [turtle/turtle3d](https://openhome.cc/eGossip/OpenSCAD/lib2-turtle3d.html) - - [turtle/t2d](https://openhome.cc/eGossip/OpenSCAD/lib2-t2d.html) - - [turtle/t3d](https://openhome.cc/eGossip/OpenSCAD/lib2-t3d.html) + - [turtle/turtle2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-turtle2d.html) + - [turtle/turtle3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-turtle3d.html) + - [turtle/t2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-t2d.html) + - [turtle/t3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-t3d.html) - Pixel - - [pixel/px_line](https://openhome.cc/eGossip/OpenSCAD/lib2-px_line.html) - - [pixel/px_polyline](https://openhome.cc/eGossip/OpenSCAD/lib2-px_polyline.html) - - [pixel/px_circle](https://openhome.cc/eGossip/OpenSCAD/lib2-px_circle.html) - - [pixel/px_cylinder](https://openhome.cc/eGossip/OpenSCAD/lib2-px_cylinder.html) - - [pixel/px_sphere](https://openhome.cc/eGossip/OpenSCAD/lib2-px_sphere.html) - - [pixel/px_polygon](https://openhome.cc/eGossip/OpenSCAD/lib2-px_polygon.html) - - [pixel/px_from](https://openhome.cc/eGossip/OpenSCAD/lib2-px_from.html) - - [pixel/px_ascii](https://openhome.cc/eGossip/OpenSCAD/lib2-px_ascii.html) - - [pixel/px_gray](https://openhome.cc/eGossip/OpenSCAD/lib2-px_gray.html) + - [pixel/px_line](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_line.html) + - [pixel/px_polyline](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_polyline.html) + - [pixel/px_circle](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_circle.html) + - [pixel/px_cylinder](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_cylinder.html) + - [pixel/px_sphere](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_sphere.html) + - [pixel/px_polygon](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_polygon.html) + - [pixel/px_from](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_from.html) + - [pixel/px_ascii](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_ascii.html) + - [pixel/px_gray](https://openhome.cc/eGossip/OpenSCAD/lib2x-px_gray.html) - Part - - [part/connector_peg](https://openhome.cc/eGossip/OpenSCAD/lib2-connector_peg.html) - - [part/cone](https://openhome.cc/eGossip/OpenSCAD/lib2-cone.html) + - [part/connector_peg](https://openhome.cc/eGossip/OpenSCAD/lib2x-connector_peg.html) + - [part/cone](https://openhome.cc/eGossip/OpenSCAD/lib2x-cone.html) - [part/joint_T](https://openhome.cc/eGossip/OpenSCAD/lib2-joint_T.html) ## Bugs and Feedback diff --git a/docs/lib-m_mirror.md b/docs/lib-m_mirror.md deleted file mode 100644 index 6280c53f..00000000 --- a/docs/lib-m_mirror.md +++ /dev/null @@ -1,23 +0,0 @@ -# m_mirror - -Generate a 4x4 transformation matrix which can pass into `multmatrix` to mirror the child element on a plane through the origin. - -**Since:** 1.1 - -## Parameters - -- `v` : The normal vector of a plane intersecting the origin through which to mirror the object. - -## Examples - - include ; - - rotate([0, 0, 10]) - cube([3, 2, 1]); - - multmatrix(m_mirror([1, 1, 0])) - rotate([0, 0, 10]) - cube([3, 2, 1]); - -![m_mirror](images/lib-m_mirror-1.JPG) - diff --git a/docs/lib-along_with.md b/docs/lib2x-along_with.md similarity index 89% rename from docs/lib-along_with.md rename to docs/lib2x-along_with.md index 4a280503..02bbe4fb 100644 --- a/docs/lib-along_with.md +++ b/docs/lib2x-along_with.md @@ -12,8 +12,8 @@ Puts children along the given path. If there's only one child, it will put the c ## Examples - include ; - include ; + use ; + use ; $fn = 24; @@ -24,8 +24,8 @@ Puts children along the given path. If there's only one child, it will put the c ![along_with](images/lib-along_with-1.JPG) - include ; - include ; + use ; + use ; $fn = 24; @@ -44,10 +44,8 @@ Puts children along the given path. If there's only one child, it will put the c ![along_with](images/lib-along_with-2.JPG) - include ; - include ; - include ; - include ; + use ; + use ; pts_angles = golden_spiral( from = 5, @@ -65,8 +63,8 @@ Puts children along the given path. If there's only one child, it will put the c ![along_with](images/lib-along_with-3.JPG) - include ; - include ; + use ; + use ; module scales() { module one_scale() { diff --git a/docs/lib-arc.md b/docs/lib2x-arc.md similarity index 94% rename from docs/lib-arc.md rename to docs/lib2x-arc.md index 6e3611dd..a8974355 100644 --- a/docs/lib-arc.md +++ b/docs/lib2x-arc.md @@ -13,7 +13,7 @@ Creates an arc. You can pass a 2 element vector to define the central angle. Its ## Examples - include ; + use ; $fn = 24; arc(radius = 20, angle = [45, 290], width = 2); @@ -21,7 +21,7 @@ Creates an arc. You can pass a 2 element vector to define the central angle. Its ![arc](images/lib-arc-1.JPG) - include ; + use ; $fn = 24; arc(radius = 20, angle = [45, 290], width = 2, width_mode = "LINE_OUTWARD"); @@ -29,7 +29,7 @@ Creates an arc. You can pass a 2 element vector to define the central angle. Its ![arc](images/lib-arc-2.JPG) - include ; + use ; $fn = 24; arc(radius = 20, angle = [45, 290], width = 2, width_mode = "LINE_INWARD"); diff --git a/docs/lib-arc_path.md b/docs/lib2x-arc_path.md similarity index 87% rename from docs/lib-arc_path.md rename to docs/lib2x-arc_path.md index d4828440..38f81bb6 100644 --- a/docs/lib-arc_path.md +++ b/docs/lib2x-arc_path.md @@ -11,8 +11,8 @@ Creates an arc path. You can pass a 2 element vector to define the central angle ## Examples - include ; - include ; + use ; + use ; $fn = 24; points = arc_path(radius = 20, angle = [45, 290]); @@ -20,8 +20,8 @@ Creates an arc path. You can pass a 2 element vector to define the central angle ![arc_path](images/lib-arc_path-1.JPG) - include ; - include ; + use ; + use ; $fn = 24; points = arc_path(radius = 20, angle = 135); diff --git a/docs/lib-archimedean_spiral.md b/docs/lib2x-archimedean_spiral.md similarity index 94% rename from docs/lib-archimedean_spiral.md rename to docs/lib2x-archimedean_spiral.md index f35010ab..bcc1c0e0 100644 --- a/docs/lib-archimedean_spiral.md +++ b/docs/lib2x-archimedean_spiral.md @@ -16,9 +16,8 @@ An `init_angle` less than 180 degrees is not recommended because the function us ## Examples - include ; - include ; - include ; + use ; + use ; points_angles = archimedean_spiral( arm_distance = 10, @@ -31,10 +30,9 @@ An `init_angle` less than 180 degrees is not recommended because the function us polyline2d(points, width = 1); - ![archimedean_spiral](images/lib-archimedean_spiral-1.JPG) - include ; + use ; points_angles = archimedean_spiral( arm_distance = 10, diff --git a/docs/lib-archimedean_spiral_extrude.md b/docs/lib2x-archimedean_spiral_extrude.md similarity index 79% rename from docs/lib-archimedean_spiral_extrude.md rename to docs/lib2x-archimedean_spiral_extrude.md index 6929701d..126cee41 100644 --- a/docs/lib-archimedean_spiral_extrude.md +++ b/docs/lib2x-archimedean_spiral_extrude.md @@ -2,23 +2,19 @@ Extrudes a 2D shape along the path of an archimedean spiral. -When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details. +When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib2x-polysections.html) for details. ## Parameters - `shape_pts` : A list of points represent a shape. See the example below. -- `arm_distance`, `init_angle`, `point_distance`, `num_of_points` and `rt_dir` : See [archimedean_spiral](https://openhome.cc/eGossip/OpenSCAD/lib-archimedean_spiral.html) for details. +- `arm_distance`, `init_angle`, `point_distance`, `num_of_points` and `rt_dir` : See [archimedean_spiral](https://openhome.cc/eGossip/OpenSCAD/lib2x-archimedean_spiral.html) for details. - `twist` : The number of degrees of through which the shape is extruded. - `scale` : Scales the 2D shape by this value over the length of the extrusion. Scale can be a scalar or a vector. -- `triangles` : `"SOLID"` (default), `"HOLLOW"` or user-defined indexes. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details. +- `triangles` : `"SOLID"` (default), `"HOLLOW"` or user-defined indexes. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib2x-polysections.html) for details. ## Examples - include ; - include ; - include ; - include ; - include ; + use ; shape_pts = [ [5, 0], diff --git a/docs/lib-bend.md b/docs/lib2x-bend.md similarity index 94% rename from docs/lib-bend.md rename to docs/lib2x-bend.md index ff3da086..e6fd5401 100644 --- a/docs/lib-bend.md +++ b/docs/lib2x-bend.md @@ -12,7 +12,7 @@ Bends a 3D object into an arc shape. The containing cube of the target object should be laid down on the x-y plane. For example. - include ; + use ; x = 9.25; y = 9.55; @@ -25,7 +25,7 @@ The containing cube of the target object should be laid down on the x-y plane. F Once you have the size of the containing cube, you can use it as the `size` argument of the `bend` module. - include ; + use ; x = 9.25; y = 9.55; @@ -40,7 +40,7 @@ Once you have the size of the containing cube, you can use it as the `size` argu The arc shape is smoother if the `frags` value is larger. - include ; + use ; x = 9.25; y = 9.55; diff --git a/docs/lib-bend_extrude.md b/docs/lib2x-bend_extrude.md similarity index 97% rename from docs/lib-bend_extrude.md rename to docs/lib2x-bend_extrude.md index c7b9b485..34b89af4 100644 --- a/docs/lib-bend_extrude.md +++ b/docs/lib2x-bend_extrude.md @@ -25,7 +25,7 @@ The containing square of the target shape should be laid down on the x-y plane. Once you have the size of the containing square, you can use it as the `size` argument of the `bend_extrude` module. - include ; + use ; x = 9.25; y = 9.55; diff --git a/docs/lib-bezier_curve.md b/docs/lib2x-bezier_curve.md similarity index 91% rename from docs/lib-bezier_curve.md rename to docs/lib2x-bezier_curve.md index 338d724f..106fa2ad 100644 --- a/docs/lib-bezier_curve.md +++ b/docs/lib2x-bezier_curve.md @@ -11,8 +11,8 @@ Given a set of control points, the `bezier_curve` function returns points of the If you have four control points and combine with the `hull_polyline3d` module: - include ; - include ; + use ; + use ; t_step = 0.05; width = 2; diff --git a/docs/lib-bezier_smooth.md b/docs/lib2x-bezier_smooth.md similarity index 87% rename from docs/lib-bezier_smooth.md rename to docs/lib2x-bezier_smooth.md index 99daef6c..b40158cb 100644 --- a/docs/lib-bezier_smooth.md +++ b/docs/lib2x-bezier_smooth.md @@ -11,9 +11,8 @@ Given a path, the `bezier_smooth` function uses bazier curves to smooth all corn ## Examples - include ; - include ; - include ; + use ; + use ; width = 2; round_d = 15; @@ -37,8 +36,7 @@ Given a path, the `bezier_smooth` function uses bazier curves to smooth all corn ![bezier_smooth](images/lib-bezier_smooth-1.JPG) - include ; - include ; + use ; round_d = 10; diff --git a/docs/lib-bezier_surface.md b/docs/lib2x-bezier_surface.md similarity index 91% rename from docs/lib-bezier_surface.md rename to docs/lib2x-bezier_surface.md index ad969885..11f4084f 100644 --- a/docs/lib-bezier_surface.md +++ b/docs/lib2x-bezier_surface.md @@ -11,9 +11,8 @@ Given a set of control points, the `bezier_surface` function returns points of t If you have 16 control points and combine with the `function_grapher` module: - include ; - include ; - include ; + use ; + use ; t_step = 0.05; thickness = 0.5; diff --git a/docs/lib-bijection_offset.md b/docs/lib2x-bijection_offset.md similarity index 89% rename from docs/lib-bijection_offset.md rename to docs/lib2x-bijection_offset.md index 51fec586..dd69d0c6 100644 --- a/docs/lib-bijection_offset.md +++ b/docs/lib2x-bijection_offset.md @@ -12,7 +12,7 @@ Move 2D outlines outward or inward by a given amount. Each point of the offsette ## Examples - include ; + use ; shape = [ [15, 0], @@ -32,11 +32,9 @@ Move 2D outlines outward or inward by a given amount. Each point of the offsette ![bijection_offset](images/lib-bijection_offset-1.JPG) - include ; - include ; - include ; - include ; - include ; + use ; + use ; + use ; shape = [ [5, 0], diff --git a/docs/lib-box_extrude.md b/docs/lib2x-box_extrude.md similarity index 92% rename from docs/lib-box_extrude.md rename to docs/lib2x-box_extrude.md index 6241b2ea..cbd44f02 100644 --- a/docs/lib-box_extrude.md +++ b/docs/lib2x-box_extrude.md @@ -12,14 +12,14 @@ Creates a box (container) from a 2D object. ## Examples - include ; + use ; box_extrude(height = 30, shell_thickness = 2) circle(r = 30); ![box_extrude](images/lib-box_extrude-1.JPG) - include ; + use ; box_extrude(height = 30, shell_thickness = 2) text("XD", size = 40, font = "Cooper Black"); diff --git a/docs/lib2-bspline_curve.md b/docs/lib2x-bspline_curve.md similarity index 95% rename from docs/lib2-bspline_curve.md rename to docs/lib2x-bspline_curve.md index 9333ba76..dc3116f3 100644 --- a/docs/lib2-bspline_curve.md +++ b/docs/lib2x-bspline_curve.md @@ -14,7 +14,7 @@ ## Examples - include ; + use ; points = [ [-10, 0], @@ -37,7 +37,7 @@ ![bspline_curve](images/lib2-bspline_curve-1.JPG) - include ; + use ; points = [ [-10, 0], @@ -61,7 +61,7 @@ ![bspline_curve](images/lib2-bspline_curve-2.JPG) - include ; + use ; points = [ [-10, 0], diff --git a/docs/lib-circle_path.md b/docs/lib2x-circle_path.md similarity index 96% rename from docs/lib-circle_path.md rename to docs/lib2x-circle_path.md index d435aa21..677503f7 100644 --- a/docs/lib-circle_path.md +++ b/docs/lib2x-circle_path.md @@ -10,7 +10,7 @@ Sometimes you need all points on the path of a circle. Here's the function. Its ## Examples - include ; + use ; $fn = 24; diff --git a/docs/lib2-cone.md b/docs/lib2x-cone.md similarity index 95% rename from docs/lib2-cone.md rename to docs/lib2x-cone.md index 1ebd3a94..a009498d 100644 --- a/docs/lib2-cone.md +++ b/docs/lib2x-cone.md @@ -18,7 +18,7 @@ Create a cone for rotatable models. ## Examples - include ; + use ; radius = 2.5; length = 2; @@ -41,7 +41,7 @@ Create a cone for rotatable models. ![cone](images/lib2-cone-2.JPG) - include ; + use ; radius = 2.5; length = 2; diff --git a/docs/lib2-connector_peg.md b/docs/lib2x-connector_peg.md similarity index 93% rename from docs/lib2-connector_peg.md rename to docs/lib2x-connector_peg.md index 21499958..88337d9b 100644 --- a/docs/lib2-connector_peg.md +++ b/docs/lib2x-connector_peg.md @@ -17,7 +17,7 @@ Create a connector peg. ## Examples - include ; + use ; radius = 2.5; spacing = 0.5; @@ -37,7 +37,7 @@ Create a connector peg. ![connector_peg](images/lib2-connector_peg-1.JPG) - include ; + use ; radius = 2.5; spacing = 0.5; diff --git a/docs/lib-cross_sections.md b/docs/lib2x-cross_sections.md similarity index 89% rename from docs/lib-cross_sections.md rename to docs/lib2x-cross_sections.md index c52d6266..fbc6e84e 100644 --- a/docs/lib-cross_sections.md +++ b/docs/lib2x-cross_sections.md @@ -12,10 +12,9 @@ Given a 2D shape, points and angles along the path, this function will return al ## Examples - include ; - include ; - include ; - include ; + use ; + use ; + use ; shape_pts = [ [-2, -10], diff --git a/docs/lib-crystal_ball.md b/docs/lib2x-crystal_ball.md similarity index 90% rename from docs/lib-crystal_ball.md rename to docs/lib2x-crystal_ball.md index c9b3f4fe..7bf97fc9 100644 --- a/docs/lib-crystal_ball.md +++ b/docs/lib2x-crystal_ball.md @@ -14,11 +14,7 @@ Uses spherical coordinate system to create a crystal ball. ## Examples - include ; - include ; - include ; - include ; - include ; + use ; crystal_ball(radius = 6); diff --git a/docs/lib-ellipse_extrude.md b/docs/lib2x-ellipse_extrude.md similarity index 91% rename from docs/lib-ellipse_extrude.md rename to docs/lib2x-ellipse_extrude.md index b2f1e66e..ad19371a 100644 --- a/docs/lib-ellipse_extrude.md +++ b/docs/lib2x-ellipse_extrude.md @@ -10,7 +10,7 @@ Extrudes a 2D object along the path of an ellipse from 0 to 180 degrees. The sem ## Examples - include ; + use ; semi_minor_axis = 5; @@ -19,7 +19,7 @@ Extrudes a 2D object along the path of an ellipse from 0 to 180 degrees. The sem ![ellipse_extrude](images/lib-ellipse_extrude-1.JPG) - include ; + use ; semi_minor_axis = 5; @@ -28,7 +28,7 @@ Extrudes a 2D object along the path of an ellipse from 0 to 180 degrees. The sem ![ellipse_extrude](images/lib-ellipse_extrude-2.JPG) - include ; + use ; semi_minor_axis = 5; @@ -39,7 +39,7 @@ Extrudes a 2D object along the path of an ellipse from 0 to 180 degrees. The sem ![ellipse_extrude](images/lib-ellipse_extrude-3.JPG) - include ; + use ; semi_minor_axis = 10; diff --git a/docs/lib2-fibseq.md b/docs/lib2x-fibseq.md similarity index 90% rename from docs/lib2-fibseq.md rename to docs/lib2x-fibseq.md index 866a3e3a..63ef6b6e 100644 --- a/docs/lib2-fibseq.md +++ b/docs/lib2x-fibseq.md @@ -11,6 +11,6 @@ Generate a Fibonacci sequence. ## Examples - include ; + use ; echo(fibseq(1, 10)); // ECHO: [1, 1, 2, 3, 5, 8, 13, 21, 34, 55] diff --git a/docs/lib-function_grapher.md b/docs/lib2x-function_grapher.md similarity index 87% rename from docs/lib-function_grapher.md rename to docs/lib2x-function_grapher.md index ec8e8180..e29ebe6d 100644 --- a/docs/lib-function_grapher.md +++ b/docs/lib2x-function_grapher.md @@ -12,10 +12,7 @@ Given a set of points `[x, y, f(x, y)]` where `f(x, y)` is a mathematics functio ## Examples - include ; - include ; - include ; - include ; + use ; points = [ [[0, 0, 1], [1, 0, 2], [2, 0, 2], [3, 0, 3]], @@ -30,10 +27,7 @@ Given a set of points `[x, y, f(x, y)]` where `f(x, y)` is a mathematics functio ![function_grapher](images/lib-function_grapher-1.JPG) - include ; - include ; - include ; - include ; + use ; function f(x, y) = 30 * ( @@ -58,10 +52,7 @@ Given a set of points `[x, y, f(x, y)]` where `f(x, y)` is a mathematics functio ![function_grapher](images/lib-function_grapher-2.JPG) - include ; - include ; - include ; - include ; + use ; function f(x, y) = 30 * ( @@ -87,10 +78,7 @@ Given a set of points `[x, y, f(x, y)]` where `f(x, y)` is a mathematics functio ![function_grapher](images/lib-function_grapher-3.JPG) - include ; - include ; - include ; - include ; + use ; function f(x, y) = 30 * ( diff --git a/docs/lib-golden_spiral.md b/docs/lib2x-golden_spiral.md similarity index 86% rename from docs/lib-golden_spiral.md rename to docs/lib2x-golden_spiral.md index fbc22fae..9afefe65 100644 --- a/docs/lib-golden_spiral.md +++ b/docs/lib2x-golden_spiral.md @@ -13,9 +13,7 @@ It returns a vector of `[[x, y], angle]`. ## Examples - include ; - include ; - include ; + use ; pts_angles = golden_spiral( from = 3, @@ -30,9 +28,7 @@ It returns a vector of `[[x, y], angle]`. ![golden_spiral](images/lib-golden_spiral-1.JPG) - include ; - include ; - include ; + use ; pts_angles = golden_spiral( from = 5, diff --git a/docs/lib-golden_spiral_extrude.md b/docs/lib2x-golden_spiral_extrude.md similarity index 77% rename from docs/lib-golden_spiral_extrude.md rename to docs/lib2x-golden_spiral_extrude.md index b5c6b100..a4c6968d 100644 --- a/docs/lib-golden_spiral_extrude.md +++ b/docs/lib2x-golden_spiral_extrude.md @@ -2,7 +2,7 @@ Extrudes a 2D shape along the path of a golden spiral. -When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details. +When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib2x-polysections.html) for details. ## Parameters @@ -13,16 +13,11 @@ When using this module, you should use points to represent the 2D shape. If your - `rt_dir` : `"CT_CLK"` for counterclockwise. `"CLK"` for clockwise. The default value is `"CT_CLK"`. - `twist` : The number of degrees of through which the shape is extruded. - `scale` : Scales the 2D shape by this value over the length of the extrusion. Scale can be a scalar or a vector. -- `triangles` : `"SOLID"` (default), `"HOLLOW"` or user-defined indexes. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details. +- `triangles` : `"SOLID"` (default), `"HOLLOW"` or user-defined indexes. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib2x-polysections.html) for details. ## Examples - include ; - include ; - include ; - include ; - include ; - include ; + use ; shape_pts = [ [2, -10], @@ -43,12 +38,8 @@ When using this module, you should use points to represent the 2D shape. If your ![golden_spiral_extrude](images/lib-golden_spiral_extrude-1.JPG) - include ; - include ; - include ; - include ; - include ; - include ; + use ; + use ; $fn = 12; diff --git a/docs/lib-helix.md b/docs/lib2x-helix.md similarity index 92% rename from docs/lib-helix.md rename to docs/lib2x-helix.md index 01328d5d..aba2ddbd 100644 --- a/docs/lib-helix.md +++ b/docs/lib2x-helix.md @@ -13,8 +13,8 @@ Gets all points on the path of a spiral around a cylinder. Its `$fa`, `$fs` and ## Examples - include ; - include ; + use ; + use ; $fn = 12; @@ -34,8 +34,8 @@ Gets all points on the path of a spiral around a cylinder. Its `$fa`, `$fs` and ![helix](images/lib-helix-1.JPG) - include ; - include ; + use ; + use ; $fn = 12; diff --git a/docs/lib-helix_extrude.md b/docs/lib2x-helix_extrude.md similarity index 85% rename from docs/lib-helix_extrude.md rename to docs/lib2x-helix_extrude.md index 3951a134..28eecbd6 100644 --- a/docs/lib-helix_extrude.md +++ b/docs/lib2x-helix_extrude.md @@ -2,7 +2,7 @@ Extrudes a 2D shape along a helix path. -When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details. +When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib2x-polysections.html) for details. Its `$fa`, `$fs` and `$fn` parameters are consistent with the `cylinder` module. @@ -16,16 +16,12 @@ Its `$fa`, `$fs` and `$fn` parameters are consistent with the `cylinder` module. - `rt_dir` : `"CT_CLK"` for counterclockwise. `"CLK"` for clockwise. The default value is `"CT_CLK"`. - `twist` : The number of degrees of through which the shape is extruded. - `scale` : Scales the 2D shape by this value over the length of the extrusion. Scale can be a scalar or a vector. -- `triangles` : `"SOLID"` (default), `"HOLLOW"` or user-defined indexes. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details. +- `triangles` : `"SOLID"` (default), `"HOLLOW"` or user-defined indexes. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib2x-polysections.html) for details. - `$fa`, `$fs`, `$fn` : Check [the cylinder module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cylinder) for more details. ## Examples - include ; - include ; - include ; - include ; - include ; + use ; shape_pts = [ [5, -2], @@ -47,11 +43,7 @@ Its `$fa`, `$fs` and `$fn` parameters are consistent with the `cylinder` module. ![helix_extrude](images/lib-helix_extrude-1.JPG) - include ; - include ; - include ; - include ; - include ; + use ; r1 = 40; r2 = 20; diff --git a/docs/lib-hexagons.md b/docs/lib2x-hexagons.md similarity index 91% rename from docs/lib-hexagons.md rename to docs/lib2x-hexagons.md index a0d57ac6..5198f2a1 100644 --- a/docs/lib-hexagons.md +++ b/docs/lib2x-hexagons.md @@ -10,7 +10,7 @@ A hexagonal structure is useful in many situations. This module creates hexagons ## Examples - include ; + use ; radius = 20; spacing = 2; @@ -20,7 +20,7 @@ A hexagonal structure is useful in many situations. This module creates hexagons ![hexagons](images/lib-hexagons-1.JPG) - include ; + use ; radius = 20; spacing = 2; diff --git a/docs/lib-hollow_out.md b/docs/lib2x-hollow_out.md similarity index 90% rename from docs/lib-hollow_out.md rename to docs/lib2x-hollow_out.md index 5c55c55c..d8388156 100644 --- a/docs/lib-hollow_out.md +++ b/docs/lib2x-hollow_out.md @@ -8,7 +8,7 @@ Hollows out a 2D object. ## Examples - include ; + use ; hollow_out(shell_thickness = 1) circle(r = 3, $fn = 48); hollow_out(shell_thickness = 1) square([10, 5]); diff --git a/docs/lib-hull_polyline2d.md b/docs/lib2x-hull_polyline2d.md similarity index 95% rename from docs/lib-hull_polyline2d.md rename to docs/lib2x-hull_polyline2d.md index 2c2bdea7..713126ed 100644 --- a/docs/lib-hull_polyline2d.md +++ b/docs/lib2x-hull_polyline2d.md @@ -10,7 +10,7 @@ Creates a 2D polyline from a list of `[x, y]` coordinates. As the name says, it ## Examples - include ; + use ; $fn = 4; diff --git a/docs/lib-hull_polyline3d.md b/docs/lib2x-hull_polyline3d.md similarity index 94% rename from docs/lib-hull_polyline3d.md rename to docs/lib2x-hull_polyline3d.md index 43b0c537..53d79e73 100644 --- a/docs/lib-hull_polyline3d.md +++ b/docs/lib2x-hull_polyline3d.md @@ -10,7 +10,7 @@ Creates a 3D polyline from a list of `[x, y, z]` coordinates. As the name says, ## Examples - include ; + use ; hull_polyline3d( points = [ @@ -25,7 +25,7 @@ Creates a 3D polyline from a list of `[x, y, z]` coordinates. As the name says, ![polyline3d](images/lib-hull_polyline3d-1.JPG) - include ; + use ; r = 50; points = [ diff --git a/docs/lib-in_polyline.md b/docs/lib2x-in_polyline.md similarity index 92% rename from docs/lib-in_polyline.md rename to docs/lib2x-in_polyline.md index cb0d6869..4a200ae6 100644 --- a/docs/lib-in_polyline.md +++ b/docs/lib2x-in_polyline.md @@ -12,7 +12,7 @@ Checks wether a point is on a line. ## Examples - include ; + use ; pts = [ [0, 0], @@ -27,7 +27,7 @@ Checks wether a point is on a line. ---- - include ; + use ; pts = [ [10, 0, 10], diff --git a/docs/lib-in_shape.md b/docs/lib2x-in_shape.md similarity index 93% rename from docs/lib-in_shape.md rename to docs/lib2x-in_shape.md index 24e68624..00e25517 100644 --- a/docs/lib-in_shape.md +++ b/docs/lib2x-in_shape.md @@ -13,8 +13,8 @@ Checks wether a point is inside a shape. ## Examples - include ; - include ; + use ; + use ; points = shape_taiwan(30); diff --git a/docs/lib2-joint_T.md b/docs/lib2x-joint_T.md similarity index 95% rename from docs/lib2-joint_T.md rename to docs/lib2x-joint_T.md index 683d76a9..7a1a0dc4 100644 --- a/docs/lib2-joint_T.md +++ b/docs/lib2x-joint_T.md @@ -17,7 +17,7 @@ Create a joint_T for rotatable models. ## Examples - include ; + use ; $fn = 48; diff --git a/docs/lib-line2d.md b/docs/lib2x-line2d.md similarity index 97% rename from docs/lib-line2d.md rename to docs/lib2x-line2d.md index 99206c38..5c80dd39 100644 --- a/docs/lib-line2d.md +++ b/docs/lib2x-line2d.md @@ -13,7 +13,7 @@ Creates a line from two points. When the end points are `CAP_ROUND`, you can use ## Examples - include ; + use ; $fn = 24; diff --git a/docs/lib-line3d.md b/docs/lib2x-line3d.md similarity index 94% rename from docs/lib-line3d.md rename to docs/lib2x-line3d.md index 16a4ea16..06917bef 100644 --- a/docs/lib-line3d.md +++ b/docs/lib2x-line3d.md @@ -13,7 +13,7 @@ Creates a 3D line from two points. ## Examples - include ; + use ; line3d( p1 = [0, 0, 0], @@ -24,7 +24,7 @@ Creates a 3D line from two points. ![line3d](images/lib-line3d-1.JPG) - include ; + use ; line3d( p1 = [0, 0, 0], @@ -37,7 +37,7 @@ Creates a 3D line from two points. ![line3d](images/lib-line3d-2.JPG) - include ; + use ; line3d( p1 = [0, 0, 0], diff --git a/docs/lib2-m_cumulate.md b/docs/lib2x-m_cumulate.md similarity index 77% rename from docs/lib2-m_cumulate.md rename to docs/lib2x-m_cumulate.md index 207cd103..7f540cc2 100644 --- a/docs/lib2-m_cumulate.md +++ b/docs/lib2x-m_cumulate.md @@ -12,10 +12,10 @@ The dir changed since 2.0. ## Examples - include ; - include ; - include ; - include + use ; + use ; + use ; + use m = m_cumulate([ m_translation([10, 20, 10]), m_scaling(2), m_rotation(60)] diff --git a/docs/lib2-m_mirror.md b/docs/lib2x-m_mirror.md similarity index 93% rename from docs/lib2-m_mirror.md rename to docs/lib2x-m_mirror.md index 744649c0..70f12ce1 100644 --- a/docs/lib2-m_mirror.md +++ b/docs/lib2x-m_mirror.md @@ -12,7 +12,7 @@ Generate a 4x4 transformation matrix which can pass into `multmatrix` to mirror ## Examples - include ; + use ; rotate([0, 0, 10]) cube([3, 2, 1]); diff --git a/docs/lib2-m_rotation.md b/docs/lib2x-m_rotation.md similarity index 94% rename from docs/lib2-m_rotation.md rename to docs/lib2x-m_rotation.md index b546dd98..8fd49ecf 100644 --- a/docs/lib2-m_rotation.md +++ b/docs/lib2x-m_rotation.md @@ -13,7 +13,7 @@ Generate a 4x4 transformation matrix which can pass into `multmatrix` to rotate ## Examples - include ; + use ; point = [20, 0, 0]; a = [0, -45, 45]; @@ -27,7 +27,7 @@ Generate a 4x4 transformation matrix which can pass into `multmatrix` to rotate ![m_rotation](images/lib-m_rotation-1.JPG) - include ; + use ; v = [10, 10, 10]; diff --git a/docs/lib2-m_scaling.md b/docs/lib2x-m_scaling.md similarity index 92% rename from docs/lib2-m_scaling.md rename to docs/lib2x-m_scaling.md index f4c13ce3..22ae35b6 100644 --- a/docs/lib2-m_scaling.md +++ b/docs/lib2x-m_scaling.md @@ -12,7 +12,7 @@ Generate a 4x4 transformation matrix which can pass into `multmatrix` to scale i ## Examples - include ; + use ; cube(10); translate([15, 0, 0]) diff --git a/docs/lib2-m_shearing.md b/docs/lib2x-m_shearing.md similarity index 97% rename from docs/lib2-m_shearing.md rename to docs/lib2x-m_shearing.md index de7e07d2..cce544f1 100644 --- a/docs/lib2-m_shearing.md +++ b/docs/lib2x-m_shearing.md @@ -14,7 +14,7 @@ Generate a 4x4 transformation matrix which can pass into `multmatrix` to shear a ## Examples - include ; + use ; color("red") { multmatrix(m_shearing(sx = [1, 0])) diff --git a/docs/lib2-m_translation.md b/docs/lib2x-m_translation.md similarity index 91% rename from docs/lib2-m_translation.md rename to docs/lib2x-m_translation.md index 9efd52f0..ab72d2ee 100644 --- a/docs/lib2-m_translation.md +++ b/docs/lib2x-m_translation.md @@ -12,7 +12,7 @@ Generate a 4x4 transformation matrix which can pass into `multmatrix` to transla ## Examples - include ; + use ; cube(2, center = true); multmatrix(m_translation([5, 0, 0])) diff --git a/docs/lib-midpt_smooth.md b/docs/lib2x-midpt_smooth.md similarity index 82% rename from docs/lib-midpt_smooth.md rename to docs/lib2x-midpt_smooth.md index 862cff89..1022f8b8 100644 --- a/docs/lib-midpt_smooth.md +++ b/docs/lib2x-midpt_smooth.md @@ -12,10 +12,9 @@ Given a 2D path, this function constructs a mid-point smoothed version by joinin ## Examples - include ; - include ; - include ; - include ; + use ; + use ; + use ; taiwan = shape_taiwan(50); smoothed = midpt_smooth(taiwan, 20, true); diff --git a/docs/lib-multi_line_text.md b/docs/lib2x-multi_line_text.md similarity index 93% rename from docs/lib-multi_line_text.md rename to docs/lib2x-multi_line_text.md index cc4939cd..1edfb7a7 100644 --- a/docs/lib-multi_line_text.md +++ b/docs/lib2x-multi_line_text.md @@ -9,7 +9,7 @@ Creates multi-line text from a list of strings. Parameters are the same as the b ## Examples - include ; + use ; multi_line_text( ["Welcome", "to", "Taiwan"], diff --git a/docs/lib2-parse_number.md b/docs/lib2x-parse_number.md similarity index 73% rename from docs/lib2-parse_number.md rename to docs/lib2x-parse_number.md index 95a0c861..3b7aaaf5 100644 --- a/docs/lib2-parse_number.md +++ b/docs/lib2x-parse_number.md @@ -10,9 +10,7 @@ Parses the string argument as an number. ## Examples - include ; - include ; - include ; + use ; echo(parse_number("10") + 1); // ECHO: 11 echo(parse_number("-1.1") + 1); // ECHO: -0.1 diff --git a/docs/lib-path_extrude.md b/docs/lib2x-path_extrude.md similarity index 86% rename from docs/lib-path_extrude.md rename to docs/lib2x-path_extrude.md index c8425f9f..6f934a11 100644 --- a/docs/lib-path_extrude.md +++ b/docs/lib2x-path_extrude.md @@ -2,7 +2,7 @@ It extrudes a 2D shape along a path. This module is suitable for a path created by a continuous function. -When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details. +When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib2x-polysections.html) for details. ## Parameters @@ -16,10 +16,8 @@ When using this module, you should use points to represent the 2D shape. If your ## Examples - include ; - include ; - include ; - include ; + use ; + use ; t_step = 0.05; width = 2; @@ -45,10 +43,8 @@ When using this module, you should use points to represent the 2D shape. If your ![path_extrude](images/lib-path_extrude-1.JPG) - include ; - include ; - include ; - include ; + use ; + use ; t_step = 0.05; @@ -79,10 +75,8 @@ When using this module, you should use points to represent the 2D shape. If your ![path_extrude](images/lib-path_extrude-2.JPG) - include ; - include ; - include ; - include ; + use ; + use ; t_step = 0.05; @@ -128,11 +122,7 @@ When using this module, you should use points to represent the 2D shape. If your If you want to extrude a shape along a path precisely, providing enough information about how to rotate sections is necessary. If you want to extrude a shape along a helix, `helix_extrude` is more suitable because it knows how to dig out necessary data for rotating sections precisely. - include ; - include ; - include ; - include ; - include ; + use ; shape_pts = [ [0,0], @@ -151,11 +141,8 @@ If you want to extrude a shape along a path precisely, providing enough informat If you have only points, what `path_extrude` can do is to **guess** data about rotations. The different algorithm will dig out different data. For example: - include ; - include ; - include ; - include ; - include ; + use ; + use ; shape_pts = [ [0,0], @@ -178,10 +165,8 @@ You might think this is wrong. Actually, it's not. It's the correct/default beha The `method` parameter is default to `"AXIS_ANGLE"`, a way to guess information from points. It accepts `"EULER_ANGLE"`, too. - include ; - include ; - include ; - include ; + use ; + use ; shape_pts = [ [0,0], @@ -204,9 +189,7 @@ You might think this is wrong. Actually, it's not. It's the correct/default beha `"EULER_ANGLE"` will generate an abrupt when the path is exactly vertical. [The problem happened in (older) Blender, too.](https://download.blender.org/documentation/htmlI/ch09s04.html) - include ; - include ; - include ; + use ; shape_pts = [[5, -5], [5, 5], [-5, 5], [-5, -5]]; @@ -230,9 +213,7 @@ You might think this is wrong. Actually, it's not. It's the correct/default beha The problem doesn't happen when `method` is `"AXIS_ANGLE"`. - include ; - include ; - include ; + use ; shape_pts = [[5, -5], [5, 5], [-5, 5], [-5, -5]]; @@ -260,11 +241,9 @@ So, which is the correct method? Both methods are correct when you provide only `"EULER_ANGLE"`, however, generates the same section at the same point. This means that you don't have to adjust sections if you want to extrude along a closed path. It's an advantage when extruding. For example: - include ; - include ; - include ; - include ; - include ; + use ; + use ; + use ; p = 2; q = 3; diff --git a/docs/lib2-path_scaling_sections.md b/docs/lib2x-path_scaling_sections.md similarity index 81% rename from docs/lib2-path_scaling_sections.md rename to docs/lib2x-path_scaling_sections.md index ce393a37..3f462ee5 100644 --- a/docs/lib2-path_scaling_sections.md +++ b/docs/lib2x-path_scaling_sections.md @@ -15,10 +15,10 @@ You can use any point as the first point of the edge path. Just remember that yo ## Examples - include ; - include ; - include ; - include ; + use ; + use ; + use ; + use ; taiwan = shape_taiwan(100); fst_pt = [13, 0, 0]; @@ -38,11 +38,11 @@ You can use any point as the first point of the edge path. Just remember that yo ![path_scaling_sections](images/lib-path_scaling_sections-1.JPG) - include ; - include ; - include ; - include ; - include ; + use ; + use ; + use ; + use ; + use ; taiwan = shape_taiwan(100); @@ -63,11 +63,11 @@ You can use any point as the first point of the edge path. Just remember that yo ![path_scaling_sections](images/lib-path_scaling_sections-2.JPG) - include ; - include ; - include ; - include ; - include ; + use ; + use ; + use ; + use ; + use ; taiwan = shape_taiwan(100); fst_pt = [13, 0, 0]; @@ -99,11 +99,11 @@ You can use any point as the first point of the edge path. Just remember that yo ![path_scaling_sections](images/lib-path_scaling_sections-3.JPG) - include ; - include ; - include ; - include ; - include ; + use ; + use ; + use ; + use ; + use ; taiwan = shape_taiwan(100); diff --git a/docs/lib-paths2sections.md b/docs/lib2x-paths2sections.md similarity index 86% rename from docs/lib-paths2sections.md rename to docs/lib2x-paths2sections.md index 91f8794c..a294026d 100644 --- a/docs/lib-paths2sections.md +++ b/docs/lib2x-paths2sections.md @@ -10,9 +10,9 @@ You paths should be indexed count-clockwisely. ## Examples - include ; - include ; - include ; + use ; + use ; + use ; paths = [ [[5, 0, 5], [15, 10, 10], [25, 20, 5]], @@ -31,10 +31,10 @@ You paths should be indexed count-clockwisely. ![paths2sections](images/lib-paths2sections-1.JPG) - include ; - include ; - include ; - include ; + use ; + use ; + use ; + use ; t_step = 0.05; diff --git a/docs/lib-pie.md b/docs/lib2x-pie.md similarity index 97% rename from docs/lib-pie.md rename to docs/lib2x-pie.md index ed15cfc5..159ef12e 100644 --- a/docs/lib-pie.md +++ b/docs/lib2x-pie.md @@ -10,7 +10,7 @@ Creates a pie (circular sector). You can pass a 2 element vector to define the c ## Examples - include ; + use ; pie(radius = 20, angle = [210, 310]); translate([-15, 0, 0]) pie(radius = 20, angle = [45, 135]); diff --git a/docs/lib-polyline2d.md b/docs/lib2x-polyline2d.md similarity index 89% rename from docs/lib-polyline2d.md rename to docs/lib2x-polyline2d.md index b7674673..aaabb0ff 100644 --- a/docs/lib-polyline2d.md +++ b/docs/lib2x-polyline2d.md @@ -12,16 +12,14 @@ Creates a polyline from a list of `x`, `y` coordinates. When the end points are ## Examples - include ; - include ; + use ; $fn = 24; polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1); ![polyline2d](images/lib-polyline2d-1.JPG) - include ; - include ; + use ; $fn = 24; polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1, @@ -29,8 +27,7 @@ Creates a polyline from a list of `x`, `y` coordinates. When the end points are ![polyline2d](images/lib-polyline2d-2.JPG) - include ; - include ; + use ; $fn = 24; polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1, diff --git a/docs/lib-polyline3d.md b/docs/lib2x-polyline3d.md similarity index 89% rename from docs/lib-polyline3d.md rename to docs/lib2x-polyline3d.md index ac123ffb..eb1c7614 100644 --- a/docs/lib-polyline3d.md +++ b/docs/lib2x-polyline3d.md @@ -12,8 +12,7 @@ Creates a polyline from a list of `[x, y, z]` coordinates. ## Examples - include ; - include ; + use ; polyline3d( points = [ @@ -28,8 +27,7 @@ Creates a polyline from a list of `[x, y, z]` coordinates. ![polyline3d](images/lib-polyline3d-1.JPG) - include ; - include ; + use ; polyline3d( points = [ @@ -45,8 +43,7 @@ Creates a polyline from a list of `[x, y, z]` coordinates. ![polyline3d](images/lib-polyline3d-2.JPG) - include ; - include ; + use ; polyline3d( points = [ @@ -63,8 +60,7 @@ Creates a polyline from a list of `[x, y, z]` coordinates. ![polyline3d](images/lib-polyline3d-3.JPG) - include ; - include ; + use ; r = 20; h = 5; diff --git a/docs/lib-polysections.md b/docs/lib2x-polysections.md similarity index 94% rename from docs/lib-polysections.md rename to docs/lib2x-polysections.md index 0da7c1cf..d9fe1dba 100644 --- a/docs/lib-polysections.md +++ b/docs/lib2x-polysections.md @@ -44,8 +44,8 @@ When defining triangles, you can use clockwise or counter-clockwise indexes. ## Examples - include ; - include ; + use ; + use ; section1 = [ [20, 0, 0], @@ -68,8 +68,8 @@ When defining triangles, you can use clockwise or counter-clockwise indexes. ![polysections](images/lib-polysections-7.JPG) - include ; - include ; + use ; + use ; section1 = [ // outer @@ -98,8 +98,8 @@ When defining triangles, you can use clockwise or counter-clockwise indexes. ![polysections](images/lib-polysections-8.JPG) - include ; - include ; + use ; + use ; section1 = [ // outer diff --git a/docs/lib-polytransversals.md b/docs/lib2x-polytransversals.md similarity index 93% rename from docs/lib-polytransversals.md rename to docs/lib2x-polytransversals.md index e7789919..32738a08 100644 --- a/docs/lib-polytransversals.md +++ b/docs/lib2x-polytransversals.md @@ -18,9 +18,9 @@ You can view it as a better polyline2d module. If you have only the points of a ## Examples - include ; - include ; - include ; + use ; + use ; + use ; r = 35; tran_pts = [[-5, 0], [0, 5], [5, 0]]; diff --git a/docs/lib2-px_ascii.md b/docs/lib2x-px_ascii.md similarity index 88% rename from docs/lib2-px_ascii.md rename to docs/lib2x-px_ascii.md index c644a7a6..f4abd293 100644 --- a/docs/lib2-px_ascii.md +++ b/docs/lib2x-px_ascii.md @@ -12,8 +12,7 @@ Generate 8x8 pixel points of printable ASCII characters (codes 32dec to 126dec). ## Examples - include ; - include ; + use ; for(i = [0:94]) { translate([8 * (i % 10), -8 * floor(i / 10), 0]) @@ -26,8 +25,7 @@ Generate 8x8 pixel points of printable ASCII characters (codes 32dec to 126dec). ![px_ascii](images/lib2-px_ascii-1.JPG) - include ; - include ; + use ; t = "dotSCAD"; diff --git a/docs/lib2-px_circle.md b/docs/lib2x-px_circle.md similarity index 89% rename from docs/lib2-px_circle.md rename to docs/lib2x-px_circle.md index 18d5e16b..4ffa3f54 100644 --- a/docs/lib2-px_circle.md +++ b/docs/lib2x-px_circle.md @@ -11,7 +11,7 @@ Returns points that can be used to draw a pixel-style circle. ## Examples - include ; + use ; for(pt = px_circle(10)) { translate(pt) @@ -20,7 +20,7 @@ Returns points that can be used to draw a pixel-style circle. ![px_circle](images/lib2-px_circle-1.JPG) - include ; + use ; for(pt = px_circle(10, filled = true)) { translate(pt) diff --git a/docs/lib2-px_cylinder.md b/docs/lib2x-px_cylinder.md similarity index 91% rename from docs/lib2-px_cylinder.md rename to docs/lib2x-px_cylinder.md index dd26b81f..1e281125 100644 --- a/docs/lib2-px_cylinder.md +++ b/docs/lib2x-px_cylinder.md @@ -13,7 +13,7 @@ Returns points that can be used to draw a pixel-style cylinder. ## Examples - include ; + use ; for(pt = px_cylinder([10, 15], 10)) { translate(pt) @@ -22,7 +22,7 @@ Returns points that can be used to draw a pixel-style cylinder. ![px_cylinder](images/lib2-px_cylinder-1.JPG) - include ; + use ; for(pt = px_cylinder([20, 15], h = 10, thickness = 3)) { translate(pt) diff --git a/docs/lib2-px_from.md b/docs/lib2x-px_from.md similarity index 99% rename from docs/lib2-px_from.md rename to docs/lib2x-px_from.md index c12520b7..7d95801b 100644 --- a/docs/lib2-px_from.md +++ b/docs/lib2x-px_from.md @@ -12,7 +12,7 @@ Given a list of 0s and 1s that represent a black-and-white image. This function ## Examples - include ; + use ; pts = px_from([ [0,0,0,0,0,0,0,0], @@ -41,7 +41,7 @@ I provide a tool [img2binary](https://github.com/JustinSDK/img2binary) for conve The tool converts it into binaries. Combined with the `pixel_from`, you can build a model like this: - include ; + use ; pts = px_from([ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], diff --git a/docs/lib2-px_gray.md b/docs/lib2x-px_gray.md similarity index 99% rename from docs/lib2-px_gray.md rename to docs/lib2x-px_gray.md index 19b36d81..a1a785ae 100644 --- a/docs/lib2-px_gray.md +++ b/docs/lib2x-px_gray.md @@ -13,7 +13,7 @@ Given a list of numbers (0 ~ 255) that represent a gray image. This function tra ## Examples - include ; + use ; levels = [ [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255], diff --git a/docs/lib2-px_line.md b/docs/lib2x-px_line.md similarity index 90% rename from docs/lib2-px_line.md rename to docs/lib2x-px_line.md index 284b9ca7..285d8436 100644 --- a/docs/lib2-px_line.md +++ b/docs/lib2x-px_line.md @@ -11,7 +11,7 @@ Given two points. `px_line` returns points that can be used to draw a pixel-styl ## Examples - include ; + use ; for(pt = px_line([-10, 0], [20, 50])) { translate(pt) @@ -20,7 +20,7 @@ Given two points. `px_line` returns points that can be used to draw a pixel-styl ![px_line](images/lib2-px_line-1.JPG) - include ; + use ; for(pt = px_line([-10, 0, -10], [20, 50, 10])) { translate(pt) diff --git a/docs/lib2-px_polygon.md b/docs/lib2x-px_polygon.md similarity index 81% rename from docs/lib2-px_polygon.md rename to docs/lib2x-px_polygon.md index 1e326d91..7292c01f 100644 --- a/docs/lib2-px_polygon.md +++ b/docs/lib2x-px_polygon.md @@ -11,11 +11,8 @@ Returns points that can be used to draw a pixel-style polygon. ## Examples - include ; - include ; - include ; - include ; - include ; + use ; + use ; pentagram = [ for(pt = shape_pentagram(15)) diff --git a/docs/lib2-px_polyline.md b/docs/lib2x-px_polyline.md similarity index 80% rename from docs/lib2-px_polyline.md rename to docs/lib2x-px_polyline.md index 220be428..7b7ad2a0 100644 --- a/docs/lib2-px_polyline.md +++ b/docs/lib2x-px_polyline.md @@ -10,9 +10,8 @@ Given a list of points. `px_polyline` returns points that can be used to draw a ## Examples - include ; - include ; - include ; + use ; + use ; pentagram = [ for(pt = shape_pentagram(15)) @@ -27,10 +26,8 @@ Given a list of points. `px_polyline` returns points that can be used to draw a ![px_polyline](images/lib2-px_polyline-1.JPG) - include ; - include ; - include ; - include ; + use ; + use ; points_angles = sphere_spiral( radius = 20, diff --git a/docs/lib2-px_sphere.md b/docs/lib2x-px_sphere.md similarity index 93% rename from docs/lib2-px_sphere.md rename to docs/lib2x-px_sphere.md index 5dcec60c..f1421106 100644 --- a/docs/lib2-px_sphere.md +++ b/docs/lib2x-px_sphere.md @@ -12,7 +12,7 @@ Returns points that can be used to draw a pixel-style sphere. ## Examples - include ; + use ; for(pt = px_sphere(10)) { translate(pt) diff --git a/docs/lib2-rand.md b/docs/lib2x-rand.md similarity index 93% rename from docs/lib2-rand.md rename to docs/lib2x-rand.md index 67a0a5af..07b05c73 100644 --- a/docs/lib2-rand.md +++ b/docs/lib2x-rand.md @@ -12,7 +12,7 @@ Random number generator. Generates a pseudo random number. ## Examples - include ; + use ; echo(rand()); echo(rand(1, 10)); diff --git a/docs/lib2-reverse.md b/docs/lib2x-reverse.md similarity index 84% rename from docs/lib2-reverse.md rename to docs/lib2x-reverse.md index ef18652e..40206f55 100644 --- a/docs/lib2-reverse.md +++ b/docs/lib2x-reverse.md @@ -10,7 +10,7 @@ Reverse a list. ## Examples - include ; + use ; echo(reverse([1, 2, 3])); // ECHO: [3, 2, 1] diff --git a/docs/lib-ring_extrude.md b/docs/lib2x-ring_extrude.md similarity index 81% rename from docs/lib-ring_extrude.md rename to docs/lib2x-ring_extrude.md index 823f9dfc..0d0d9ae9 100644 --- a/docs/lib-ring_extrude.md +++ b/docs/lib2x-ring_extrude.md @@ -4,7 +4,7 @@ Rotational extrusion spins a 2D shape around the Z-axis. It's similar to the bui Because we cannot retrieve the shape points of built-in 2D modules, it's necessary to provide `shapt_pts` and `triangles`. -If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details. +If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib2x-polysections.html) for details. ## Parameters @@ -13,15 +13,12 @@ If your 2D shape is not solid, indexes of triangles are required. See [polysecti - `angle` : Defaults to 360. Specifies the number of degrees to sweep, starting at the positive X axis. It also accepts a 2 element vector which defines the central angle. The first element of the vector is the beginning angle in degrees, and the second element is the ending angle. - `twist` : The number of degrees of through which the shape is extruded. - `scale` : Scales the 2D shape by this value over the length of the extrusion. Scale can be a scalar or a vector. -- `triangles` : `"SOLID"` (default), `"HOLLOW"` or user-defined indexes. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details. +- `triangles` : `"SOLID"` (default), `"HOLLOW"` or user-defined indexes. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib2x-polysections.html) for details. - `$fa`, `$fs`, `$fn` : Check [the circle module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#circle) for more details. ## Examples - include ; - include ; - include ; - include ; + use ; shape_pts = [ [2, -10], @@ -34,10 +31,7 @@ If your 2D shape is not solid, indexes of triangles are required. See [polysecti ![ring_extrude](images/lib-ring_extrude-1.JPG) - include ; - include ; - include ; - include ; + use ; shape_pts = [ [2, -10], diff --git a/docs/lib-rotate_p.md b/docs/lib2x-rotate_p.md similarity index 94% rename from docs/lib-rotate_p.md rename to docs/lib2x-rotate_p.md index 463b02ff..17eb8234 100644 --- a/docs/lib-rotate_p.md +++ b/docs/lib2x-rotate_p.md @@ -12,7 +12,7 @@ Rotates a point `a` degrees about the axis of the coordinate system or around an You can use the code below to create a line. - include ; + use ; hull() { sphere(1); @@ -23,7 +23,7 @@ You can use the code below to create a line. The following code has the same effect. - include ; + use ; point = [20, 0, 0]; a = [0, -45, 45]; @@ -39,7 +39,7 @@ The following code has the same effect. The `rotate_p` function is useful in some situations. For example, you probably want to get all points on the path of a spiral around a sphere. - include ; + use ; radius = 40; step_angle = 10; @@ -63,7 +63,7 @@ The `rotate_p` function is useful in some situations. For example, you probably ![rotate_p](images/lib-rotate_p-2.JPG) - include ; + use ; v = [10, 10, 10]; diff --git a/docs/lib-rounded_cube.md b/docs/lib2x-rounded_cube.md similarity index 92% rename from docs/lib-rounded_cube.md rename to docs/lib2x-rounded_cube.md index ed36302a..a552b392 100644 --- a/docs/lib-rounded_cube.md +++ b/docs/lib2x-rounded_cube.md @@ -11,13 +11,13 @@ Creates a cube in the first octant. When `center` is `true`, the cube is centere ## Examples - include ; + use ; rounded_cube(20, 5); ![rounded_cube](images/lib-rounded_cube-1.JPG) - include ; + use ; rounded_cube( size = [50, 25, 15], @@ -27,7 +27,7 @@ Creates a cube in the first octant. When `center` is `true`, the cube is centere ![rounded_cube](images/lib-rounded_cube-2.JPG) - include ; + use ; $fn = 8; diff --git a/docs/lib-rounded_cylinder.md b/docs/lib2x-rounded_cylinder.md similarity index 96% rename from docs/lib-rounded_cylinder.md rename to docs/lib2x-rounded_cylinder.md index ab845137..6f07ac90 100644 --- a/docs/lib-rounded_cylinder.md +++ b/docs/lib2x-rounded_cylinder.md @@ -13,7 +13,7 @@ Creates a rounded cylinder. ## Examples - include ; + use ; rounded_cylinder( radius = [20, 10], diff --git a/docs/lib-rounded_extrude.md b/docs/lib2x-rounded_extrude.md similarity index 96% rename from docs/lib-rounded_extrude.md rename to docs/lib2x-rounded_extrude.md index 5c8ae47f..92677b4d 100644 --- a/docs/lib-rounded_extrude.md +++ b/docs/lib2x-rounded_extrude.md @@ -12,7 +12,7 @@ Extrudes a 2D object roundly from 0 to 180 degrees. ## Examples - include ; + use ; $fn = 48; diff --git a/docs/lib-rounded_square.md b/docs/lib2x-rounded_square.md similarity index 91% rename from docs/lib-rounded_square.md rename to docs/lib2x-rounded_square.md index 034f941a..dad0eb31 100644 --- a/docs/lib-rounded_square.md +++ b/docs/lib2x-rounded_square.md @@ -11,13 +11,13 @@ Creates a rounded square or rectangle in the first quadrant. When `center` is `t ## Examples - include ; + use ; rounded_square(size = 50, corner_r = 5); ![rounded_square](images/lib-rounded_square-1.JPG) - include ; + use ; rounded_square( size = [50, 25], @@ -27,7 +27,7 @@ Creates a rounded square or rectangle in the first quadrant. When `center` is `t ![rounded_square](images/lib-rounded_square-2.JPG) - include ; + use ; $fn = 4; rounded_square( diff --git a/docs/lib-shape_arc.md b/docs/lib2x-shape_arc.md similarity index 87% rename from docs/lib-shape_arc.md rename to docs/lib2x-shape_arc.md index 42c50d6e..d79ddcdd 100644 --- a/docs/lib-shape_arc.md +++ b/docs/lib2x-shape_arc.md @@ -11,18 +11,16 @@ Returns shape points of an arc shape. They can be used with xxx_extrude modules ## Examples - include ; + use ; shape_pts = shape_arc(radius = 10, angle = [-90, 90], width = 5); polygon(shape_pts); ![shape_arc](images/lib-shape_arc-1.JPG) - include ; - include ; - include ; - include ; - include ; + use ; + use ; + use ; t_step = 0.05; width = 2; diff --git a/docs/lib-shape_cyclicpolygon.md b/docs/lib2x-shape_cyclicpolygon.md similarity index 87% rename from docs/lib-shape_cyclicpolygon.md rename to docs/lib2x-shape_cyclicpolygon.md index 008f4b69..2ce893a3 100644 --- a/docs/lib-shape_cyclicpolygon.md +++ b/docs/lib2x-shape_cyclicpolygon.md @@ -11,7 +11,7 @@ Returns shape points of a regular cyclic polygon. They can be used with xxx_extr ## Examples - include ; + use ; circle_r = 10; corner_r = 3; @@ -42,11 +42,8 @@ Returns shape points of a regular cyclic polygon. They can be used with xxx_extr ![shape_cyclicpolygon](images/lib-shape_cyclicpolygon-1.JPG) - include ; - include ; - include ; - include ; - include ; + use ; + use ; shape_pts = shape_cyclicpolygon( sides = 5, diff --git a/docs/lib-shape_ellipse.md b/docs/lib2x-shape_ellipse.md similarity index 80% rename from docs/lib-shape_ellipse.md rename to docs/lib2x-shape_ellipse.md index eb81ccd3..788d6721 100644 --- a/docs/lib-shape_ellipse.md +++ b/docs/lib2x-shape_ellipse.md @@ -9,7 +9,7 @@ Returns shape points of an ellipse. They can be used with xxx_extrude modules of ## Examples - include ; + use ; polygon( shape_ellipse([40, 20]) @@ -17,13 +17,8 @@ Returns shape points of an ellipse. They can be used with xxx_extrude modules of ![shape_ellipse](images/lib-shape_ellipse-1.JPG) - include ; - include ; - include ; - include ; - include ; - include ; - include ; + use ; + use ; $fn = 8; diff --git a/docs/lib-shape_glued2circles.md b/docs/lib2x-shape_glued2circles.md similarity index 78% rename from docs/lib-shape_glued2circles.md rename to docs/lib2x-shape_glued2circles.md index 1568fb2b..1b90ddce 100644 --- a/docs/lib-shape_glued2circles.md +++ b/docs/lib2x-shape_glued2circles.md @@ -7,15 +7,12 @@ Returns shape points of two glued circles. They can be used with xxx_extrude mod - `radius` : The radius of two circles. - `centre_dist` : The distance between centres of two circles. - `tangent_angle` : The angle of a tangent line. It defaults to 30 degrees. See examples below. -- `t_step` : It defaults to 0.1. See [bezier_curve](https://openhome.cc/eGossip/OpenSCAD/lib-bezier_curve.html) for details. +- `t_step` : It defaults to 0.1. See [bezier_curve](https://openhome.cc/eGossip/OpenSCAD/lib2x-bezier_curve.html) for details. - `$fa`, `$fs`, `$fn` : Check [the circle module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#circle) for more details. ## Examples - include ; - include ; - include ; - include ; + use ; $fn = 36; @@ -27,10 +24,7 @@ Returns shape points of two glued circles. They can be used with xxx_extrude mod ![shape_glued2circles](images/lib-shape_glued2circles-1.JPG) - include ; - include ; - include ; - include ; + use ; $fn = 36; @@ -49,10 +43,7 @@ Returns shape points of two glued circles. They can be used with xxx_extrude mod ![shape_glued2circles](images/lib-shape_glued2circles-2.JPG) - include ; - include ; - include ; - include ; + use ; $fn = 36; diff --git a/docs/lib-shape_path_extend.md b/docs/lib2x-shape_path_extend.md similarity index 85% rename from docs/lib-shape_path_extend.md rename to docs/lib2x-shape_path_extend.md index f9fc36b0..3b89ceba 100644 --- a/docs/lib-shape_path_extend.md +++ b/docs/lib2x-shape_path_extend.md @@ -13,10 +13,9 @@ When using this function, you should use points to represent the 2D stroke. ## Examples - include ; - include ; - include ; - include ; + use ; + use ; + use ; $fn = 96; @@ -45,13 +44,9 @@ When using this function, you should use points to represent the 2D stroke. ![shape_path_extend](images/lib-shape_path_extend-1.JPG) - include ; - include ; - include ; - - include ; - include ; - + use ; + use ; + use ; t_step = 0.1; width = 2; diff --git a/docs/lib-shape_pentagram.md b/docs/lib2x-shape_pentagram.md similarity index 67% rename from docs/lib-shape_pentagram.md rename to docs/lib2x-shape_pentagram.md index ca3690db..e02c059e 100644 --- a/docs/lib-shape_pentagram.md +++ b/docs/lib2x-shape_pentagram.md @@ -8,19 +8,14 @@ Returns shape points of a pentagram. They can be used with xxx_extrude modules o ## Examples - include ; + use ; polygon(shape_pentagram(5)); ![shape_pentagram](images/lib-shape_pentagram-1.JPG) - include ; - include ; - include ; - include ; - include ; - include ; - include ; + use ; + use ; shape_pts = shape_pentagram(2); diff --git a/docs/lib-shape_pie.md b/docs/lib2x-shape_pie.md similarity index 81% rename from docs/lib-shape_pie.md rename to docs/lib2x-shape_pie.md index 7fa6d3bd..35fb5cfc 100644 --- a/docs/lib-shape_pie.md +++ b/docs/lib2x-shape_pie.md @@ -10,19 +10,15 @@ Returns shape points of a pie (circular sector) shape. They can be used with xxx ## Examples - include ; + use ; shape_pts = shape_pie(10, [45, 315], $fn = 24); polygon(shape_pts); ![shape_pie](images/lib-shape_pie-1.JPG) - include ; - include ; - include ; - include ; - include ; - include ; + use ; + use ; shape_pts = shape_pie(10, [45, 315], $fn = 8); diff --git a/docs/lib-shape_square.md b/docs/lib2x-shape_square.md similarity index 85% rename from docs/lib-shape_square.md rename to docs/lib2x-shape_square.md index 39de91c9..12b033ac 100644 --- a/docs/lib-shape_square.md +++ b/docs/lib2x-shape_square.md @@ -10,7 +10,7 @@ Returns shape points of a rounded square or rectangle. They can be used with xxx ## Examples - include ; + use ; polygon( shape_square(size = 50, corner_r = 5) @@ -18,11 +18,8 @@ Returns shape points of a rounded square or rectangle. They can be used with xxx ![shape_square](images/lib-shape_square-1.JPG) - include ; - include ; - include ; - include ; - include ; + use ; + use ; $fn = 36; diff --git a/docs/lib-shape_starburst.md b/docs/lib2x-shape_starburst.md similarity index 71% rename from docs/lib-shape_starburst.md rename to docs/lib2x-shape_starburst.md index fa55293c..3288aa4b 100644 --- a/docs/lib-shape_starburst.md +++ b/docs/lib2x-shape_starburst.md @@ -11,19 +11,14 @@ Returns shape points of a star. They can be used with xxx_extrude modules of dot ## Examples - include ; + use ; polygon(shape_starburst(30, 12, 6)); ![shape_starburst](images/lib-shape_starburst-1.JPG) - include ; - include ; - include ; - include ; - include ; - include ; - include ; + use ; + use ; shape_pts = shape_starburst(5, 2, 8); diff --git a/docs/lib-shape_superformula.md b/docs/lib2x-shape_superformula.md similarity index 84% rename from docs/lib-shape_superformula.md rename to docs/lib2x-shape_superformula.md index 9dc252c4..d441f5d9 100644 --- a/docs/lib-shape_superformula.md +++ b/docs/lib2x-shape_superformula.md @@ -9,7 +9,7 @@ Returns shape points of a [Superformula](https://en.wikipedia.org/wiki/Superform ## Examples - include ; + use ; phi_step = 0.05; @@ -32,13 +32,8 @@ Returns shape points of a [Superformula](https://en.wikipedia.org/wiki/Superform ![shape_superformula](images/lib-shape_superformula-1.JPG) - include ; - include ; - include ; - include ; - include ; - include ; - include ; + use ; + use ; phi_step = 0.05; diff --git a/docs/lib-shape_taiwan.md b/docs/lib2x-shape_taiwan.md similarity index 72% rename from docs/lib-shape_taiwan.md rename to docs/lib2x-shape_taiwan.md index c0758f8f..b14d49ac 100644 --- a/docs/lib-shape_taiwan.md +++ b/docs/lib2x-shape_taiwan.md @@ -9,19 +9,14 @@ Returns shape points of [Taiwan](https://www.google.com.tw/maps?q=taiwan&um=1&ie ## Examples - include ; + use ; polygon(shape_taiwan(10)); ![shape_taiwan](images/lib-shape_taiwan-1.JPG) - include ; - include ; - include ; - include ; - include ; - include ; - include ; + use ; + use ; mirror_taiwan = [for(pt = shape_taiwan(15)) [pt[0] * -1, pt[1]]]; @@ -35,12 +30,8 @@ Returns shape points of [Taiwan](https://www.google.com.tw/maps?q=taiwan&um=1&ie ![shape_taiwan](images/lib-shape_taiwan-2.JPG) - include ; - include ; - include ; - include ; - include ; - include ; + use ; + use ; r1 = 15; r2 = 100; diff --git a/docs/lib-shape_trapezium.md b/docs/lib2x-shape_trapezium.md similarity index 86% rename from docs/lib-shape_trapezium.md rename to docs/lib2x-shape_trapezium.md index 0ae16027..7762529c 100644 --- a/docs/lib-shape_trapezium.md +++ b/docs/lib2x-shape_trapezium.md @@ -11,7 +11,7 @@ Returns shape points of an isosceles trapezoid. They can be used with xxx_extrud ## Examples - include ; + use ; polygon( shape_trapezium([40, 20], @@ -21,11 +21,9 @@ Returns shape points of an isosceles trapezoid. They can be used with xxx_extrud ![shape_trapezium](images/lib-shape_trapezium-1.JPG) - include ; - include ; - include ; - include ; - include ; + use ; + use ; + use ; t_step = 0.05; width = 2; diff --git a/docs/lib-shear.md b/docs/lib2x-shear.md similarity index 97% rename from docs/lib-shear.md rename to docs/lib2x-shear.md index f790a4c2..b78d5f0f 100644 --- a/docs/lib-shear.md +++ b/docs/lib2x-shear.md @@ -13,7 +13,7 @@ Shear all child elements along the X-axis, Y-axis, or Z-axis in 3D. ## Examples - include ; + use ; color("red") { shear(sx = [1, 0]) diff --git a/docs/lib2-slice.md b/docs/lib2x-slice.md similarity index 94% rename from docs/lib2-slice.md rename to docs/lib2x-slice.md index 6e656f45..a73e42c3 100644 --- a/docs/lib2-slice.md +++ b/docs/lib2x-slice.md @@ -12,7 +12,7 @@ Returns a list selected from `begin` to `end`, or to the `end` of the list (`end ## Examples - include ; + use ; echo(slice([for(c = "helloworld") c], 0, 5)); // ECHO: ["h", "e", "l", "l", "o"] echo(slice([for(c = "helloworld") c], 5)); // ECHO: ["w", "o", "r", "l", "d"] diff --git a/docs/lib2-sort.md b/docs/lib2x-sort.md similarity index 97% rename from docs/lib2-sort.md rename to docs/lib2x-sort.md index 5d674771..91a40c7d 100644 --- a/docs/lib2-sort.md +++ b/docs/lib2x-sort.md @@ -12,7 +12,7 @@ Sorts the elements of a list in ascending order. The list is a list-of-list cons ## Examples - include ; + use ; assert( [[2, 0, 0], [5, 0, 0], [7, 0, 0], [9, 0, 0], [10, 0, 0]] == diff --git a/docs/lib-sphere_spiral.md b/docs/lib2x-sphere_spiral.md similarity index 89% rename from docs/lib-sphere_spiral.md rename to docs/lib2x-sphere_spiral.md index 2c6adde2..dd821b28 100644 --- a/docs/lib-sphere_spiral.md +++ b/docs/lib2x-sphere_spiral.md @@ -14,9 +14,8 @@ Creates all points and angles on the path of a spiral around a sphere. It return ## Examples - include ; - include ; - include ; + use ; + use ; points_angles = sphere_spiral( radius = 40, @@ -36,8 +35,7 @@ Creates all points and angles on the path of a spiral around a sphere. It return ![sphere_spiral](images/lib-sphere_spiral-3.JPG) - include ; - include ; + use ; points_angles = sphere_spiral( radius = 40, @@ -56,9 +54,8 @@ Creates all points and angles on the path of a spiral around a sphere. It return ![sphere_spiral](images/lib-sphere_spiral-5.JPG) - include ; - include ; - include ; + use ; + use ; points_angles = sphere_spiral( radius = 40, diff --git a/docs/lib-sphere_spiral_extrude.md b/docs/lib2x-sphere_spiral_extrude.md similarity index 64% rename from docs/lib-sphere_spiral_extrude.md rename to docs/lib2x-sphere_spiral_extrude.md index 53ceea4b..be888cfb 100644 --- a/docs/lib-sphere_spiral_extrude.md +++ b/docs/lib2x-sphere_spiral_extrude.md @@ -2,32 +2,20 @@ Extrudes a 2D shape along the path of a sphere spiral. -When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details. +When using this module, you should use points to represent the 2D shape. If your 2D shape is not solid, indexes of triangles are required. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib2x-polysections.html) for details. ## Parameters - `shape_pts` : A list of points represent a shape. See the example below. -- `radius` , `za_step`, `z_circles`, `begin_angle`, `end_angle`, `vt_dir`, `rt_dir` : See [sphere_spiral](https://openhome.cc/eGossip/OpenSCAD/lib-sphere_spiral.html) for details. +- `radius` , `za_step`, `z_circles`, `begin_angle`, `end_angle`, `vt_dir`, `rt_dir` : See [sphere_spiral](https://openhome.cc/eGossip/OpenSCAD/lib2x-sphere_spiral.html) for details. - `twist` : The number of degrees of through which the shape is extruded. - `scale` : Scales the 2D shape by this value over the length of the extrusion. Scale can be a scalar or a vector. -- `triangles` : `"SOLID"` (default), `"HOLLOW"` or user-defined indexes. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details. +- `triangles` : `"SOLID"` (default), `"HOLLOW"` or user-defined indexes. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib2x-polysections.html) for details. ## Examples - include ; - include ; - include ; - include ; - include ; - - function shape_pentagram(r) = - [ - [0, 1], [-0.224514, 0.309017], - [-0.951057, 0.309017], [-0.363271, -0.118034], - [-0.587785, -0.809017], [0, -0.381966], - [0.587785, -0.809017], [0.363271, -0.118034], - [0.951057, 0.309017], [0.224514, 0.309017] - ] * r; + use ; + use ; points_triangles = shape_pentagram(2); diff --git a/docs/lib2-split_str.md b/docs/lib2x-split_str.md similarity index 82% rename from docs/lib2-split_str.md rename to docs/lib2x-split_str.md index d1d12636..e9d9073e 100644 --- a/docs/lib2-split_str.md +++ b/docs/lib2x-split_str.md @@ -11,8 +11,7 @@ Splits the given string around matches of the given delimiting character. ## Examples - include ; - include ; + use ; echo(split_str("hello,world", ",")); // ECHO: ["hello", "world"] diff --git a/docs/lib-starburst.md b/docs/lib2x-starburst.md similarity index 94% rename from docs/lib-starburst.md rename to docs/lib2x-starburst.md index e64c1519..eddde8b3 100644 --- a/docs/lib-starburst.md +++ b/docs/lib2x-starburst.md @@ -13,7 +13,7 @@ A 3D version of `shape_starburst`. ## Examples - include ; + use ; starburst(10, 5, 5, 5); translate([20, 0, 0]) starburst(10, 5, 6, 5); diff --git a/docs/lib-stereographic_extrude.md b/docs/lib2x-stereographic_extrude.md similarity index 97% rename from docs/lib-stereographic_extrude.md rename to docs/lib2x-stereographic_extrude.md index 3b1f1b98..8e726ec1 100644 --- a/docs/lib-stereographic_extrude.md +++ b/docs/lib2x-stereographic_extrude.md @@ -12,7 +12,7 @@ The 2D polygon should center at the origin and you have to determine the side le ## Examples - include ; + use ; dimension = 100; diff --git a/docs/lib2-sub_str.md b/docs/lib2x-sub_str.md similarity index 94% rename from docs/lib2-sub_str.md rename to docs/lib2x-sub_str.md index a3d01e6a..c7b95f3a 100644 --- a/docs/lib2-sub_str.md +++ b/docs/lib2x-sub_str.md @@ -12,7 +12,7 @@ Returns the part of the string from `begin` to `end`, or to the `end` of the str ## Examples - include ; + use ; echo(sub_str("helloworld", 0, 5)); // ECHO: "hello" echo(sub_str("helloworld", 5)); // ECHO: "world" diff --git a/docs/lib2-t2d.md b/docs/lib2x-t2d.md similarity index 94% rename from docs/lib2-t2d.md rename to docs/lib2x-t2d.md index dc196eaf..e91a1f9d 100644 --- a/docs/lib2-t2d.md +++ b/docs/lib2x-t2d.md @@ -16,8 +16,8 @@ An implementation of Turtle Graphics with Fluent API. It moves on the xy plane. ## Examples - include ; - include ; + use ; + use ; module turtle_spiral(t, times, side_leng, angle, width) { $fn = 24; @@ -48,8 +48,8 @@ An implementation of Turtle Graphics with Fluent API. It moves on the xy plane. The code below creates the same drawing. - include ; - include ; + use ; + use ; module turtle_spiral(t, times, side_leng, angle, width) { $fn = 24; @@ -81,8 +81,8 @@ The code below creates the same drawing. ![t2d](images/lib2-t2d-1.JPG) - include ; - include ; + use ; + use ; side_leng = 100; min_leng = 4; diff --git a/docs/lib2-t3d.md b/docs/lib2x-t3d.md similarity index 95% rename from docs/lib2-t3d.md rename to docs/lib2x-t3d.md index 2ae9782d..9e8b8e93 100644 --- a/docs/lib2-t3d.md +++ b/docs/lib2x-t3d.md @@ -19,8 +19,8 @@ For more details, please see [3D turtle graphics](https://openhome.cc/eGossip/Op ## Examples - include ; - include ; + use ; + use ; leng = 10; angle = 120; @@ -44,8 +44,8 @@ For more details, please see [3D turtle graphics](https://openhome.cc/eGossip/Op ![t3d](images/lib2-t3d-1.JPG) - include ; - include ; + use ; + use ; module tree(t, leng, leng_scale1, leng_scale2, leng_limit, angleZ, angleX, width) { diff --git a/docs/lib-torus_knot.md b/docs/lib2x-torus_knot.md similarity index 81% rename from docs/lib-torus_knot.md rename to docs/lib2x-torus_knot.md index 7c54e3d0..1d32a065 100644 --- a/docs/lib-torus_knot.md +++ b/docs/lib2x-torus_knot.md @@ -14,11 +14,9 @@ Generate a path of [The (p,q)-torus knot](https://en.wikipedia.org/wiki/Torus_kn ## Examples - include ; - include ; - include ; - include ; - include ; + use ; + use ; + use ; p = 2; q = 3; diff --git a/docs/lib-triangulate.md b/docs/lib2x-triangulate.md similarity index 95% rename from docs/lib-triangulate.md rename to docs/lib2x-triangulate.md index 69e6aa99..7355b58a 100644 --- a/docs/lib-triangulate.md +++ b/docs/lib2x-triangulate.md @@ -11,7 +11,7 @@ Given a 2D shape. This function performs a simple polygon triangulation algorith ## Examples - include ; + use ; shape = [ [0, 0], @@ -37,6 +37,5 @@ Given a 2D shape. This function performs a simple polygon triangulation algorith } } - ![triangulate](images/lib-triangulate-1.JPG) diff --git a/docs/lib-trim_shape.md b/docs/lib2x-trim_shape.md similarity index 83% rename from docs/lib-trim_shape.md rename to docs/lib2x-trim_shape.md index 0f09bae2..770fea59 100644 --- a/docs/lib-trim_shape.md +++ b/docs/lib2x-trim_shape.md @@ -13,11 +13,11 @@ Given a tangled-edge shape. This function trims the shape to a non-tangled shape ## Examples - include ; - include ; - include ; - include ; - include ; + use ; + use ; + use ; + use ; + use ; taiwan = shape_taiwan(50); offseted = bijection_offset(taiwan, -2); diff --git a/docs/lib2-turtle2d.md b/docs/lib2x-turtle2d.md similarity index 96% rename from docs/lib2-turtle2d.md rename to docs/lib2x-turtle2d.md index 11dbd881..a71428ca 100644 --- a/docs/lib2-turtle2d.md +++ b/docs/lib2x-turtle2d.md @@ -17,8 +17,8 @@ An OpenSCAD implementation of Turtle Graphics. It moves on the xy plane. You can ## Examples - include ; - include ; + use ; + use ; module turtle_spiral(t_before, times, side_leng, angle, width) { $fn = 24; @@ -48,8 +48,8 @@ An OpenSCAD implementation of Turtle Graphics. It moves on the xy plane. You can ![turtle2d](images/lib-turtle2d-1.JPG) - include ; - include ; + use ; + use ; module turtle_spiral(t_before, side_leng, d_step, min_leng, angle, width) { $fn = 24; diff --git a/docs/lib2-turtle3d.md b/docs/lib2x-turtle3d.md similarity index 95% rename from docs/lib2-turtle3d.md rename to docs/lib2x-turtle3d.md index dbe41c60..5b6b864a 100644 --- a/docs/lib2-turtle3d.md +++ b/docs/lib2x-turtle3d.md @@ -17,8 +17,8 @@ For more details, please see [3D turtle graphics](https://openhome.cc/eGossip/Op ## Examples - include ; - include ; + use ; + use ; leng = 10; angle = 120; @@ -47,8 +47,8 @@ For more details, please see [3D turtle graphics](https://openhome.cc/eGossip/Op ![turtle3d](images/lib-turtle3d-1.JPG) - include ; - include ; + use ; + use ; module tree(t, leng, leng_scale1, leng_scale2, leng_limit, angleZ, angleX, width) { diff --git a/docs/lib-voronoi2d.md b/docs/lib2x-voronoi2d.md similarity index 90% rename from docs/lib-voronoi2d.md rename to docs/lib2x-voronoi2d.md index b610559a..083a52d5 100644 --- a/docs/lib-voronoi2d.md +++ b/docs/lib2x-voronoi2d.md @@ -17,7 +17,7 @@ Creats a [Voronoi diagram](https://en.wikipedia.org/wiki/Voronoi_diagram). The i ## Examples - include ; + use ; xs = rands(-20, 20, 50); ys = rands(-20, 20, 50); @@ -26,12 +26,12 @@ Creats a [Voronoi diagram](https://en.wikipedia.org/wiki/Voronoi_diagram). The i voronoi2d(points); translate([60, 0, 0]) - voronoi(points, region_type = "circle"); + voronoi2d(points, region_type = "circle"); ![voronoi2d](images/lib-voronoi2d-1.JPG) - include ; - include ; + use ; + use ; xs = rands(0, 40, 50); ys = rands(0, 20, 50); diff --git a/docs/lib-voronoi3d.md b/docs/lib2x-voronoi3d.md similarity index 98% rename from docs/lib-voronoi3d.md rename to docs/lib2x-voronoi3d.md index 30b37be1..7ab112a3 100644 --- a/docs/lib-voronoi3d.md +++ b/docs/lib2x-voronoi3d.md @@ -19,7 +19,7 @@ The preview or rendering of 3D Voronoi is slow. If you want to use this module, ## Examples - include ; + use ; r = 30;