Done.
Posts made by Greg
-
Using add_3d_text
Hello,
I'm using the command add_3d_text to add text to objects. How do you
change orientation of the text so that it looks like it's on the
surface of a plane? For example, I'd like the text to display at the
top and front of a rectangular cube.Here is a code snippet:
top plane
pt1 = Geom::Point3d.new(x,y,z+h)
pt2 = Geom::Point3d.new(x+w,y,z+h)
pt3 = Geom::Point3d.new(x+w,y+l,z+h)
pt4 = Geom::Point3d.new(x,y+l,z+h)
edges[0] = entities.add_line(pt1, pt2)
edges[1] = entities.add_line(pt2, pt3)
edges[2] = entities.add_line(pt3, pt4)
edges[3] = entities.add_line(pt4, pt1)
face = entities.add_face edges
face.material = mt=Geom::Transformation.new(pt1)
grp=entities.add_group(); grpEnts=grp.entities
grpEnts.add_3d_text("hey mon", 1, "Arial", false, false, 4.inch,
1.mm, 0, false, 0)
grp.move!(t)front plane
pt1 = Geom::Point3d.new(x,y,z)
pt2 = Geom::Point3d.new(x+w,y,z)
pt3 = Geom::Point3d.new(x+w,y,z+h)
pt4 = Geom::Point3d.new(x,y,z+h)
edges[0] = entities.add_line(pt1, pt2)
edges[1] = entities.add_line(pt2, pt3)
edges[2] = entities.add_line(pt3, pt4)
edges[3] = entities.add_line(pt4, pt1)
face = entities.add_face edges
face.material = mt=Geom::Transformation.new(pt4)
grp=entities.add_group(); grpEnts=grp.entities
grpEnts.add_3d_text("hey mon", 1, "Arial", false, false, 4.inch,
1.mm, 0, false, 0)
grp.move!(t)
Thank you.
Greg