Skip to content

Commit

Permalink
Furhter tidying and refactoring of nimble_builder
Browse files Browse the repository at this point in the history
  • Loading branch information
julianstirling committed May 16, 2024
1 parent a46ae78 commit 9654a18
Show file tree
Hide file tree
Showing 4 changed files with 265 additions and 124 deletions.
4 changes: 3 additions & 1 deletion nimble_builder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

"""
On loading nimble_builder the RackParameters dataclass will be available
"""
from dataclasses import dataclass
from typing import Literal

Expand Down
6 changes: 5 additions & 1 deletion nimble_builder/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ def cut_slots(body: cad.Body,

slot_line = cad.make_sketch()
slot_height = pos_list_vertical[0].size_y - slot_width
slot_line.add_slot(width=slot_height, height=slot_width, angle=90, pos=[p.center for p in pos_list_vertical])
slot_line.add_slot(
width=slot_height,
height=slot_width,
angle=90,
pos=[p.center for p in pos_list_vertical])

# copy that sketch to cover the whole plate width

Expand Down
9 changes: 8 additions & 1 deletion nimble_builder/nimble_end_plate.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# SPDX-FileCopyrightText: 2023 Andreas Kahler <mail@andreaskahler.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

"""
A generic function for the end plates of the rack (top and bottom plates.
This currently only generates the flat plates, not ones that can hold and
instrument on top.
"""

import cadscript as cad
import nimble_builder


def create_end_plate(width, depth, height, rack_params=None):
"""
Create the top and bottom of the rack
"""

if not rack_params:
rack_params = nimble_builder.RackParameters()
Expand Down
Loading

0 comments on commit 9654a18

Please sign in to comment.