Commit Graph

6 Commits (2023667311692dcc317be9b5b4ce4cb4893a05c3)

Author SHA1 Message Date
Jonathan Westhues 9ade574d36 Fix triangulation issues when a polygon has more than two edges at
a vertex.

[git-p4: depot-paths = "//depot/solvespace/": change = 1916]
2009-02-18 03:15:33 -08:00
Jonathan Westhues 2e4ec6dd04 Add sin and cos to the expression entry (for dimensions etc.), with
the same precedence as sqrt. Add the code to find naked edges, and
draw them highlighted on the model. And make the direction of trim
curves consistent, always ccw with normal toward viewer; so there's
no need to fix the directions before triangulating.

[git-p4: depot-paths = "//depot/solvespace/": change = 1903]
2009-01-25 01:19:59 -08:00
Jonathan Westhues bb4b767e99 Tear everything apart, moving away from meshes and toward shells.
Add stubs for functions to perform Booleans, and get rid of mesh
stuff, including the kd tree accelerated snap to vertex (which
should not be required if the shell triangulation performs as it
should).

Also check that a sketch is not self-intersecting before extruding
it or whatever. This is dead slow, needs n*log(n) implementation.

[git-p4: depot-paths = "//depot/solvespace/": change = 1902]
2009-01-22 19:30:30 -08:00
Jonathan Westhues 6d7954e167 Fix an issue with edge intersection testing: if a vertex from edge
A touches edge B, but does not share a vertex with edge B, then
that's an intersection.

Adjust the ear clipping so that it generates strip-like
triangulations, not fan-like.

And rearrange deck chairs on the bridge-finding code, which is
still pathetically slow. It may not be possible to get reasonable
performance without kd tree type acceleration.

[git-p4: depot-paths = "//depot/solvespace/": change = 1901]
2009-01-22 02:02:46 -08:00
Jonathan Westhues 7cf3a06274 A very rough set of routines to triangulate by ear clipping. This
is O(n^2), not perfectly robust, and the bridge-finding code is
particularly bad. But it works, triangulates, and shouldn't ever
generate zero-area triangles like gl does.

[git-p4: depot-paths = "//depot/solvespace/": change = 1900]
2009-01-20 21:04:38 -08:00
Jonathan Westhues ebca6130ec Early attempts at rational polynomial surfaces. I can create one
from an extrusion, with piecewise linear trim curves for everything
(that are shared, so that they appear only once for the two
surfaces that each trims). No Boolean operations on them, and the
triangulation is bad, because gl seems to merge collinear edges.

So before going further, I seem to need my own triangulation code.
I have not had great luck in the past, but I can't live without it
now.

[git-p4: depot-paths = "//depot/solvespace/": change = 1899]
2009-01-19 02:37:10 -08:00