mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-19 22:24:17 +01:00
better logo design
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user