boundary points, at least. That required some changes to what gets
passed around (for example because to project a point onto this
inexact curve, we need to know which two surfaces it trims so that
we can do a Newton's method on them).
And fix stupidity in the way that I calculated edge normals; I just
did normal in uv space, and there's no particular reason why that
would be normal in xyz. So edges in long skinny surfaces failed,
for example.
[git-p4: depot-paths = "//depot/solvespace/": change = 1990]
empty (no trims) surfaces. It will generate a screwy bounding box,
which will make things break numerically later.
[git-p4: depot-paths = "//depot/solvespace/": change = 1979]
xyz point that I subtracted off had been refined to lie exactly on
our edge's curve, and the uv point that I started with had not. So
normals got randomly screwed up.
[git-p4: depot-paths = "//depot/solvespace/": change = 1978]
and their holes into their own advanced faces. So a single surface
with multiple outer contours generates multiple advanced faces.
Also turn the default chord tol down to 1.5 pixels, seems more
likely to make the exact surface Booleans work.
[git-p4: depot-paths = "//depot/solvespace/": change = 1975]
feared. Though I don't have rational surfaces or curves going yet,
and I don't have the stuff to handle holes or multiple outer
contours in a single surface.
[git-p4: depot-paths = "//depot/solvespace/": change = 1974]
of revolution, and put them in the same form as if they had been
draw by an extrusion (so that we can use all the same special case
intersection curves).
And add code to merge coincident faces into one. That turns out to
be more than a cosmetic/efficiency thing, since edge splitting
fails at the join between two coincident faces.
[git-p4: depot-paths = "//depot/solvespace/": change = 1965]
separate polygon of coincident (with same or opposite normal)
faces; I instead test all the edges against the other shell, and
have extended the classify-against-shell stuff to handle those
cases.
And the normals are now perturbed a bit numerically, to either side
of the edge, to distinguish tangency from a coincident surface.
This seems to work fairly well, although things still tend to fail
when the piecewise linear tolerance is too coarse.
[git-p4: depot-paths = "//depot/solvespace/": change = 1964]
window screen, and remind the user that they could 'fix' the
problem by working with meshes instead.
[git-p4: depot-paths = "//depot/solvespace/": change = 1962]
according to the user's preference. I templated the housekeeping
stuff for Boolean operations and step and repeat, so it's
relatively clean.
Still need to add the stuff to make a mesh vertex-to-vertex, and to
export sections of a mesh.
[git-p4: depot-paths = "//depot/solvespace/": change = 1959]
triangulate correctly; don't screw up generating them, and make
sure that the ratpoly stuff doesn't blow up near the singularity.
[git-p4: depot-paths = "//depot/solvespace/": change = 1953]
parallel axis (which are always lines parallel to that axis).
Remove short pwl segments when possible, to avoid short edges that
get misclassified.
[git-p4: depot-paths = "//depot/solvespace/": change = 1952]
a grid of quads, with adaptive spacing. The quads that lie entirely
within the trim polygon are triangulated and knocked out from the
polygon, and then the polygon is triangulated.
That works okay, though rather slow. But there are issues with
surfaces of revolution that touch the axis, since they end up with
a singularity. That will require some thought.
[git-p4: depot-paths = "//depot/solvespace/": change = 1951]
our specified section plane; we then split them according to the
start and endpoints of each STrimBy, using de Castejau's algorithm.
These sections get projected (possibly in perspective, which I do
correctly) into 2d and exported.
Except, for now they just get pwl'd in the export files. That's the
fallback, since it works for any file format. But that's the place
to add special cases for circles etc., or to export them exactly.
DXF supports the latter, but very painfully since I would need to
write a later-versioned file, which requires thousands of lines of
baggage. I'll probably stick with arcs.
[git-p4: depot-paths = "//depot/solvespace/": change = 1936]
and curve.cpp and surface.cpp contain the rest.
Also get rid of the meshError stuff; will just use the nakedEdges
mechanism for that. And I won't run the interference test
continuously, have added a menu item for that.
[git-p4: depot-paths = "//depot/solvespace/": change = 1934]
closed form. This is a fairly good speedup, and handles tangency
well.
But that shows that tangency has other problems; need to classify
edges correctly (whether they point to a coincident surface) in
curved surfaces too. I need to tweak SShell::ClassifyPoint().
[git-p4: depot-paths = "//depot/solvespace/": change = 1933]
* Rewrite surface handles in curves, so that Booleans beyond
the first don't screw up.
* If an intersection curve is identical to an existing curve
(as happens when faces are coincident), take the piecewise
linearization of the existing curve; this stops us from
screwing up when different shells are pwl'd at different
chord tols.
* Hook up the plane faces again.
* Remove coincident (parallel or anti-parallel) edges from the
coincident-face edge lists when doing Booleans; those may
happen if two faces are coincident with ours.
* Miscellaneous bugfixes.
It doesn't seem to screw up very much now, although tangent edges
(and insufficient pwl resolution) may still cause problems.
[git-p4: depot-paths = "//depot/solvespace/": change = 1929]
trimmed line), and plane-line intersection. Terminate the Bezier
surface subdivision on a chord tolerance, and that seems okay now.
And print info about the graphics adapter in the text window, could
be useful.
Also have a cylinder-detection routine that works; should special
case those surfaces in closed form since they are common, but not
doing it yet.
[git-p4: depot-paths = "//depot/solvespace/": change = 1928]
use that for surface-line intersections. That has major problems
with the heuristic on when to stop and do Newton polishing.
There's also an issue with all the Newton stuff when surfaces join
tangent.
And update the wishlist to reflect current needs.
[git-p4: depot-paths = "//depot/solvespace/": change = 1925]
point, and to intersect three surfaces at a point. So now when we
split an edge, we can refine the split point to lie exactly on the
trim curve, so I can do certain Booleans on curved surfaces.
But surface-line intersection is globally broken, since I don't
correctly detect the number of intersections or provide a good
first guess. I maybe should test by bounding boxes and subdivision.
[git-p4: depot-paths = "//depot/solvespace/": change = 1920]
will do for real; now handling the special cases of plane against a
surface of extrusion. Still need to fix up line-surface
intersection to work for curved things, but then some simple curved
cases should work (as well as plane-plane).
[git-p4: depot-paths = "//depot/solvespace/": change = 1919]
way to think about the cases; I'm classifying the regions to the
left and right of each edge, and keeping the edges if those regions
(2d, surfaces) classify different.
Still screws up with edge-on-edge intersections; but if I make the
surface intersection stuff handle that, then might be more
straightforward to use that info.
[git-p4: depot-paths = "//depot/solvespace/": change = 1914]
segments in Boolean against the shell, not the intersection
polygon. (We just cast a ray, and use the surface-line intersection
function that already existed.) That's slow, but can be
accelerated later.
[git-p4: depot-paths = "//depot/solvespace/": change = 1911]
non-coincident faces. There's also a problem when I don't generate
the full intersection polygon of shell B against a given surface in
shell A; I need to modify the code to not require that.
[git-p4: depot-paths = "//depot/solvespace/": change = 1910]
fix convergence tolerance so that points projected into a rational
polynomial surface end up much closer than LENGTH_EPS.
[git-p4: depot-paths = "//depot/solvespace/": change = 1906]
trim curves for all surfaces lie between 0 and 1. And add routines
to merge the curves and surfaces from two shells into one, and to
split the trim curves into their piecewise linear segments and then
reassemble them into trim curves.
[git-p4: depot-paths = "//depot/solvespace/": change = 1905]
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]
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]
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]
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]
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]
so now we've got the exact curve loops, with their direction
standardized so that we can tell which direction is out. We still
need the polygon in any case, since that's a convenient way to find
each curve's winding number.
And remove some more leftover code from mesh sweeps.
[git-p4: depot-paths = "//depot/solvespace/": change = 1897]
piecwise linear segments. These are piecewise linear approximated
for display, and currently for the mesh too, but that's the first
step to replace the mesh with exact curved surfaces.
[git-p4: depot-paths = "//depot/solvespace/": change = 1895]