Revision: 73959
http://sourceforge.net/p/brlcad/code/73959
Author: starseeker
Date: 2019-09-18 19:56:26 +0000 (Wed, 18 Sep 2019)
Log Message:
-----------
Stash 3d->2d mappings when we have them (should be everywhere except
singularities)
Modified Paths:
--------------
brlcad/trunk/src/libbrep/cdt_edge.cpp
brlcad/trunk/src/libbrep/cdt_mesh.h
brlcad/trunk/src/libbrep/cdt_surf.cpp
Modified: brlcad/trunk/src/libbrep/cdt_edge.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt_edge.cpp 2019-09-18 19:55:32 UTC (rev
73958)
+++ brlcad/trunk/src/libbrep/cdt_edge.cpp 2019-09-18 19:56:26 UTC (rev
73959)
@@ -764,9 +764,11 @@
long f1_ind2d = fmesh1->add_point(trim1_mid_2d);
long f1_ind3d = fmesh1->add_point(mid_3d);
fmesh1->p2d3d[f1_ind2d] = f1_ind3d;
+ fmesh1->p3d2d[f1_ind3d] = f1_ind2d;
long f2_ind2d = fmesh2->add_point(trim2_mid_2d);
long f2_ind3d = fmesh2->add_point(mid_3d);
fmesh2->p2d3d[f2_ind2d] = f2_ind3d;
+ fmesh2->p3d2d[f2_ind3d] = f2_ind2d;
// Trims get their own normals
ON_3dVector norm1 = trim_normal(trim1, trim1_mid_2d);
@@ -1302,6 +1304,9 @@
long fnind = fmesh->add_normal(new ON_3dPoint(norm));
CDT_Add3DNorm(s_cdt,
fmesh->normals[fmesh->normals.size()-1], op3d, face.m_face_index,
trim->Vertex(0)->m_vertex_index, trim->m_trim_index, -1, cp.x, cp.y);
fmesh->p2d3d[find] = f3ind;
+ if (trim->m_type != ON_BrepTrim::singular) {
+ fmesh->p3d2d[f3ind] = find;
+ }
fmesh->nmap[f3ind] = fnind;
} else {
@@ -1339,6 +1344,9 @@
long fnind = fmesh->add_normal(new ON_3dPoint(norm));
CDT_Add3DNorm(s_cdt,
fmesh->normals[fmesh->normals.size()-1], cp3d, face.m_face_index,
trim->Vertex(1)->m_vertex_index, trim->m_trim_index, -1, cp.x, cp.y);
fmesh->p2d3d[find] = f3ind;
+ if (trim->m_type != ON_BrepTrim::singular) {
+ fmesh->p3d2d[f3ind] = find;
+ }
fmesh->nmap[f3ind] = fnind;
}
Modified: brlcad/trunk/src/libbrep/cdt_mesh.h
===================================================================
--- brlcad/trunk/src/libbrep/cdt_mesh.h 2019-09-18 19:55:32 UTC (rev 73958)
+++ brlcad/trunk/src/libbrep/cdt_mesh.h 2019-09-18 19:56:26 UTC (rev 73959)
@@ -490,6 +490,7 @@
std::vector<triangle_t> tris_2d;
std::vector<std::pair<double, double> > m_pnts_2d;
std::map<long, long> p2d3d;
+ std::map<long, long> p3d2d;
cpolygon_t outer_loop;
std::map<int, cpolygon_t*> inner_loops;
std::set<long> m_interior_pnts;
Modified: brlcad/trunk/src/libbrep/cdt_surf.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt_surf.cpp 2019-09-18 19:55:32 UTC (rev
73958)
+++ brlcad/trunk/src/libbrep/cdt_surf.cpp 2019-09-18 19:56:26 UTC (rev
73959)
@@ -667,6 +667,7 @@
CDT_Add3DNorm(sinfo->s_cdt, fmesh->normals[fmesh->normals.size()-1],
fmesh->pnts[fmesh->pnts.size()-1], sinfo->f->m_face_index, -1, -1, -1, n2dp.x,
n2dp.y);
fmesh->p2d3d[f_ind2d] = f3ind;
+ fmesh->p3d2d[f3ind] = f_ind2d;
fmesh->nmap[f3ind] = fnind;
}
@@ -694,6 +695,7 @@
CDT_Add3DNorm(sinfo->s_cdt, fmesh->normals[fmesh->normals.size()-1],
fmesh->pnts[fmesh->pnts.size()-1], sinfo->f->m_face_index, -1, -1, -1, n2dp.x,
n2dp.y);
fmesh->p2d3d[f_ind2d] = f3ind;
+ fmesh->p3d2d[f3ind] = f_ind2d;
fmesh->nmap[f3ind] = fnind;
}
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