Revision: 73909
http://sourceforge.net/p/brlcad/code/73909
Author: starseeker
Date: 2019-09-12 18:08:50 +0000 (Thu, 12 Sep 2019)
Log Message:
-----------
Don't worry about it if we've only got one triangle at the singularity to start
with.
Modified Paths:
--------------
brlcad/trunk/src/libbrep/cdt_mesh.cpp
Modified: brlcad/trunk/src/libbrep/cdt_mesh.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt_mesh.cpp 2019-09-12 17:42:00 UTC (rev
73908)
+++ brlcad/trunk/src/libbrep/cdt_mesh.cpp 2019-09-12 18:08:50 UTC (rev
73909)
@@ -2713,32 +2713,34 @@
if (has_singularities) {
std::vector<triangle_t> s_tris = this->singularity_triangles();
- seed_tris.insert(s_tris.begin(), s_tris.end());
+ if (stris.size() > 1) {
+ seed_tris.insert(s_tris.begin(), s_tris.end());
- st_size = seed_tris.size();
- while (seed_tris.size()) {
- triangle_t seed = *seed_tris.begin();
+ st_size = seed_tris.size();
+ while (seed_tris.size()) {
+ triangle_t seed = *seed_tris.begin();
- double deg = max_angle_delta(seed, s_tris);
- bool pseed = process_seed_tri(seed, false, deg);
+ double deg = max_angle_delta(seed, s_tris);
+ bool pseed = process_seed_tri(seed, false, deg);
- if (!pseed || seed_tris.size() >= st_size) {
- std::cerr << f_id << ": Error - failed to process refinement
seed triangle!\n";
- struct bu_vls fname = BU_VLS_INIT_ZERO;
- bu_vls_sprintf(&fname, "%d-failed_seed.plot3", f_id);
- tri_plot(seed, bu_vls_cstr(&fname));
- bu_vls_sprintf(&fname, "%d-failed_seed_mesh.plot3", f_id);
- tris_plot(bu_vls_cstr(&fname));
- bu_vls_sprintf(&fname, "%d-failed_seed.cdtmesh", f_id);
- serialize(bu_vls_cstr(&fname));
- bu_vls_free(&fname);
- return false;
- break;
- }
+ if (!pseed || seed_tris.size() >= st_size) {
+ std::cerr << f_id << ": Error - failed to process
refinement seed triangle!\n";
+ struct bu_vls fname = BU_VLS_INIT_ZERO;
+ bu_vls_sprintf(&fname, "%d-failed_seed.plot3", f_id);
+ tri_plot(seed, bu_vls_cstr(&fname));
+ bu_vls_sprintf(&fname, "%d-failed_seed_mesh.plot3", f_id);
+ tris_plot(bu_vls_cstr(&fname));
+ bu_vls_sprintf(&fname, "%d-failed_seed.cdtmesh", f_id);
+ serialize(bu_vls_cstr(&fname));
+ bu_vls_free(&fname);
+ return false;
+ break;
+ }
- st_size = seed_tris.size();
+ st_size = seed_tris.size();
- //tris_plot("mesh_post_pretty.plot3");
+ //tris_plot("mesh_post_pretty.plot3");
+ }
}
}
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