Jump to content

Recommended Posts

Posted

Good Day All

I'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!? icon_smile.gif 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.

File_000.jpeg

DXF screen grab.jpg

Drawing Panel.jpg

Posted (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")))

 

image.png.fe618f5bb7f5ca6e8a805c7e898aa454.png

 

Edited by BIGAL
  • Like 2
Posted
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")))

 

image.png.fe618f5bb7f5ca6e8a805c7e898aa454.png

 

 

 

Hi Bigal

 

What a legend! Thank you very much this is very helpful, I will give it a try!

 

 

Posted

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

 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...