Revision: 73899
http://sourceforge.net/p/brlcad/code/73899
Author: starseeker
Date: 2019-09-12 00:49:18 +0000 (Thu, 12 Sep 2019)
Log Message:
-----------
Note a few things to try. p2t crashes are hard to debug - there's no clear
sense of why an input isn't suitable - so some experimentation is probably in
order.
Modified Paths:
--------------
brlcad/trunk/src/libbrep/cdt_surf.cpp
Modified: brlcad/trunk/src/libbrep/cdt_surf.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt_surf.cpp 2019-09-11 23:01:58 UTC (rev
73898)
+++ brlcad/trunk/src/libbrep/cdt_surf.cpp 2019-09-12 00:49:18 UTC (rev
73899)
@@ -24,35 +24,25 @@
* Constrained Delaunay Triangulation - Surface Point sampling of NURBS B-Rep
* objects.
*
+ * TODO - assuming the p2t crashing with current inputs isn't the
+ * fault of a problem on our end, what we may have to do is:
*
- * TODO - need to incorporate a specific constraint into the surface sampling.
- * TO make sure triangulation of curved edges on curved surfaces doesn't do
- * anything strange, we need a surface point for each edge curve that is
- * closer to the midpoint of the polyedge than either of that polyedge's
- * neighboring points. (e.g. we never want the CDT to find it's third
- * triangle point for an edge on another edge. That will work for planar
- * faces, (and we might be able to allow it there) but for NON planar faces
- * that produces line segments which may be far away from the surface itself
- * as they jump around the arc of the edge curve.
+ * 1. randomize the selection of where along the line segment
+ * the surface point from the trim is selected - right now
+ * we're always using the midpt, which can be very symmetric.
*
- * For each spatch that overlaps 2D rtree boxes, check if it's midpoint would
- * satisfy the above criteria for all edge segments it overlaps with. (Note
- * the candate point must also be within the outer and not trimmed by the
- * inner polygons, and not be TOO close to any polyedge - too close causes
- * other problems. An initial guess would be that any point inside the
- * 2D rtree bbox can't be a satisfying point, but that may need a bit of
- * refinement. If an spatch midpt satisfies all uv edge bboxes it overlaps
- * with, it becomes a leaf. If it satisfies some but not all, keep splitting.
- * Need to think a bit to be sure we define termination criteria that make
- * sense - in particular, need to consider how to split in the neighborhood
- * of trims to make sure we always terminate with the needed points.
+ * 2. If that doesn't help by itself, we can also construct the
+ * CDT polygons from the edge points and the inner trim surface
+ * points - two segments for every trim with an associated surface
+ * point. We then manually create the edge triangles and let the
+ * CDT "fill in" the interior. This might actually be worth doing
+ * anyway just to avoid the problem of highly colinear trim points
+ * sampled along lines in 2D...
*
- * By the time we've got spatches overlapping with trim edge segments, the
- * rest of the refinement criteria for surface patches are going to be pretty
- * much irrelevant. We MUST satisfy the trims to produce valid meshes, and
- * if the trim splitting tolerances are correct they will have respected the
- * same tolerance inputs to the extent the original brep data allows.
- *
+ * That would also let us avoid culling all patch points overlapping with
+ * the trim bboxes, since we'd be constructing the loops in such a way that
+ * the area of the edge triangles would be outside for the CDT - what
+ * we're doing now may be a tad aggressive...
*/
#include "common.h"
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits