Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cadquery_helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from os import makedirs, path

from typing import Optional
from typing import Optional, Union

import cadquery as cq
from OCP.Message import Message, Message_Gravity # type: ignore
Expand All @@ -11,6 +11,7 @@ class StepConstants:


class StepColor:
COPPER = cq.Color('gold2')
IC_BODY = cq.Color('gray16')
IC_PIN1_DOT = cq.Color('gray55')
LEAD_SMT = cq.Color('gainsboro')
Expand All @@ -30,7 +31,11 @@ def __init__(self, name: str):
printer.SetTraceLevel(Message_Gravity.Message_Fail)

def add_body(
self, body: cq.Workplane, name: str, color: cq.Color, location: Optional[cq.Location] = None
self,
body: Union[cq.Workplane, cq.Assembly],
name: str,
color: Optional[cq.Color] = None,
location: Optional[cq.Location] = None,
) -> None:
"""
Add a body to the assembly.
Expand Down
Loading