Revision: 73877
http://sourceforge.net/p/brlcad/code/73877
Author: starseeker
Date: 2019-09-10 15:20:49 +0000 (Tue, 10 Sep 2019)
Log Message:
-----------
Stash local copies of the trimming loops in libbg form.
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-10 15:12:14 UTC (rev
73876)
+++ brlcad/trunk/src/libbrep/cdt_surf.cpp 2019-09-10 15:20:49 UTC (rev
73877)
@@ -82,6 +82,12 @@
fastf_t within_dist;
fastf_t cos_within_ang;
std::set<ON_BoundingBox *> leaf_bboxes;
+
+ point2d_t *oloop_pnts;
+ size_t oloop_cnt;
+
+ std::map<int, point2d_t *>iloop_pnts;
+ std::map<int, size_t>iloop_cnt;
};
class SPatch {
@@ -425,6 +431,20 @@
sinfo->min_edge = (*s_cdt->min_edge_seg_len)[face_index];
sinfo->max_edge = (*s_cdt->max_edge_seg_len)[face_index];
+
+ // We don't want to malloc and free the trimming loops every time, as we
may
+ // be testing a lot of points.
+ cdt_mesh::cdt_mesh_t *fmesh = &s_cdt->fmeshes[face_index];
+ sinfo->oloop_cnt = fmesh->outer_loop.bg_polygon(&sinfo->oloop_pnts);
+ std::map<int, cdt_mesh::cpolygon_t*>::iterator l_it;
+ for (l_it = fmesh->inner_loops.begin(); l_it != fmesh->inner_loops.end();
l_it++) {
+ int lindex = l_it->first;
+ point2d_t *lpnts;
+ long lcnt = l_it->second->bg_polygon(&lpnts);
+ sinfo->iloop_pnts[lindex] = lpnts;
+ sinfo->iloop_cnt[lindex] = lcnt;
+ }
+
double dist = 0.0;
double min_dist = 0.0;
double within_dist = 0.0;
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