Vertical anchoring of 3D text
-
Hello,
Is there a way in the API to vertically anchor 3D text?
http://support.google.com/sketchup/bin/answer.py?hl=en&answer=95665
This page here (at the bottom) defines how to do it for 2D text, but I couldn't find a way to do the same for 3D text via the API.Thanks,
Arun Yoganandan -
Via the API 3dText is always made at the origin, at the bottom-left corner of its bounding box.
If you want to control its location make an empty group, add the 3dText to its entities collection rather than the model's entities, then transform that group to the required location or rotation etc... -
@tig said:
Via the API 3dText is always made at the origin, at the bottom-left corner of its bounding box.
If you want to control its location make an empty group, add the 3dText to its entities collection rather than the model's entities, then transform that group to the required location or rotation etc...TIG thanks for your reply. There might be some misunderstanding in the way I state my question. I would like to anchor the text vertically,i.e stack up the alphabets one over the other
rather than have the side-by-side text rotated 90 degrees to become vertical. If I rotate as a group, the text will end up sideways but I want them to be upright. Hope My explanation is clear. -
L
I
K
ET
H
I
S
? -
The text-string affects the result.
"HORIZONTAL"HORIZONTAL
"V\nE\nR\nT\nI\nC\nA\nL"
V
E
R
T
I
C
A
LThere is a 'flag' inside the 3dText arguments which controls multi-line text's alignment - left/right/center... by default an 'I' will align to the left of a 'M' on another line [this varies with the Font used], but by using 'center' alignment you can get them to be located about a common 'vertical axis'...
The 3dText will still be flat on the ground... as I said before if you add it into a group you can then manipulate that group [or its entities] using various transformations to relocate it and/or stand it vertically, rotate it etc...
-
@tig said:
The text-string affects the result.
"V\nE\nR\nT\nI\nC\nA\nL"V
E
R
T
I
C
A
LThat did it! thank you so much!
Advertisement