Results 1 to 4 of 4

Thread: Create tight boundary around multiple objects

  1. #1
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Hartford, Michigan
    Posts
    3,194
    Login to Give a bone
    0

    Default Create tight boundary around multiple objects

    The command I am looking for is Shrinkwrap, it is available in some of the verticals, but I am running Vanilla. I was wondering if anyone has anything similar or would have any idea how a program could be written to place a single boundary around a selection set of multiple objects.
    Christopher T. Cowgill, P.E.
    Autodesk Expert Elite
    AEC Collection Civil 3D 2020
    Windows 10

  2. #2
    Active Member ElpanovEvgeniy's Avatar
    Join Date
    2006-09
    Location
    Russia, Moscow
    Posts
    54
    Login to Give a bone
    0

    Default Re: Create tight boundary around multiple objects

    As an example
    Code:
    (defun lst-getboundingbox (lst / maxp minp)
     ;; by ElpanovEvgeniy
     ;; 14.08.2004
     (if (and lst (listp lst))
      (apply
       (function
        (lambda (a1 a2 a3 a4 a5 a6)
         (list
          (list (apply (function min) a1) (apply (function min) a2) (apply (function min) a3))
          (list (apply (function max) a4) (apply (function max) a5) (apply (function max) a6))
         ) ;_  list
        ) ;_ lambda
       ) ;_ function
       (apply
        (function mapcar)
        (cons
         'list
         (mapcar (function (lambda (x)
                            (vla-getboundingbox x 'minp 'maxp)
                            (append (vlax-safearray->list minp) (vlax-safearray->list maxp))
                           ) ;_ lambda
                 ) ;_ function
                 (vl-remove-if
                  (function null)
                  (mapcar (function (lambda (x)
                                     (cond ((= (type x) 'ENAME) (vlax-ename->vla-object x))
                                           ((= (type x) 'VLA-object) x)
                                           (t nil)
                                     ) ;_  cond
                                    ) ;_ lambda
                          ) ;_ function
                          lst
                  ) ;_  mapcar
                 ) ;_ vl-remove-if
         ) ;_  mapcar
        ) ;_  cons
       ) ;_  apply
      ) ;_  apply
     ) ;_ if
    )

  3. #3
    Active Member ElpanovEvgeniy's Avatar
    Join Date
    2006-09
    Location
    Russia, Moscow
    Posts
    54
    Login to Give a bone
    0

    Default Re: Create tight boundary around multiple objects

    Use example

    Code:
    (defun c:test (/ ss)
     (if (setq ss (ssget))
      (lst-getboundingbox
       (mapcar (function vlax-ename->vla-object)
               (vl-remove-if (function listp) (mapcar (function cadr) (ssnamex ss)))
       ) ;_  mapcar
      ) ;_  lst-getboundingbox
     ) ;_  if
    )

  4. #4
    Active Member
    Join Date
    2007-03
    Posts
    57
    Login to Give a bone
    0

    Default Re: Create tight boundary around multiple objects


Similar Threads

  1. Create array within a boundary
    By jpcadconsulting347236 in forum AutoLISP
    Replies: 6
    Last Post: 2017-07-15, 12:51 AM
  2. Space Boundary objects
    By dhallett in forum ACA General
    Replies: 9
    Last Post: 2008-12-17, 08:53 PM
  3. Create boundary in C#
    By humberto in forum Dot Net API
    Replies: 0
    Last Post: 2007-06-03, 08:26 AM
  4. Select all Text Objects within a boundary
    By nokiya2000 in forum AutoLISP
    Replies: 7
    Last Post: 2007-01-22, 11:12 AM
  5. Unable to create Boundary that contains Splines
    By steven.bryan in forum AutoCAD General
    Replies: 13
    Last Post: 2006-06-03, 12:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •