anyone, please.
Boy, don't I feel like an idiot. I've had it in my head that difference between nentsel and nentselp was that with nentselp you supplied a point to select the object and with nentsel the user picked the object. I guess it helps to re-read the manual as one's knowledge expands. I can't offer enough thanks to you and all the others who have offered help. I'm still reviewing all the information, but I'm certain that what I need is here. Thank you all.
That's great Luis! It sounds pretty neat. Guess there's not much more I can say without knowing your formula. I would love to learn from it if you can share, but I understand if you can't. I know you already give a lot to this community, and thank you for that. Thank You, James
James, I made several tests with your 3D sample inserted as a block, copied all over, scaled, non-uniform, with 20 deep-nest, everything I guess, and yes it picks and highlights the entities in the case of lines, other objects it just return their points... I wrote the function for an architectural company, that is one of the reasons, and the other is that I think this type of code must be kept private or in just few hands. LE.
Joe, I've been digesting the code and it works great! I can't thank you enough for sharing. It will be a while before I can fully understand it. I thought that I would only need to translate points from OCS to WCS, but as it turns out, I have one situation where I need to translate from WCS to OCS. I can't seem to get it to work that way. I am using the following code. (TransPt point blocklist 0 2) I don't think I'm doing anything wrong. Any suggestions? TIA, Micheal
James, Just want to underline what you said below. IMO, transforming a point is a subset of the larger or equal issue which involves transforming objects. I don't mean to discount what Luis suggested. A purely point oriented method as I understand it. But given my experience, once you find a need to transform points in this manner, the rest will follow sooner or later. So you might as well build a set of functions which deal with all cases. As you and I have tried to do. Regards Joe
Joe, I TOTATLY agree with you, my point was to let others know the possibility of a simpler or other way to calculate these issues. I also, have and use matrix calculations and transformations, per my own particular needs.... I came up with what you have seen... and it is a way I normally tend to do and use for my own.... this habit is since I was a student.... never did or followed as the books nor as my teachers want it..... anyway... the Z version of my code is going your way... and again is not intended to change or break any rules. Later my friend, Luis.
Joe, I test your functions using the 3D sample provided by James, in a normal insertion 1:1 uniform works, but on a non-uniform, scaled, rotated not. If I use mine.... it returns the points
also, does not work with xrefs.... Joe, I need to debug a little more my routine and once is ready... I would let you know.
Hi Luis, Sorry about my slow response. Work gets in the way... I'm aware of the limitations you mentioned. The header comments associated with ObjMatrix say as much. Regarding non-uniformly scaled blocks, my code intentionally returns nil in that case. It's a trade off, because the transformby method doesn't deal with a non-uniform matrix. As mentioned elsewhere, the functions are intended do things other than simply transform a point. I believe if the equal scale checking is removed, the functions would return correct matrices given non-uniformly scaled block references. Someone might rightly suggest I chose to cripple the functions when I shouldn't have. My reply would be they are designed for my use. BTW, it sure would be nice if Autodesk provided a function to return a 4x4 matrix (OCS>WCS and WCS>OCS) from a block reference argument. Put this torture to bed once and for all. Regards Joe
Luis, I use those functions with xrefs every day. That was the motivation behind them in the first place. Regards Joe