I am looking for how to draw a text entity in 3d, where I know the 3d ins point, and the plane it should be flat to.
I have not drawn text or inserted blocks programatically before where the plane they lie on is not flat.
I have done it before by setting a ucs and drawing stuff, but now I want no switches of UCS involved.
So far, I think I must figure out the OCS of the plane I want, but am not sure what to do from there.
I'm looking around so will post what I find.
I poked around a bit, and found a good set of posts here:
What that code lets you do is modify an existing entity to be transformed by a start and end normal vector.
That is definate progress, as it can all be done programatically, no UCS flat to desired normal direction necessary.
vla-transformby is the key function, you just have to know how to construct the matricies, which would take me months on my own.
I get what they are, but just have not reviewed the math in a long time.
So this is good, but I would prefer to make an entity correctly transformed, using entmake.
I have a feeling its just setting the 210 group to the OCS matrix (code on the thread liked to), and finding the correct 10 and 11 groups for the OCS.
I bet its right in front of me, but I am not sure how to translate a point in WCS to the OCS, probably just a trans function call...
What would the 11 group be though?
On text flat to WCS, it is always (0 0 0), I need to read on that group.
I see, 11 group is 0 0 0 even for text not normal to WCS, IF it is justified as left/baseline.
So whatever trans I do for 10 group, I must do for 11 group most likely.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.