hamza jamali Posted April 19 Share Posted April 19 (edited) This is the code which draws layout of tire mold, since it comprises of circles so we need to trim the extra part to get it into shape but not manually , like we want to trim these extra parts of circles through LISP code in one go along with the former code of basic layout of tire mold. This is the main code without trimming. (defun c:Cavity () (setq pt1 (getpoint "\nEnter lower limit : ")) (setq pt2 (getpoint "\nEnter upper limit : ")) (command "RECTANG" pt1 pt2) (setq radius1 (getreal "\nEnter the radius of carcass: ")) (command "_circle" "-3530.0623,-75818.2052" radius1) (setq radius2 (getreal "\nEnter the radius of carcass: ")) (command "_circle" "-171.624706,-745.8675" radius2) (setq radius3 (getreal "\nEnter tread radius r3: ")) (command "_circle" "187.4307,-574.1347" radius3) (setq radius4 (getreal "\nEnter the radius r4: ")) (command "_circle" "211.2598,48.275" radius4) (setq radius5 (getreal "\nEnter shoulder radius r5: ")) (command "_circle" "244.5246,221.1249" radius5) (setq radius6 (getreal "\nEnter the side wall radius : ")) (command "_circle" "217.8243,190.4973" radius6) (setq radius7 (getreal "\nEnter the radius r7: ")) (command "_circle" "251.5189,222.2737" radius7) (setq radius8 (getreal "\nEnter the radius r8: ")) (command "_circle" "228.6415,196.2916" radius8) (setq radius9 (getreal "\nEnter the radius r9: ")) (command "_circle" "228.6415,196.2916" radius9) (setq radius10 (getreal "\nEnter the bead radius r10: ")) (command "_circle" "273.4017,149.6976" radius10) (setq radius11 (getreal "\nEnter the bead radius r11: ")) (command "_circle" "273.4017,149.6976" radius11) (setq startPt1 (list 174.5049 135.5347)) (setq endPt1 (list 174.5155 259.3558)) (command "_line" startPt1 endPt1 "") (setq startPt2 (list 169.6934 196.2801)) (setq endPt2 (list 288.1501 196.2801)) (command "_line" startPt2 endPt2 "") (princ) ) Radius are.. R1 76155.1711 R2 1007.9693 R3 820 R4 205 R5 29.0000 R6 62.1080 R7 20.0000 R8 54.6102 R9 54.6102 R10 10.0000 R11 10.0000 lower limit 420 upper limit 297 Edited April 21 by SLW210 Added Code Tags! Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 20 Share Posted April 20 (edited) Post a before and after dwg. Not sure about the R1 value. Edited April 20 by BIGAL Quote Link to comment Share on other sites More sharing options...
devitg Posted April 20 Share Posted April 20 On 4/19/2024 at 10:02 AM, hamza jamali said: This is the code which draws layout of tire mold, since it comprises of circles so we need to trim the extra part to get it into shape but not manually , like we want to trim these extra parts of circles through LISP code in one go along with the former code of basic layout of tire mold. This is the main code without trimming. (defun c:Cavity () (setq pt1 (getpoint "\nEnter lower limit : ")) (setq pt2 (getpoint "\nEnter upper limit : ")) (command "RECTANG" pt1 pt2) (setq radius1 (getreal "\nEnter the radius of carcass: ")) (command "_circle" "-3530.0623,-75818.2052" radius1) (setq radius2 (getreal "\nEnter the radius of carcass: ")) (command "_circle" "-171.624706,-745.8675" radius2) (setq radius3 (getreal "\nEnter tread radius r3: ")) (command "_circle" "187.4307,-574.1347" radius3) (setq radius4 (getreal "\nEnter the radius r4: ")) (command "_circle" "211.2598,48.275" radius4) (setq radius5 (getreal "\nEnter shoulder radius r5: ")) (command "_circle" "244.5246,221.1249" radius5) (setq radius6 (getreal "\nEnter the side wall radius : ")) (command "_circle" "217.8243,190.4973" radius6) (setq radius7 (getreal "\nEnter the radius r7: ")) (command "_circle" "251.5189,222.2737" radius7) (setq radius8 (getreal "\nEnter the radius r8: ")) (command "_circle" "228.6415,196.2916" radius8) (setq radius9 (getreal "\nEnter the radius r9: ")) (command "_circle" "228.6415,196.2916" radius9) (setq radius10 (getreal "\nEnter the bead radius r10: ")) (command "_circle" "273.4017,149.6976" radius10) (setq radius11 (getreal "\nEnter the bead radius r11: ")) (command "_circle" "273.4017,149.6976" radius11) (setq startPt1 (list 174.5049 135.5347)) (setq endPt1 (list 174.5155 259.3558)) (command "_line" startPt1 endPt1 "") (setq startPt2 (list 169.6934 196.2801)) (setq endPt2 (list 288.1501 196.2801)) (command "_line" startPt2 endPt2 "") (princ) ) Radius are.. R1 76155.1711 R2 1007.9693 R3 820 R4 205 R5 29.0000 R6 62.1080 R7 20.0000 R8 54.6102 R9 54.6102 R10 10.0000 R11 10.0000 lower limit 420 upper limit 297 @hamza jamali, find attached the lsp and result DWG , and try to explain what you wish to do. tire mold.dwg tiremold fix values.lsp Quote Link to comment Share on other sites More sharing options...
SLW210 Posted April 21 Share Posted April 21 Please use Code Tags! (<> in the editor toolbar) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.