BASE PLATE

BASE PLATE

Anonymous
Not applicable
1,784 Views
4 Replies
Message 1 of 5

BASE PLATE

Anonymous
Not applicable

Hello All:good.jpgmess.jpg

 

I´am doing a routine for a baseplate but the holes (circles are in different places), It´s a mess, heres is my code, picture of the result, and a picture of how is I want it. 

 

I´am a beginner in autolisp.

 

(defun C:PLACABASE ( / pt1 pt2 pt3 pt4 Ancho Alto Radio Anchoejex Anchoejey agujero11 agujero12 agujero21 agujero32)
(command "-layer" "set" "Acero Estructural" "")
(setq Ancho (getint "\nInserte Ancho de placa: "))
(setq Alto (getint "\nInserte Alto de placa: "))

(setq pt1 '(0 0 0))
(setq pt2 (list Ancho 0 0))
(setq pt3 (list Ancho Alto 0))
(setq pt4 (list 0 Alto 0))
(command "line" pt1 pt2 pt3 pt4 "c")

(setq Radio (getint "\nInserte Radio de Agujero: "))
(setq Anchoejex (getint "\nInserte distancia de separacion para el eje x: "))
(setq Anchoejey (getint "\nInserte distancina de separacion para el eje y: "))
(setq agujero11 (+ Anchoejex 0))
(setq agujero12 (- Alto Anchoejey))
(setq agujero21 (- Ancho Anchoejex))
(setq agujero32 (+ Anchoejey 0))

(command "circle" agujero11 agujero12 Radio
"circle" agujero21 agujero12 Radio
"circle" agujero11 agujero32 Radio
"circle" agujero21 agujero32 Radio
))

 

If Somebody can help me with this

Thank you

0 Likes
Accepted solutions (1)
1,785 Views
4 Replies
Replies (4)
Message 2 of 5

Sea-Haven
Mentor
Mentor
Accepted solution

Simple fix 

(command "circle" (list agujero11 agujero12) Radio
"circle" (list agujero21 agujero12) Radio
"circle" (list agujero11 agujero32) Radio
"circle" (list agujero21 agujero32) Radio
))

I suggest look at dynamic blocks base plate is good example.

0 Likes
Message 3 of 5

Anonymous
Not applicable

This is amazing I have weeks with this and you correct it in a few seconds...

 

I will try to put the complete work with types of annotation, define scale etc.

 

 

Thank you very much for your help 

0 Likes
Message 4 of 5

Sea-Haven
Mentor
Mentor

A base plate is ideal as a dynamic block you can put in place rules about the hole dia to edge distance just insert then change properties all done. The holes are done by the dia = 1 known radius the others re-adjust.

0 Likes
Message 5 of 5

fusiongetup
Explorer
Explorer

and getpoint user?

 

thx

0 Likes