mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-13 02:04:16 +02:00
OpenSCAD prefers clockwise
This commit is contained in:
@@ -31,7 +31,8 @@ module polysections(sections, triangles = "SOLID") {
|
||||
module solid_sections(sects) {
|
||||
leng_pts_sect = len(sects[0]);
|
||||
|
||||
first_idxes = [for(i = [0:leng_pts_sect - 1]) i];
|
||||
first_idxes = [for(i = [0:leng_pts_sect - 1]) leng_pts_sect - 1 - i];
|
||||
|
||||
last_idxes = [
|
||||
for(i = [0:leng_pts_sect - 1])
|
||||
i + leng_pts_sect * (len(sects) - 1)
|
||||
@@ -43,10 +44,10 @@ module polysections(sections, triangles = "SOLID") {
|
||||
pt
|
||||
];
|
||||
|
||||
polyhedron(
|
||||
v_pts,
|
||||
concat([first_idxes], side_indexes(sects), [last_idxes])
|
||||
);
|
||||
polyhedron(
|
||||
v_pts,
|
||||
concat([first_idxes], side_indexes(sects), [last_idxes])
|
||||
);
|
||||
}
|
||||
|
||||
module hollow_sections(sects) {
|
||||
|
Reference in New Issue
Block a user