mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-05 18:20:46 -08:00
add build123d logo (former version of the logo)
This commit is contained in:
parent
6e6233c6b9
commit
6e06a14cb5
5 changed files with 65 additions and 25 deletions
BIN
docs/assets/examples/example_build123d_logo_01.png
Normal file
BIN
docs/assets/examples/example_build123d_logo_01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
BIN
docs/assets/examples/thumbnail_build123d_logo_01.png
Normal file
BIN
docs/assets/examples/thumbnail_build123d_logo_01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
|
|
@ -34,6 +34,11 @@ Most of the examples show the builder and algebra modes.
|
|||
:link: examples-build123d_customizable_logo
|
||||
:link-type: ref
|
||||
|
||||
.. grid-item-card:: Former build123d Logo |Builder| |Algebra|
|
||||
:img-top: assets/examples/thumbnail_build123d_logo_01.png
|
||||
:link: examples-build123d_logo
|
||||
:link-type: ref
|
||||
|
||||
|
||||
.. NOTE 01: insert new example thumbnails above this line
|
||||
|
||||
|
|
@ -125,6 +130,33 @@ It shows how text is created, placed and sizes of text is calulated to define si
|
|||
:start-after: [Code]
|
||||
:end-before: [End]
|
||||
|
||||
|
||||
.. _examples-build123d_logo:
|
||||
|
||||
Former build123d Logo
|
||||
--------------------------------
|
||||
.. image:: assets/examples/example_build123d_logo_01.png
|
||||
:align: center
|
||||
|
||||
|
||||
This example creates the former build123d logo (new logo was created in the end of 2023).
|
||||
|
||||
Using text and lines to create the first build123d logo.
|
||||
The builder mode example also generates the SVG file `logo.svg`.
|
||||
|
||||
|
||||
.. dropdown:: |Builder| Reference Implementation (Builder Mode)
|
||||
|
||||
.. literalinclude:: ../examples/build123d_logo.py
|
||||
:start-after: [Code]
|
||||
:end-before: [End]
|
||||
|
||||
.. dropdown:: |Algebra| Reference Implementation (Algebra Mode)
|
||||
|
||||
.. literalinclude:: ../examples/build123d_logo_algebra.py
|
||||
:start-after: [Code]
|
||||
:end-before: [End]
|
||||
|
||||
.. NOTE 02: insert new example thumbnails above this line
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,33 +1,31 @@
|
|||
"""
|
||||
name: "build_123d_logo.py"
|
||||
title: "Former build123d Logo"
|
||||
authors: "Gumyr"
|
||||
license: "http://www.apache.org/licenses/LICENSE-2.0"
|
||||
created: "2022-08-05"
|
||||
modified: "2023-07-31"
|
||||
|
||||
name: build123d_logo.py
|
||||
by: Gumyr
|
||||
date: August 5th 2022
|
||||
description: |
|
||||
This example creates the former build123d logo (new logo was created in the end of 2023).
|
||||
|
||||
desc:
|
||||
Using text and lines to create the first build123d logo.
|
||||
The builder mode example also generates the SVG file `logo.svg`.
|
||||
|
||||
This example creates the build123d logo.
|
||||
|
||||
license:
|
||||
|
||||
Copyright 2022 Gumyr
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
has_builder_mode: true
|
||||
has_algebra_mode: true
|
||||
image_files:
|
||||
- "example_build123d_logo_01.png"
|
||||
"""
|
||||
# [Imports]
|
||||
from build123d import *
|
||||
from build123d import Shape
|
||||
from ocp_vscode import *
|
||||
|
||||
# [Parameters]
|
||||
# - none
|
||||
|
||||
# [Code]
|
||||
with BuildSketch() as logo_text:
|
||||
Text("123d", font_size=10, align=(Align.MIN, Align.MIN))
|
||||
font_height = logo_text.vertices().sort_by(Axis.Y)[-1].Y
|
||||
|
|
@ -120,3 +118,4 @@ show_object(two, name="two")
|
|||
show_object(three_d, name="three_d")
|
||||
show_object(extension_lines, name="extension_lines")
|
||||
show_object(build, name="build")
|
||||
# [End]
|
||||
|
|
@ -1,6 +1,14 @@
|
|||
"""
|
||||
for details see `build123d_logo.py`
|
||||
"""
|
||||
# [Imports]
|
||||
from build123d import *
|
||||
from ocp_vscode import *
|
||||
|
||||
# [Parameters]
|
||||
# - none
|
||||
|
||||
# [Code]
|
||||
logo_text = Text("123d", font_size=10, align=Align.MIN)
|
||||
font_height = logo_text.vertices().sort_by(Axis.Y).last.Y
|
||||
|
||||
|
|
@ -30,7 +38,7 @@ l2 = Line(
|
|||
)
|
||||
extension_lines = l1 + l2
|
||||
extension_lines += Pos(*(l1 @ 0.5)) * arrow_left
|
||||
extension_lines += (Pos(*(l2 @ 0.5)) * Rot(z=180)) * arrow_left
|
||||
extension_lines += (Pos(*(l2 @ 0.5)) * Rot(Z=180)) * arrow_left
|
||||
extension_lines += Line(l1 @ 0.5, l1 @ 0.5 + Vector(dim_line_length, 0))
|
||||
extension_lines += Line(l2 @ 0.5, l2 @ 0.5 - Vector(dim_line_length, 0))
|
||||
|
||||
|
|
@ -40,5 +48,6 @@ build = p1 * build_text
|
|||
|
||||
cmpd = Compound.make_compound([three_d, two, one, build, extension_lines])
|
||||
|
||||
if "show_object" in locals():
|
||||
show_object(cmpd, name="compound")
|
||||
show_object(cmpd, name="compound")
|
||||
|
||||
# [End]
|
||||
Loading…
Add table
Add a link
Reference in a new issue