Revision: 73842
http://sourceforge.net/p/brlcad/code/73842
Author: starseeker
Date: 2019-09-06 02:04:37 +0000 (Fri, 06 Sep 2019)
Log Message:
-----------
ON_ZERO_TOLERANCE looks like it was too tight here - just take the closest one,
or if we only got one use that.
Modified Paths:
--------------
brlcad/trunk/src/libbrep/cdt.cpp
Modified: brlcad/trunk/src/libbrep/cdt.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt.cpp 2019-09-05 23:57:28 UTC (rev 73841)
+++ brlcad/trunk/src/libbrep/cdt.cpp 2019-09-06 02:04:37 UTC (rev 73842)
@@ -42,7 +42,7 @@
if (m_edge_index > 0 && (m_edge_index < 93 || m_edge_index > 96)) return;
cdt_mesh::cdt_mesh_t *fmesh = &s_cdt->fmeshes[34];
std::cout << "\n";
- if (m_loop_index > 0) {
+ if (m_loop_index > 0) {
std::cout << step_cnt << "-" << (*d_cnt) << ": generating plots for
loop " << m_loop_index << "...\n";
}
if (m_edge_index > 0) {
@@ -982,19 +982,13 @@
if (trim->Face()->m_bRev) {
v1 = v1 * -1;
}
- if (v.Point().DistanceTo(t1) < ON_ZERO_TOLERANCE) {
- ev1 = 1;
- trim_norm = v1;
- }
+ ev1 = 1;
}
if (surface_EvNormal(s, t_2d2.x, t_2d2.y, t2, v2)) {
if (trim->Face()->m_bRev) {
v2 = v2 * -1;
}
- if (v.Point().DistanceTo(t2) < ON_ZERO_TOLERANCE) {
- ev2 = 1;
- trim_norm = v2;
- }
+ ev2 = 1;
}
// If we got both of them, go with the closest one
if (ev1 && ev2) {
@@ -1007,6 +1001,14 @@
#endif
trim_norm = (v.Point().DistanceTo(t1) < v.Point().DistanceTo(t2)) ?
v1 : v2;
}
+
+ if (ev1 && !ev2) {
+ trim_norm = v1;
+ }
+
+ if (!ev1 && ev2) {
+ trim_norm = v2;
+ }
}
return trim_norm;
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