Skip to content

Latest commit

 

History

History
404 lines (327 loc) · 7.15 KB

minibase.md

File metadata and controls

404 lines (327 loc) · 7.15 KB

Minibase

Collection is minibase shapes with magnet cutouts. The code for these is very simple most of these are just a loft operation.

Basic Bases


Circle

Parameters

  • diameter: float
  • height: float
  • taper: float
  • render_magnet: bool
  • magnet_diameter: float
  • magnet_height: float
result = circle(
    diameter = 25, 
    height = 3, 
    taper = -1,
    render_magnet = True, 
    magnet_diameter = 3, 
    magnet_height = 2
)



Ellipse

Parameters

  • x_diameter: float
  • y_diameter: float
  • height: float
  • taper: float
  • render_magnet: bool
  • magnet_diameter: float
  • magnet_height: float
result = ellipse(
    x_diameter=52, 
    y_diameter=90, 
    height=3, 
    taper=-1,
    render_magnet = True,  
    magnet_diameter=3, 
    magnet_height=2
)



Hexagon

Parameters

  • diameter: float
  • height: float
  • taper: float
  • render_magnet: bool
  • magnet_diameter: float
  • magnet_height: float
result = hexagon(
    diameter = 25,
    height = 3, 
    taper = -1,
    render_magnet = True,  
    magnet_diameter = 3, 
    magnet_height = 2
)



make_magnet_outline

Utility function for making the magnet cutouts for the bases.

Parameters

  • shape_height: float
  • magnet_diameter: float
  • magnet_height: float

Rectangle

Parameters

  • length: float
  • width: float
  • height: float
  • taper: float
  • render_magnet: bool
  • magnet_diameter: float
  • magnet_height: float
result = rectangle(
    length = 25, 
    width = 25, 
    height = 3, 
    taper = -1,
    render_magnet = True,  
    magnet_diameter = 3, 
    magnet_height = 2
)



Slot

Parameters

  • length: float
  • width: float
  • height: float
  • taper: float
  • render_magnet: bool
  • magnet_diameter: float
  • magnet_height: float
result = slot(
    length = 24, 
    width = 50, 
    height = 3, 
    taper = -1,
    render_magnet = True,  
    magnet_diameter = 3, 
    magnet_height = 2
)



Uneven Bases


Circle Uneven

Parameters

  • diameter: float
  • base_height: float
  • taper: float
  • render_magnet: bool
  • magnet_diameter: float
  • magnet_height: float
  • detail_height: float
  • uneven_height: float
  • peak_count: tuple[int,int]|int
  • segments: int
  • seed: str
import cadquery as cq
from cqterrain.minibase import circle_uneven

ex_base = circle_uneven(
    diameter = 45,
    base_height = 3,
    taper = -1,
    render_magnet = True,  
    magnet_diameter = 3, 
    magnet_height = 2,
    detail_height = 3,
    uneven_height = 4,
    peak_count = (9,10),
    segments = 6,
    seed="red"
)

show_object(ex_base)



Ellipse Uneven

Parameters

  • length: float
  • width: float
  • base_height: float
  • taper: float
  • render_magnet: bool
  • magnet_diameter: float
  • magnet_height: float
  • detail_height: float
  • uneven_height: float
  • peak_count: tuple[int,int]|int
  • segments: int
  • seed: str
import cadquery as cq
from cqterrain.minibase import ellipse_uneven

ex_base = ellipse_uneven(
    length = 40,
    width = 40,
    base_height = 3,
    taper = -1,
    render_magnet = True,  
    magnet_diameter = 3, 
    magnet_height = 2,
    detail_height = 3,
    uneven_height = 4,
    peak_count = (9,10),
    segments = 6,
    seed="red"
)

show_object(ex_base)



Hexagon Uneven

Parameters

  • diameter: float
  • base_height: float
  • taper: float
  • render_magnet: bool
  • magnet_diameter: float
  • magnet_height: float
  • detail_height: float
  • uneven_height: float
  • peak_count: tuple[int,int]|int
  • segments: int
  • seed: str
import cadquery as cq
from cqterrain.minibase import hexagon_uneven

ex_base = hexagon_uneven(
    diameter = 45,
    base_height = 3,
    taper = -1,
    render_magnet = True,  
    magnet_diameter = 3, 
    magnet_height = 2,
    detail_height = 3,
    uneven_height = 4,
    peak_count = (9,10),
    segments = 6,
    seed="red"
)

show_object(ex_base)



Rectangle Uneven

Parameters

  • length: float
  • width: float
  • base_height: float
  • taper: float
  • render_magnet: bool
  • magnet_diameter: float
  • magnet_height: float
  • detail_height: float
  • uneven_height: float
  • peak_count: tuple[int,int]|int
  • segments: int
  • seed: str
import cadquery as cq
from cqterrain.minibase import rectangle_uneven

ex_base = rectangle_uneven(
    length = 40,
    width = 40,
    base_height = 3,
    taper = -1,
    render_magnet = True,  
    magnet_diameter = 3, 
    magnet_height = 2,
    detail_height = 3,
    uneven_height = 4,
    peak_count = (9,10),
    segments = 6,
    seed="red"
)

show_object(ex_base)



Slot Uneven

Parameters

  • length: float
  • width: float
  • base_height: float
  • taper: float
  • render_magnet: bool
  • magnet_diameter: float
  • magnet_height: float
  • detail_height: float
  • uneven_height: float
  • peak_count: tuple[int,int]|int
  • segments: int
  • seed: str
import cadquery as cq
from cqterrain.minibase import slot_uneven

ex_base = slot_uneven(
    length = 75,
    width = 25,
    base_height = 3,
    taper = -1,
    render_magnet = True,  
    magnet_diameter = 3, 
    magnet_height = 2,
    detail_height = 3,
    uneven_height = 4,
    peak_count = (9,10),
    segments = 6,
    seed="red"
)

show_object(ex_base)