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

difference between a polyline and a rectangle

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
I observed that there is a difference between a closed polyline manually drawn and a rectangle drawn with the appropriate command.
the following code;
Code:
 (defun cdrs (key lst / pair rtn primo cx cy)

(setq stringaout ")
(setq cont 0)

(while (setq pair (assoc key lst))
(setq rtn (cons (cdr pair) rtn) lst (cdr (member pair lst)))
(first setq (car rtn))
(setq cont (1+ cont))

(setq cx (car first))
(setq cy (cadr primo))

(setq stringout (strcat stringout (rtos cx 2 3) "," (rtos cy 2 3) "#")
);;while

);;fun fine cdrs

---------------------------------------------
..............................................................................

(setq entita (entsel "\nseleziona l'oggetto da dimensionare (tasto destro del mouse per surface area))))
(setq vertici (cdrs 10 (entget (car entita))))
produces the list of tops of the selected polylinea.
in case, for example, it is a rectangle, if this has been tracked with a polyline, the cont variable will be equal to 5 (5 clicks of the mouse) while if tracked with the command "_rectangle" the cont variable will be equal to 4.
This makes it impossible to distinguish the two forms by selection.
Does anyone have an idea?
Thank you.
 
wrong.
When you draw a 4-sided polygon, enter 4 points and c to close, not 5 and then close.
The fifth point coinciding the first does not serve.
 

Forum statistics

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

Members online

No members online now.
ciao
Back
Top