Revision: 73132
http://sourceforge.net/p/brlcad/code/73132
Author: starseeker
Date: 2019-05-22 14:38:14 +0000 (Wed, 22 May 2019)
Log Message:
-----------
Pass the edge segment length data to the surface point generator (not using it
yet.)
Modified Paths:
--------------
brlcad/trunk/src/libbrep/cdt.cpp
brlcad/trunk/src/libbrep/cdt.h
brlcad/trunk/src/libbrep/cdt_surf.cpp
Modified: brlcad/trunk/src/libbrep/cdt.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt.cpp 2019-05-22 14:17:48 UTC (rev 73131)
+++ brlcad/trunk/src/libbrep/cdt.cpp 2019-05-22 14:38:14 UTC (rev 73132)
@@ -173,9 +173,6 @@
}
}
}
- // TODO - introduce these values into the tolerance structures...
- bu_log("Face %d max_edge_seg: %f\n", face.m_face_index, max_edge_seg);
- bu_log("Face %d min_edge_seg: %f\n", face.m_face_index, min_edge_seg);
// Process through loops, building Poly2Tri polygons for facetization.
bool outer = true;
@@ -235,7 +232,7 @@
// Sample the surface, independent of the trimming curves, to get points
that
// will tie the mesh to the interior surface.
- getSurfacePoints(s_cdt, face, on_surf_points);
+ getSurfacePoints(s_cdt, face, on_surf_points, min_edge_seg, max_edge_seg);
// Strip out points from the surface that are on the trimming curves. Trim
// points require special handling for watertightness and introducing them
Modified: brlcad/trunk/src/libbrep/cdt.h
===================================================================
--- brlcad/trunk/src/libbrep/cdt.h 2019-05-22 14:17:48 UTC (rev 73131)
+++ brlcad/trunk/src/libbrep/cdt.h 2019-05-22 14:38:14 UTC (rev 73132)
@@ -145,6 +145,8 @@
fastf_t v_lower_3dlen;
fastf_t v_mid_3dlen;
fastf_t v_upper_3dlen;
+ fastf_t min_edge;
+ fastf_t max_edge;
};
@@ -169,7 +171,8 @@
void
getSurfacePoints(struct ON_Brep_CDT_State *s_cdt,
const ON_BrepFace &face,
- ON_2dPointArray &on_surf_points);
+ ON_2dPointArray &on_surf_points,
+ fastf_t min_edge, fastf_t max_edge);
void
plot_polyline(std::vector<p2t::Point *> *pnts, const char *filename);
Modified: brlcad/trunk/src/libbrep/cdt_surf.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt_surf.cpp 2019-05-22 14:17:48 UTC (rev
73131)
+++ brlcad/trunk/src/libbrep/cdt_surf.cpp 2019-05-22 14:38:14 UTC (rev
73132)
@@ -307,7 +307,7 @@
ON_Line line2(p[1], p[3]);
double dist = mid.DistanceTo(line1.ClosestPointTo(mid));
V_MAX(dist, mid.DistanceTo(line2.ClosestPointTo(mid)));
-
+
for (int i = 0; i < 4; i++) {
double nnm_dot = ON_DotProduct(norm[i], norm_mid);
if ((nnm_dot < ON_ZERO_TOLERANCE) && (fabs(nnm_dot) >
ON_ZERO_TOLERANCE)) {
@@ -542,7 +542,8 @@
void
getSurfacePoints(struct ON_Brep_CDT_State *s_cdt,
const ON_BrepFace &face,
- ON_2dPointArray &on_surf_points)
+ ON_2dPointArray &on_surf_points,
+ fastf_t min_edge, fastf_t max_edge)
{
double surface_width, surface_height;
@@ -553,7 +554,7 @@
double dist = 0.0;
double min_dist = 0.0;
double within_dist = 0.0;
- double cos_within_ang = 0.0;
+ double cos_within_ang = 0.0;
if ((surface_width < s_cdt->dist) || (surface_height < s_cdt->dist)) {
return;
@@ -582,6 +583,8 @@
sinfo.v_lower_3dlen = _cdt_get_uv_edge_3d_len(&sinfo, 0, 1);
sinfo.v_mid_3dlen = _cdt_get_uv_edge_3d_len(&sinfo, 1, 1);
sinfo.v_upper_3dlen = _cdt_get_uv_edge_3d_len(&sinfo, 2, 1);
+ sinfo.min_edge = min_edge;
+ sinfo.max_edge = max_edge;
// may be a smaller trimmed subset of surface so worth getting
// face boundary
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