Author Topic: What is the TransMatrix in getsubentity?  (Read 5220 times)

0 Members and 1 Guest are viewing this topic.

Glenn R

  • Guest
Re: What is the TransMatrix in getsubentity?
« Reply #15 on: August 07, 2006, 08:16:55 AM »
Somebody will correct me if my recollection on this is incorrect, but from memory, the tranformation matrix returned from this function (like the LISP nentsel) is a compound matrix. This means that if you picked an entity inside a block reference, which in turn was inside another block reference, it's the resultant matrix of the 2 block ref transforms.

Bryco, can you give me more detail about what you are trying to do and the results you have thus far and I will try and look at this tomorrow.

Cheers,
Glenn.

Bryco

  • Water Moccasin
  • Posts: 1883
Re: What is the TransMatrix in getsubentity?
« Reply #16 on: August 07, 2006, 10:29:39 AM »
I think I've got it Glenn.
The matrix part is working so far, although I should investigate nested blocks a little more.
So I can transform the picked point relative to the blockrecords  picked entity postion.
Here I find the nearest point to the picked ent.
Actually the first step is to put the picked point on the ents plane or elevation so
unless I can also find a matrix for the view this whole thing may have to be rethought.
Now I can get the nearest point.
The math for this is fairly simple for some entities.
Circle, arc, pline, Line no worries.
The spline is too difficult for me so I gave up and use the Vlax curves class.
I'll probably use that for an ellipse as well as following an ellipse normal (the one going in from the tangent)
is a bit above my math.

So I'm close but still have a way to go.
I forgot that  Set Owner = ThisDrawing.ObjectIdToObject(ContextData(i))
will give me the blockreference from getsubentity function
so I may have to go that way.