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

check the deduction point

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
with this code I ask to click the internal point of a closed area to proceed with the desired dash.
How can I verify that the clicked point is actually within a closed area?
Thank you.
Code:
    (setq puntoins (getpoint "\nclicca il punto interno di un'area chiusa"))

        (if puntoins
            (progn
            (setq ctrllayer (tblsearch "layer" colorei))
                (if (= ctrllayer nil)
                            (command "_layer" "_new" colorei "_color" colores colorei "")   
                    );;if
 
            (cond

                ((and (= cods "s") (= codt "s"))    ;; stringa solid
                     (command "_bhatch" "_pr" "_s" puntoins "")
                );;if

                ((and (= cods "n") (= codt "s"))    ;; numero solid
                    (command "_bhatch" "_pr" "_s" puntoins "")
                );;if

                ((and (= cods "s") (= codt "t"))    ;; stringa tratteggio
                    (command "_bhatch" "_pr" "ansi31" (atof disttx) angolou puntoins "")   ;; 0.31496  3.175  0.07874
                );;if

            );;cond         

            (command "_change" "_last" "" "_p" "_layer" colorei "")
          
            );;progn
        );;if
 
I don't understand, with intellicad the command only works if the area is closed, and in the help tells me the same happens for autocad, maybe you want to prevent the change or the creation of the layer?
 
I would like to prevent layer creation but above all I would like to create a loop that works until pointins is placed inside a closed area.
 
a loop that acts looking on the entire design extension?
in that case you first create the layer, and if the loop does not find where to intervene, return to the active layer before the operation and delete the created one.
 

Forum statistics

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

Members online

No members online now.
Back
Top