[OpenSCAD] Maths problem = finding corners of an intersection of 2 polygons

Alex Gibson alex at alexgibson.net
Sat Jul 20 20:20:02 EDT 2019


Hi all

 

I have a very practical problem - a failed 3D print which is over 10 DAYS in
with as many to go, and as it stopped cleanly, perfectly recoverable IF I
can re-register the X and Y axis, which I want to try to do by re-playing
just a section of the diamond pattern infill, and jogging in x and Y until
everything lines up perfectly.

 

The attached, hacked down GCODE file is one attempt to do this, by isolating
just a few lines of the infill.  This would work.  Even better would be just
to print the square at the intersection of these lines.



 

Using the following lines of OpenSCAD I have been able to draw a square
which perfectly corresponds to the intersection:

 

intersection()

                {

 
polygon(points=[[378.546,352.217],[458.698,272.065],[384.642,252.783],[324.2
04,313.221]]);

 
polygon(points=[[379.141,252.143],[470.219,343.221],[403.88,370.221],[301.29
4,267.635]]);

                }



 

Is anybody able to point me to either 

1)      Suitable mathematical equations to find the corner co=ordinates of
this polygon?

2)      A way to get OpenSCAD to output the corner co-ordinates?

 

Thanks!!!

 

 

Alex Gibson

 

admg consulting

 

edumaker limited

 

.         Project management

.         Operations & Process improvement 

.         3D Printing

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20190721/f9357599/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 4679 bytes
Desc: not available
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20190721/f9357599/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 6991 bytes
Desc: not available
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20190721/f9357599/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 60mm liliypad-recovery3a-20072019 0 infillonly7.gcode
Type: simplify3d_gcode/octet-stream
Size: 785 bytes
Desc: not available
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20190721/f9357599/attachment.gcode>


More information about the Discuss mailing list