Possible to add custom command line commands?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible to add custom command line commands?

NateNate
Hello! Is it possible to create custom commands to type into the command line? A little background what I need to do.

I own a laser fab shop and we received a job where the customer created an image that is 30ft x 30ft, and made entirely of different size holes. The differing hole sizes are what create the image. The entire pattern consists of just under 250,000 holes. (YIKES!!!) I need to be able to split this up to be able to cut it from smaller sheets that actually fit my laser. Solidworks absolutely won't even begin doing anything with it because of its size, but Librecad has no problem!

I want to be able to type in a series of commands that will draw a rectangle starting at a point I calculated, (that's no problem) then select everything inside that shape, invert the selection (so then everything outside the shape is selected) then delete what is selected. That way I'm left with only the holes inside my rectangle.

The problem I'm finding however is that the only selection options available in the command line are select all and deselect all, neither of which are helpful.

Is it possible to create custom commands?
Reply | Threaded
Open this post in threaded view
|

Re: Possible to add custom command line commands?

flywire
Why can't you just cut the lines with the laser and leave the material from the holes on the table? I suppose a sheet is 8' x 20'?
Reply | Threaded
Open this post in threaded view
|

Re: Possible to add custom command line commands?

NateNate
I need to create the smaller file first. I can't load the entire 30x30 file into the laser it would just tell me out of range.

I've attached an image showing what I'm working with. I can do it manually, but it will be around 50 sheets and that's a lot of work to go through to select and delete every time.

The square in the center is the sheet size I'm working with, which is around 3ft x 7ft.

Capture.JPG
Reply | Threaded
Open this post in threaded view
|

Re: Possible to add custom command line commands?

dellus
A suggestion: Draw a grid providing the rectangles in the background on an extra layer. Use that to pull up a selection window with invert selection following. Still you would have to do this 50 times, but maybe still less effort than developing something like a script or plugin for a one-time task?
Reply | Threaded
Open this post in threaded view
|

Re: Possible to add custom command line commands?

ag123
In reply to this post by NateNate
there are some tools like ezdxf (python scripting) not librecad
https://ezdxf.mozman.at/docs/introduction.html
https://github.com/mozman/ezdxf
that may help. but that's really programming down to the file / model level extracting entities
and reconstructing files.
one'd need to weigh if it is after all worth the effort. or perhaps, one can search the web for pre-made solutions probably non-free