better logo design

This commit is contained in:
Yeicor
2024-02-18 17:41:15 +01:00
parent 613fe9269a
commit 27944ab9cd
2 changed files with 20 additions and 7 deletions

View File

@@ -4,12 +4,21 @@ import os
from OCP.TopoDS import TopoDS_Shape
from build123d import *
from build123d import Shape
def build_logo() -> TopoDS_Shape:
"""Builds the CAD part of the logo"""
with BuildPart(Plane.XY.offset(30)) as logo_obj:
Box(10, 20, 30)
with BuildPart(Plane.XY.offset(50)) as logo_obj:
Box(22, 40, 30)
fillet(edges().filter_by(Axis.Y).group_by(Axis.Z)[-1], 10)
offset(solid(), 2, openings=faces().group_by(Axis.Z)[0] + faces().filter_by(Plane.XZ))
text_at_plane = Plane.YZ
text_at_plane.origin = faces().group_by(Axis.X)[-1].face().center()
with BuildSketch(text_at_plane.location):
Text('Yet Another\nCAD Viewer', 7, font_path='/usr/share/fonts/TTF/OpenSans-Regular.ttf')
extrude(amount=1)
return logo_obj.part.wrapped