x11start
Guest
I have created a lisp that I use habitually to print in succession various tables (formed a4 and a3), arranged in the model space.
basically the command asks to select the tables that I intend to print and as print coordinates use the panes (lwpolyline) that it finds on "zz_format" layers.
(setq selpol(ssget; select entities' (with filter)
(list)
(cons.<and") "and="" "lwpolyline")="" "zz_formato"="" "zz_formato")="" (cons="" -4="" ...="" 0="" 8="" ;="" entita'="" lascia="" le="" passare="" piano="" polilinea="" poste="" solo="" sul="">"
)
)
the problem arises when by mistake, there are two overlapping squares, or one is within another: e.g. the frame of the format that is also located on the "zz_formato" layer, instead of on another layer that the lisp would ignore.
In these cases my design is mistakenly printed 2 times, one taking the correct format and the other taking the frame slightly smaller.
I would therefore like to find a way to find the error, which allows me to stop my lisp and report the wrong pane... with a nice circle!
the workflow I thought of using is as follows:
- I run one by one all selected polylines and found on the "zz_formato" layer.
I create a list containing the tops of every polyline found.
- I create a second list containing the baricentro (point of intersection of the first with the 3rd summit and the 2nd with the 4th).
- I see one by one the baricentres found and I verify if these are inside, not only the list of points considered
but also another list. If so, it means that that point is internal, not only of the figure of which it is centered,
but also of another: So it's a mistake.
I don't know if this is the correct flow or if there are faster solutions: I would like to avoid writing pages and code pages, for
then discover that with 4 vl-xx commands you could do everything!</and")>
basically the command asks to select the tables that I intend to print and as print coordinates use the panes (lwpolyline) that it finds on "zz_format" layers.
(setq selpol(ssget; select entities' (with filter)
(list)
(cons.<and") "and="" "lwpolyline")="" "zz_formato"="" "zz_formato")="" (cons="" -4="" ...="" 0="" 8="" ;="" entita'="" lascia="" le="" passare="" piano="" polilinea="" poste="" solo="" sul="">"
)
)
the problem arises when by mistake, there are two overlapping squares, or one is within another: e.g. the frame of the format that is also located on the "zz_formato" layer, instead of on another layer that the lisp would ignore.
In these cases my design is mistakenly printed 2 times, one taking the correct format and the other taking the frame slightly smaller.
I would therefore like to find a way to find the error, which allows me to stop my lisp and report the wrong pane... with a nice circle!
the workflow I thought of using is as follows:
- I run one by one all selected polylines and found on the "zz_formato" layer.
I create a list containing the tops of every polyline found.
- I create a second list containing the baricentro (point of intersection of the first with the 3rd summit and the 2nd with the 4th).
- I see one by one the baricentres found and I verify if these are inside, not only the list of points considered
but also another list. If so, it means that that point is internal, not only of the figure of which it is centered,
but also of another: So it's a mistake.
I don't know if this is the correct flow or if there are faster solutions: I would like to avoid writing pages and code pages, for
then discover that with 4 vl-xx commands you could do everything!</and")>