1
AutoLISP (Vanilla / Visual) / Re: LM:blockreferenceboundingbox
« Last post by domenicomaria on Today at 08:19:19 AM »Marco,
don't you think that maybe there is good reason
to explain the difference between
your code
and LM:blockreferenceboundingbox of Lee Mac ?
I suppose that the Lee Mac code, works also for rotated and not uniformly scaled inserts . . .
don't you think that maybe there is good reason
to explain the difference between
your code
and LM:blockreferenceboundingbox of Lee Mac ?
I suppose that the Lee Mac code, works also for rotated and not uniformly scaled inserts . . .
Code - Auto/Visual Lisp: [Select]
- ;; Block Reference Bounding Box - Lee Mac
- ;; Returns a WCS point list describing a rectangular frame bounding all geometry of a supplied block reference.
- ;; Excludes Text, MText & Attribute Definitions.
- ;; ref - [vla] Block Reference Object
- (
- )
- )
- (refgeom (vlax-vla-object->ename ref))
- )
- )
- (LM:blockdefinitionboundingbox
- )
- )
- )
- )
- ;; Block Definition Bounding Box - Lee Mac
- ;; Returns a WCS point list describing a rectangular frame bounding all geometry of a supplied block definition.
- ;; Excludes Text, MText & Attribute Definitions.
- ;; def - [vla] Block Definition Object
- (vlax-for obj def
- (cond
- )
- )
- )
- )
- )
- (LM:points->boundingbox lst)
- )
- ;; Point to Bounding Box - Lee Mac
- ;; Returns the rectangular extents of a supplied point list
- '(
- )
- )
- )
- )
- )
- ;; RefGeom (gile)
- ;; Returns a list which first item is a 3x3 transformation matrix (rotation, scales, normal)
- ;; and second item the object insertion point in its parent (xref, block or space)
- ;; Argument : an ename
- )
- (list
- (setq mat
- (mxm
- '(
- (1.0 0.0 0.0)
- (0.0 1.0 0.0)
- (0.0 0.0 1.0)
- )
- )
- (mxm
- (list
- '(0.0 0.0 1.0)
- )
- (list
- )
- )
- )
- )
- )
- )
- )
- ;; Matrix x Vector - Vladimir Nesterovsky
- ;; Args: m - nxn matrix, v - vector in R^n
- )
- ;; Matrix Transpose - Doug Wilson
- ;; Args: m - nxn matrix
- )
- ;; Matrix x Matrix - Vladimir Nesterovsky
- ;; Args: m,n - nxn matrices
- )