Can Children on path be broken apart? #607
Answered
by
danmarshall
mcdonaldzachary
asked this question in
Q&A
-
Hello when using children on path for example the text on arc demo. Can the path information of individual characters be accessed? I've tried my best to break them apart or access internal arrays but haven't had any luck. I'm specifically looking for location and bounding box |
Beta Was this translation helpful? Give feedback.
Answered by
danmarshall
Sep 17, 2024
Replies: 1 comment 2 replies
-
Yes, you can get characters of a Text model by their index. I've added this to the end of the function: This gets the first character by const m = makerjs.measure.modelExtents(this.models.topText.models[0]);
const bbox = new makerjs.models.Rectangle(m);
this.models.bbox = bbox; |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
mcdonaldzachary
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, you can get characters of a Text model by their index. I've added this to the end of the function:
This gets the first character by
[0]
, gets its bounding box, then creates a rectangle of it: