pseudoclay Posted March 8, 2021 Posted March 8, 2021 Good Day AllI've turned to forum advice and I really hope someone can help me.I have to create 13 wall panels that will be laser cut. The panel drawings were done in Inventor and I'm editing the flat pattern in AutoCAD. If you look at the attached images of one of these panels you will get the idea, each panel cut-out "pattern" must be randomly generated and I was hoping someone could give me some advice as doing this manually, by hand, is insane and after all we work on machines and machines can automate right!? I am also attaching a flat pattern of one of the panels (they all have different height and width dimensions too). Just as a side note I did try a scatter script but it doesn't give the appropriate result because if you look closely you will see the dashes are inline but randomly knocked out. I was thinking maybe a random dashed line script or procedure that can then be exploded to rectangular shapes for DXF export or a custom random hatch but I don't know how to do either. Hope I'm making sense. Thank you in advance. Quote
BIGAL Posted March 10, 2021 Posted March 10, 2021 (edited) Interesting can be done need some rules like edge clearance min and max length slot slot gap again min max obvious slot height slot spacing How many are variables. Lee-mac has a random number generator so can work out the min and max's. This uses the multi getvals.lsp in Cadtutor\downloads any one please feel free to use. If want to post random slot code, note "ans" is a list of strings. (if (not AH:getvalsm)(load "Multi Getvals.lsp")) (setq ans (AH:getvalsm (list "Enter slot details " "Top edge" 5 4 "100" "Bottom edge " 5 4 "100" "Side edge " 5 4 "60" "Slot height" 5 4 "20" "Slot min len" 5 4 "64" "Slot max len" 5 4 "350" "Slot horizontal space min " 5 4 "100""Slot horizontal space max " 5 4 "250" "Slot row spacing " 5 4 "100"))) Edited March 10, 2021 by BIGAL 2 Quote
pseudoclay Posted March 10, 2021 Author Posted March 10, 2021 17 hours ago, BIGAL said: Interesting can be done need some rules like edge clearance min and max length slot slot gap again min max obvious slot height slot spacing How many are variables. Lee-mac has a random number generator so can work out the min and max's. This uses the multi getvals.lsp in Cadtutor\downloads any one please feel free to use. If want to post random slot code, note "ans" is a list of strings. (if (not AH:getvalsm)(load "Multi Getvals.lsp")) (setq ans (AH:getvalsm (list "Enter slot details " "Top edge" 5 4 "100" "Bottom edge " 5 4 "100" "Side edge " 5 4 "60" "Slot height" 5 4 "20" "Slot min len" 5 4 "64" "Slot max len" 5 4 "350" "Slot horizontal space min " 5 4 "100""Slot horizontal space max " 5 4 "250" "Slot row spacing " 5 4 "100"))) Hi Bigal What a legend! Thank you very much this is very helpful, I will give it a try! Quote
BIGAL Posted March 11, 2021 Posted March 11, 2021 No worries have a go use Lee-mac random number lisp, if you get stuck ask here lots will help particuarly if you have a go 1st. Note you need to convert the string list in ans to numbers. (setq topedge (atof (nth 0 ans))) (setq bitedge (atof (nth 1 ans))) .......... I will try to find I have a random slots on any any angle totally free hand its like a starburst was done for laser cut panels did a couple of years ago, just draw random line and it has a width and auto trims all other slots. Random number example (LM:randrange 65 350 ) 161 (LM:randrange 65 350 ) 256 Quote
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.