• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

surround a rectangle in a polylinea

caddista2015

Guest
Hello everyone,
I am new to the forum and I wanted to ask if someone knows how to indicate that how you should use to automatically draw a rectangle perfectly circumscribed to a polyline of any form.
the rectangle must therefore have as base the maximum quota of the x axis of my polylinea and as height the maximum quota of the axis y.

Alternatively, it might be enough to understand how to identify the maximum x and y odds within a polyline that can have any form

thanks for the possible answer
 
I don't think it's possible with a single command, maybe with a script or a lisp..... I don't know if anyone's already done it.
to know the x and y odds is relatively simple, _dist command where you take the leftmost point of your beads and mix the distance between it and the + point to the right.
the distance, of course it will be oblique, but if you look good among the information that returns you on the command line you will also find the delta x (or y in the case of point + low and + high).
that is the x (or y of course) distance between your points.
attention that autocad tends to round the result, the greater the numbers after the decimal separator and the greater the accuracy.
 
use the vla-getboundingbox function that returns the dimensions of the encumbrance of any entity. the points obtained from the function must be transformed with the safearray-value function.

(defun c:ingombro ()
(vla-getboundingbox (vlax-ename->vla-object (car(entsel "\nselect entity: (i)) 'pointbassosx 'pointaltodx'
(setq puntobassosx(safearray-value puntobassosx) puntoaltodx (safearray-value puntoaltodx))
)
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top