Thread: How to 'crop' a g-code
Hybrid View
-
25-11-2016 #1
-
25-11-2016 #2
-
25-11-2016 #3
In geometry, the term for what you want to do is 'clipping'
Try a search for 'polygon clipping'
It seems like a simple task but is made difficult by lots of tricky edge cases.
If you can code in c++ or c# or Delphi i can recommend Angus Johnsons excellent freeware 'Clipper' http://www.angusj.com/delphi/clipper.php
Cheers
-
The Following User Says Thank You to Greeny For This Useful Post:
-
26-11-2016 #4You think that's too expensive? You're not a Model Engineer are you? :D
-
13-08-2017 #5
A late response on this problem...
First of all thanks a lot Greeny for pointing me in the right direction!
For a programmer it was a 5 minutes job. The solution was simpler than the clipper library (certainly included in the library as well), it is called ray casting algorithm.
Here are code examples.
Nick, I'm sorry to tell you that this complex mathematical problem is done by a computer in less than a second, by comparing 50k points against a 12 points defined polygon.
-
13-08-2017 #6
Paulus,
I'm sorry to have to tell you that how quickly a computer runs a chink of code has no relationship to the complexity of the maths used by the programmer to address the problem or how smart the programmer had to be to write the code :D
Or could any dummy have done the job? ;-)Last edited by magicniner; 13-08-2017 at 10:07 PM.
You think that's too expensive? You're not a Model Engineer are you? :D
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
A little bit of G code help please!
By njhussey in forum Programmers CornerReplies: 19Last Post: 16-11-2015, 03:36 PM -
Anyone got some 2.5D G-code please ?
By dudz in forum Programmers CornerReplies: 5Last Post: 22-06-2013, 11:21 PM -
Cambium Code Web Tools – Parametric G-code Generation
By CambiumMachines in forum Manufacturer NewsReplies: 0Last Post: 09-01-2013, 04:56 AM -
G Code help
By moose007 in forum Programmers CornerReplies: 4Last Post: 22-05-2009, 11:39 AM
Bookmarks