JustinSDK / dotSCAD

Reduce the burden of mathematics when playing OpenSCAD
https://openhome.cc/zh-tw/openscad/
GNU Lesser General Public License v3.0
784 stars 107 forks source link

bijection_offset.scad problem #7

Closed rvdb1 closed 4 years ago

rvdb1 commented 4 years ago

The order of the ofsetted points is incorrect. You will not notice it with polygon of the ofsetted shape, but it appears if you use polyline2d.

Tested with version 1.3.3

Example: include ; include ; include ;

shape = [ [15, 0], [15, 30], [0, 20], [-15, 40], [-15, 0] ];

shape_o = bijection_offset(shape, 1); color("green") polyline2d(points=shape,thickness=1,$fn=3); color("red") polyline2d(points=shape_o,thickness=1,$fn=3); echo(shape); echo(shape_o);

JustinSDK commented 4 years ago

Fixed.

BTW, it's width, not thickness for polyline2d.