### alternative_spheres.scad Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Provides various implementations for creating spheres, including a basic sphere, a sphere from a normalized cube mapping, a spherified cube, and a subdivided icosahedron. ```APIDOC ## sphere2 ### Description Simplest sphere implementation, where poles come to points (very slightly different geometry from builtin). ### Parameters * **r** (number) - Optional - Radius of the sphere. * **d** (number) - Optional - Diameter of the sphere. ## normalized_cube ### Description Sphere from a simple cube mapping. ### Parameters * **r** (number) - Optional - Radius of the sphere. * **div_count** (number) - Optional - Number of divisions for the cube mapping. * **d** (number) - Optional - Diameter of the sphere. ## spherified_cube ### Description Sphere from a more balanced cube mapping. ### Parameters * **r** (number) - Optional - Radius of the sphere. * **origin** (array) - Optional - The origin point [x,y,z]. * **div_count** (number) - Optional - Number of divisions for the cube mapping. * **d** (number) - Optional - Diameter of the sphere. ## icosahedron ### Description Subdivided icosahedron mapping (geodesic sphere). ### Parameters * **r** (number) - Optional - Radius of the sphere. * **d** (number) - Optional - Diameter of the sphere. * **n** (number) - Optional - Subdivision iterations. (number of faces = 20 * 4^n) ``` -------------------------------- ### functional.scad - Functional Extras Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Provides additional functions and modules not found in standard OpenSCAD. ```APIDOC ## functional.scad - Functional Extras ### Extra Functions #### arc Creates an arc. #### Parameters * **r** (float) - Optional - Radius. Defaults to 1. * **angle** (float) - Optional - Arc angle. Defaults to 360. * **offsetAngle** (float) - Optional - Angle offset. Defaults to 0. * **c** (array) - Optional - Center coordinates [x,y]. Defaults to [0,0]. * **center** (boolean) - Optional - If true, the arc is centered. Defaults to false. * **internal** (boolean) - Optional - If true, creates an internal arc. Defaults to false. #### bounds Calculates the bounding box of a polygon. #### Parameters * **poly** (any) - Required - The polygon. #### invert Inverts a polygon. #### Parameters * **poly** (any) - Required - The polygon to invert. #### signed_area Calculates the signed area of a polygon. #### Parameters * **points** (array) - Required - The polygon points. #### signed_volume Calculates the signed volume of a 3D object. #### Parameters * **poly** (any) - Required - The 3D object. ### Extra Modules #### poly3d Creates a 3D polygon. #### Parameters * **poly** (any) - Required - The polygon data. #### poly2d Creates a 2D polygon. #### Parameters * **poly** (any) - Required - The polygon data. #### showPoints Visualizes the points of a polygon. #### Parameters * **poly** (any) - Required - The polygon. * **r** (float) - Optional - Radius of the point markers. Defaults to 0.1. ``` -------------------------------- ### webbing.scad Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Implements the `webbing` function to connect two circles with a smooth transition. ```APIDOC ## webbing.scad Implements "webbing" function which is a way to connect two separate circles with a smooth transition to a thin section between them. ``` -------------------------------- ### functional.scad - 3D Primitives Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Implements OpenSCAD's 3D primitive functions with potential additional parameters. ```APIDOC ## functional.scad - 3D Primitives ### sphere Implements the OpenSCAD `sphere` function. #### Parameters * **r** (float) - Optional - The radius of the sphere. Defaults to 1. * **d** (float) - Optional - The diameter of the sphere. ### cylinder Implements the OpenSCAD `cylinder` function. #### Parameters * **h** (float) - Optional - The height of the cylinder. Defaults to 1. * **r1** (float) - Optional - The radius of the first base. * **r2** (float) - Optional - The radius of the second base. * **center** (boolean) - Optional - If true, the cylinder is centered. Defaults to false. * **r** (float) - Optional - The radius for a cylinder with equal bases. * **d** (float) - Optional - The diameter for a cylinder with equal bases. * **d1** (float) - Optional - The diameter of the first base. * **d2** (float) - Optional - The diameter of the second base. ``` -------------------------------- ### Calling Builtin Module Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Illustrates a module call that is a standalone statement. The OpenSCAD interpreter defaults to the builtin module when the call is not assigned or passed as a parameter. ```openscad square(); ``` -------------------------------- ### functional.scad - 2D Primitives Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Implements OpenSCAD's 2D primitive functions with potential additional parameters. ```APIDOC ## functional.scad - 2D Primitives ### square Implements the OpenSCAD `square` function. #### Parameters * **size** (float) - Optional - The size of the square. Defaults to 1. * **center** (boolean) - Optional - If true, the square is centered. Defaults to false. * **r** (float) - Optional - Radius for rounded corners. Defaults to 0. ### circle Implements the OpenSCAD `circle` function. #### Parameters * **r** (float) - Optional - The radius of the circle. Defaults to 1. * **c** (array) - Optional - The center coordinates [x,y]. Defaults to [0,0]. * **internal** (boolean) - Optional - If true, creates an internal circle. Defaults to false. * **d** (float) - Optional - The diameter of the circle. ``` -------------------------------- ### planes.scad Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Provides functions for creating and manipulating planes, as well as visualizing them. ```APIDOC ## planeFromPoints ### Description Create a plane from any 3 points. ### Parameters * **a** (point) - The first point. * **b** (point) - The second point. * **c** (point) - The third point. ## planeFromFace ### Description Find the plane tangent to a specific polyhedron face. ### Parameters * **poly** (polyhedron) - The polyhedron. * **iface** (integer) - The index of the face. * **lasti** (integer) - Optional - The last index, defaults to 2. ## showPlane ### Description Visualize a plane as a finite thin cube. ### Parameters * **plane** (plane) - The plane to visualize. * **size** (array) - Optional - The size of the visualization cube, defaults to [100,100,0.05]. ## splitPolygonByPlane ### Description Attempted port of OpenJSCAD / csg.js "splitPolygonByPlane" function, prerequisite for further development of boolean operations, projection, etc. Returns [front, coplanarFront, coplanarBack, back] each containing a list of points, or nan. **INCORRECT IMPLEMENTATION, NEEDS DEBUGGING**. ### Parameters * **plane** (plane) - The plane to split by. * **polyh** (polygon) - The polygon to split. * **iface** (integer) - The index of the face. ``` -------------------------------- ### alternative_spheres.scad Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Provides alternative implementations of spherical geometries using different methods of tesselation. ```APIDOC ## alternative_spheres.scad This file provides alternative implementations of spherical geometries, using different methods of tesselation, (eg. subdivided icosahedron). ``` -------------------------------- ### double_fillet.scad Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Generates a path that is a smooth transition between two parallel surfaces, useful for creating fillets. ```APIDOC ## double_fillet ### Description Double Fillet generates a path that is a smooth transition between two parallel surfaces. ### Parameters * **h** (number) - Optional - The vertical distance between surfaces. Negative height will mirror about the vertical axis. * **r1** (number) - Optional - The first fillet radius traversing away from the origin. * **r2** (number) - Optional - The second fillet radius traversing away from the origin. * **xoffset1** (number) - Optional - Distance from origin where the first radius begins (should be >= 0). * **xoffset2** (number) - Optional - Distance from the edge of the first radius to the start of the second radius. A 0 value makes a straight wall, < 0 makes an overhang. * **closed** (boolean) - Optional - If true, returns a closed polygon ready for extrusion. If false, returns just the curved vertex path. ``` -------------------------------- ### functional.scad - 2D to 3D Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Implements OpenSCAD's 2D to 3D conversion functions with potential additional parameters. ```APIDOC ## functional.scad - 2D to 3D ### linear_extrude Implements the OpenSCAD `linear_extrude` function. #### Parameters * **height** (float) - Optional - The extrusion height. Defaults to 100. * **center** (boolean) - Optional - If true, the extrusion is centered. Defaults to false. * **convexity** (float) - Optional - Convexity value. Defaults to 1. * **twist** (float) - Optional - Twist angle. Defaults to 0. * **slices** (float) - Optional - Number of slices. * **scale** (float) - Optional - Scaling factor. Defaults to 1.0. * **poly** (any) - Required - The 2D shape to extrude. ### rotate_extrude Implements the OpenSCAD `rotate_extrude` function. #### Parameters * **angle** (float) - Optional - The extrusion angle. Defaults to 360. * **offsetAngle** (float) - Optional - Offset angle. Defaults to 0. * **center** (boolean) - Optional - If true, the extrusion is centered. Defaults to false. * **v_offset** (float) - Optional - Vertical offset. Defaults to 0. * **i_offset** (float) - Optional - Initial offset. Defaults to 0. * **poly** (any) - Required - The 2D shape to extrude. ``` -------------------------------- ### functional.scad - Transforms Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Implements OpenSCAD's transform functions with potential additional parameters. ```APIDOC ## functional.scad - Transforms ### scale Implements the OpenSCAD `scale` function. #### Parameters * **v** (any) - Required - The scaling vector. * **poly** (any) - Required - The object to scale. ### resize Implements the OpenSCAD `resize` function. #### Parameters * **newsize** (any) - Required - The new size vector. * **poly** (any) - Required - The object to resize. ### rotate Implements the OpenSCAD `rotate` function. #### Parameters * **a** (float) - Required - The rotation angle. * **v** (any) - Optional - The rotation axis vector. * **poly** (any) - Required - The object to rotate. ### translate Implements the OpenSCAD `translate` function. #### Parameters * **v** (any) - Required - The translation vector. * **poly** (any) - Required - The object to translate. ### mirror Implements the OpenSCAD `mirror` function. #### Parameters * **normal** (any) - Required - The mirror normal vector. * **poly** (any) - Required - The object to mirror. ### multmatrix Implements the OpenSCAD `multmatrix` function. #### Parameters * **M** (any) - Required - The transformation matrix. * **poly** (any) - Required - The object to transform. ``` -------------------------------- ### Passing Function Result as Parameter Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Shows a function call's result being passed as an argument to another module. The interpreter recognizes this as a function call due to its use as a parameter. ```openscad poly2d(square([1,2])); ``` -------------------------------- ### planes.scad Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Contains functions related to geometric planes. ```APIDOC ## planes.scad Functions relating to geometric planes. ``` -------------------------------- ### double_fillet.scad Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Provides the `double_fillet` function for creating smooth transitions between parallel surfaces. ```APIDOC ## double_fillet.scad Provides `double_fillet` function which generates a smooth transition between two parallel surfaces. ``` -------------------------------- ### Assigning Function Result to Variable Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Demonstrates how a function call is assigned to a variable. The OpenSCAD interpreter infers a function call when the result is stored. ```openscad poly = square([1,2]); ``` -------------------------------- ### subdivision.scad Source: https://github.com/thehans/functionalopenscad/blob/master/README.md Provides the `subdivision` function which splits triangles in a 3D poly into smaller triangles. ```APIDOC ## subdivision.scad Provides `subdivision` function which splits each triangle in a 3D poly into 4 smaller triangles by adding midpoints. Included by alternatives_spheres.scad ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.