Revision: 73940
http://sourceforge.net/p/brlcad/code/73940
Author: starseeker
Date: 2019-09-17 00:46:39 +0000 (Tue, 17 Sep 2019)
Log Message:
-----------
poly2tri has been successfully pushed down into libbg.
Modified Paths:
--------------
brlcad/trunk/src/libbrep/cdt.h
brlcad/trunk/src/libbrep/cdt_mesh.cpp
brlcad/trunk/src/libbrep/cdt_mesh.h
brlcad/trunk/src/libbrep/cdt_util.cpp
Modified: brlcad/trunk/src/libbrep/cdt.h
===================================================================
--- brlcad/trunk/src/libbrep/cdt.h 2019-09-17 00:43:35 UTC (rev 73939)
+++ brlcad/trunk/src/libbrep/cdt.h 2019-09-17 00:46:39 UTC (rev 73940)
@@ -139,10 +139,6 @@
std::map<int, std::map<int,ON_3dPoint *>> strim_norms;
std::map<int, cdt_mesh::cdt_mesh_t> fmeshes;
-
-
- /* Mesh data */
- std::map<p2t::Triangle*, int> *tri_brep_face;
};
#if 0
Modified: brlcad/trunk/src/libbrep/cdt_mesh.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt_mesh.cpp 2019-09-17 00:43:35 UTC (rev
73939)
+++ brlcad/trunk/src/libbrep/cdt_mesh.cpp 2019-09-17 00:46:39 UTC (rev
73940)
@@ -1847,75 +1847,6 @@
this->uedges2tris.clear();
}
-void cdt_mesh_t::build(std::set<p2t::Triangle *> *cdttri, std::map<p2t::Point
*, ON_3dPoint *> *pointmap)
-{
- if (!cdttri || !pointmap) return;
-
- this->reset();
- this->pnts.clear();
- this->p2ind.clear();
- this->n2ind.clear();
- this->sv.clear();
-
- std::set<p2t::Triangle*>::iterator s_it;
-
- // Populate points
- std::set<ON_3dPoint *> uniq_p3d;
- for (s_it = cdttri->begin(); s_it != cdttri->end(); s_it++) {
- p2t::Triangle *t = *s_it;
- for (size_t j = 0; j < 3; j++) {
- uniq_p3d.insert((*pointmap)[t->GetPoint(j)]);
- }
- }
- this->sv.clear();
- std::set<ON_3dPoint *>::iterator u_it;
- for (u_it = uniq_p3d.begin(); u_it != uniq_p3d.end(); u_it++) {
- this->pnts.push_back(*u_it);
- this->p2ind[*u_it] = this->pnts.size() - 1;
- if (this->singularities->find(*u_it) != this->singularities->end()) {
- this->sv.insert(this->p2ind[*u_it]);
- }
- }
-
- //for (u_it = uniq_p3d.begin(); u_it != uniq_p3d.end(); u_it++) {
-// nmap[p2ind[*u_it]] = n2ind[(*normalmap)[*u_it]];
- // }
-
- // From the triangles, populate the containers
- for (s_it = cdttri->begin(); s_it != cdttri->end(); s_it++) {
- p2t::Triangle *t = *s_it;
- ON_3dPoint *pt_A = (*pointmap)[t->GetPoint(0)];
- ON_3dPoint *pt_B = (*pointmap)[t->GetPoint(1)];
- ON_3dPoint *pt_C = (*pointmap)[t->GetPoint(2)];
-
- // Skip degenerate triangles
- if (pt_A == pt_B || pt_B == pt_C || pt_C == pt_A) {
- continue;
- }
-
- long Aind = this->p2ind[pt_A];
- long Bind = this->p2ind[pt_B];
- long Cind = this->p2ind[pt_C];
- struct triangle_t nt(Aind, Bind, Cind);
- cdt_mesh_t::tri_add(nt);
- }
-
- // Populate cdt_mesh edge point set
- std::set<ON_3dPoint *>::iterator ep_it;
- for (ep_it = edge_pnts->begin(); ep_it != edge_pnts->end(); ep_it++) {
- ep.insert(p2ind[*ep_it]);
- }
-
- // Define brep edge set in cdt_mesh terms
- std::set<std::pair<ON_3dPoint *, ON_3dPoint *>>::iterator b_it;
- for (b_it = b_edges->begin(); b_it != b_edges->end(); b_it++) {
- long p1_ind = p2ind[b_it->first];
- long p2_ind = p2ind[b_it->second];
- brep_edges.insert(uedge_t(p1_ind, p2_ind));
- }
- boundary_edges_update();
-}
-
bool
cdt_mesh_t::tri_problem_edges(triangle_t &t)
{
Modified: brlcad/trunk/src/libbrep/cdt_mesh.h
===================================================================
--- brlcad/trunk/src/libbrep/cdt_mesh.h 2019-09-17 00:43:35 UTC (rev 73939)
+++ brlcad/trunk/src/libbrep/cdt_mesh.h 2019-09-17 00:46:39 UTC (rev 73940)
@@ -40,7 +40,6 @@
#include <vector>
#include <set>
#include <map>
-#include "poly2tri/poly2tri.h"
#include "RTree.h"
#include "opennurbs.h"
#include "bu/color.h"
@@ -447,7 +446,6 @@
long add_point(ON_2dPoint &on_2dp);
long add_point(ON_3dPoint *on_3dp);
long add_normal(ON_3dPoint *on_3dn);
- void build(std::set<p2t::Triangle *> *cdttri, std::map<p2t::Point *,
ON_3dPoint *> *pointmap);
void set_brep_data(
bool brev,
std::set<ON_3dPoint *> *e,
Modified: brlcad/trunk/src/libbrep/cdt_util.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt_util.cpp 2019-09-17 00:43:35 UTC (rev
73939)
+++ brlcad/trunk/src/libbrep/cdt_util.cpp 2019-09-17 00:46:39 UTC (rev
73940)
@@ -346,7 +346,6 @@
cdt->faces = new std::map<int, struct ON_Brep_CDT_Face_State *>;
- cdt->tri_brep_face = new std::map<p2t::Triangle*, int>;
cdt->bot_pnt_to_on_pnt = new std::map<int, ON_3dPoint *>;
return cdt;
@@ -382,7 +381,6 @@
delete s_cdt->pnt_audit_info;
delete s_cdt->faces;
- delete s_cdt->tri_brep_face;
delete s_cdt->bot_pnt_to_on_pnt;
delete s_cdt;
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