Posts

Showing posts from April, 2012

Mending my mistakes

Image
While I am not a king (inside joke for Spaniards only) I do make mistakes quite often. One of them was not to disconnect my RAMPS-controlled 3D printer from the computer and mains supply for a quick solder job (just one pin of heating resistor was loose just before starting a print ...). Unfortunately, my trustry JBC solder of the last twenty years was not properly isolated anymore and I had a big flash and all the house lights went down.

When I restored the power the computer was booting up happily, the printer power supply light was on but the printer was dead and the computer was unable to detect the printer anymore. All the lights on the board and on the Arduino Mega were off too and my system shown a warning message that USB port was disconnected for excessive power consumption: no good news at all, but at least I learned the USB port was not completely dead.

I removed the RAMPS board from the Arduino Mega, connected it to the USB cable and then the lights come back on, surprisin…

Of polygon offsetting

Image
Last week I have been researching about a task I initially did not even know the name: Polygon offsetting. A polygon offset (in case you ignored it too) is a computer graphics primitive (though it can be done by hand too) that given a polygon will trace a inner or outer version of it that it is either totally contained inside the polygon or that it will contain it entirely (if you want an outer offset) whose perimeter will be at a constant distance from the perimeter of the initial polygon. And given that I seriously doubt that my explanation is good enough, here you have an image (of an inner offset, gray-line perimeter):


I was looking for an available implementation of this process, as I wanted to be able to use it for an ongoing project. This time Google did not helped much and though I was able to find the question I borrowed the picture above from and that CGAL library did have polygon offset as one of the functions or that there was Clipper library or a Python implementation, no…