AutoLISP guru Peter Jamtgaard submits two routines that translate points between the world and a block objects coordinate system, and vice versa. These routines handle irregular normal vectors and non-uniform scaling, and are very useful tools when working with blocks and components of blocks relative to the WCS. These functions are to be called from within other code, and require two arguments. The first argument is a block in the form of a VLA-Object, and the second argument is a 3D point. This is a great example of concise AutoLISP code.
|