Skip to content

Commit

Permalink
importCSG reverse polyhedra if they have negative volume
Browse files Browse the repository at this point in the history
  • Loading branch information
5263 authored and wwmayer committed Jan 9, 2013
1 parent f1f7238 commit 8e2ae90
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Mod/OpenSCAD/importCSG.py
Expand Up @@ -939,7 +939,10 @@ def p_polyhedron_action(p) :
f = make_face(v[int(i[0])],v[int(i[1])],v[int(i[2])])
faces_list.append(f)
shell=Part.makeShell(faces_list)
mypolyhed.Shape=Part.Solid(shell)
solid=Part.Solid(shell).removeSplitter()
if solid.Volume < 0:
solid.reverse()
mypolyhed.Shape=solid
p[0] = [mypolyhed]

def p_projection_action(p) :
Expand Down

0 comments on commit 8e2ae90

Please sign in to comment.