Chamfers for OpenSCAD

repository·master·Indexed 41 days ago

https://github.com/sebitimewaster/chamfers-for-openscad

A library for OpenSCAD providing high-quality, FDM 3D printer-optimized primitives with 45° chamfers. It includes the `chamferCube` and `chamferCylinder` commands, with `chamferCylinder` supporting circular sectors, arbitrary-sided polygons, and separate top/bottom chamfer parameters as of v0.4. Features include `circleSegments` for quality calculation and a `globalCircleQuality` variable for smoothness control.

Tokens
533
Snippets
2
Records
4
Agent score
50%

What's inside Chamfers for OpenSCAD

  1. Configure circle quality and segments

    master

    The library includes features to improve the smoothness of circular shapes without relying solely on $fa and $fs settings:

    • circleSegments: A function that calculates the required number of segments for a specific radius to ensure high quality.
    • globalCircleQuality: A variable that can be set to globally override the standard quality setting (default is 1.0).

    Note on Precedence: If you specify a quality setting directly within the chamferCylinder command, it will take precedence over the globalCircleQuality variable.

  2. Chamfered primitives: chamferCube and chamferCylinder

    master

    This library provides two primary commands to create primitives with 45° chamfers that are optimized for FDM 3D printing:

    • chamferCube: Creates a chamfered version of the standard OpenSCAD cube command.
    • chamferCylinder: Creates a chamfered version of the standard OpenSCAD cylinder command.

    Key features of chamferCylinder:

    • It can produce a circular sector (a wedge), which the standard cylinder command cannot.
    • It supports creating arbitrary-sided polygons (e.g., extruded triangles) by adjusting side counts.
    • It allows for separate chamfer parameters for the top and bottom sides (available since v0.4).
  3. Use Chamfers for OpenSCAD in your scripts

    master

    To use the chamfered primitives in your OpenSCAD code, you must include the library at the beginning of your script.

    Note: Ensure the path in the include statement matches the folder name where you installed the library.

    include <Chamfers-for-OpenSCAD/Chamfer.scad>;
  4. Install Chamfers for OpenSCAD

    master

    To use this library, you must place it in your OpenSCAD library folder.

    1. Find your library folder: In OpenSCAD, go to File -> Show Library Folder.
    2. Install via Download:
      • Download the ZIP from the releases page.
      • Unpack the contents into your library folder.
    3. Install via Git:
      • Open a terminal in your library folder.
      • Run git clone https://github.com/SebiTimeWaster/Chamfers-for-OpenSCAD.git.
    4. Restart OpenSCAD to apply changes.
    git clone https://github.com/SebiTimeWaster/Chamfers-for-OpenSCAD.git