Skip to content

Commit

Permalink
hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PingHsunTsai committed Jun 25, 2024
1 parent e28d162 commit 752fd98
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
from compas.geometry import Box
from compas.geometry import Translation
from compas_viewer import Viewer
from compas_viewer.scene import Tag

box1 = Box.from_width_height_depth(5, 1, 1)
box2 = Box.from_width_height_depth(1, 5, 1)

t = Tag("EN", (0, 0, 0), height=50)
viewer = Viewer()

# Simple list of objects
group1 = viewer.scene.add([box1, box2])
group1 = viewer.scene.add([box1, box2, t])


# with kwargs for each object
Expand Down
13 changes: 13 additions & 0 deletions scripts/tag.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

from compas.geometry import Box
from compas_viewer import Viewer
from compas_viewer.scene import Tag

box1 = Box.from_width_height_depth(5, 1, 1)
box2 = Box.from_width_height_depth(1, 5, 1)
t = Tag("EN", (5, 1, 1), height=50)
viewer = Viewer()

# Simple list of objects
group1 = viewer.scene.add([box1, box2, t])
viewer.show()
Binary file not shown.
1 change: 1 addition & 0 deletions src/compas_viewer/scene/tagobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def make_buffers(self):
}

def make_text_texture(self):
print(self.geometry.font)
face = Face(self.geometry.font)
# the size is specified in 1/64 pixel
face.set_char_size(64 * 48)
Expand Down

0 comments on commit 752fd98

Please sign in to comment.