48 : op(1.e-9, 1.e-6, 1.e-2), is_opposite(true),
49 verbose(true), verbose2(false), out_pre(pre?pre:
""),
50 eps_e( 1.e-2), eps_p(1.e-6) {
76 std::cout <<
"\tMesh " <<
B->
name() <<
": "
79 << bbox <<
"\n\tMesh " <<
G->
name() <<
": "
84 double tol_high = 3.e-1, tol_low=1.e-1;
89 double bl = (bbox.
xmax()-bbox.
xmin()) +
91 double gl = (gbox.xmax()-gbox.xmin()) +
92 (gbox.ymax()-gbox.ymin()) + (gbox.zmax()-gbox.zmin());
94 if ( bl>gl*(1+tol_high) || gl>bl*(1+tol_high) ||
96 std::cerr <<
"ERROR: The bounding boxes differ by more than "
97 << tol_high*100 <<
"%. Please check the geometries. Stopping..."
107 std::cerr <<
"WARNING: The bounding boxes differ by more than "
108 << tol_low*100 <<
"% but less than "
109 << tol_high*100 <<
"%. Continuing anyway." << std::endl;
119 std::cerr <<
"Detecting features in " <<
B->
name() <<
"..." << std::endl;
122 std::cerr <<
"Detecting features in " <<
G->
name() <<
"..." << std::endl;
131 std::cout <<
"Performing mesh overlay..." << std::flush;
136 std::cout <<
"..." << std::flush;
141 std::cout <<
"..." << std::flush;
145 std::cout <<
"..." << std::flush;
148 std::cout <<
"\n\tLocated " <<
inodes.size()
149 <<
" edge intersections.\n\tDone in "
151 <<
"Exporting the subdivision..." << std::flush;
165 while ( !
inodes.empty()) {
172 std::cout <<
" in " <<
get_wtime()-t0 <<
" sec.";
174 std::cout << std::endl;
199 std::cerr <<
"ERROR: One-to-many mapping at green vertex "
203 <<
".\n It is projected onto from blue vertices \n\t"
282 std::cerr <<
"ERROR: One-to-many mapping at blue vertex "
286 <<
". It projects onto \n\tgreen vertex "
293 case PARENT_FACE: std::cerr <<
"face incident on";
break;
320 while ( ! il.
empty()) {
335 while ( ! ilr.
empty()) {
356 while ( !il.empty()) {
359 std::cerr <<
"WARNING: Intersections are out-of-order on blue edge ("
364 <<
").\n\tPrevious intersection was "
367 <<
" and green parameterization is "
377 std::cerr <<
"Cannot be continued. Stopping..." << std::endl;
399 else if ( c<=
eps_e) {
433 static int count=0, countmax=10;
434 if (
verbose && count<countmax) {
442 if ( count == 0) std::cout << std::endl;
443 std::cout <<
"WARNING: Distance from blue vertex "
447 <<
" to green mesh is relatively large: " <<
std::sqrt(dist) << std::endl;
450 std::cout <<
"Note: Only " << countmax <<
" such warnings "
451 <<
" will be printed." << std::endl;
463 if ( count == 0) std::cout << std::endl;
464 std::cout <<
"WARNING: Distance from green vertex "
468 <<
" to blue mesh is relatively large: " <<
std::sqrt(dist) << std::endl;
471 std::cout <<
"NOTE: Only " << countmax <<
" such warnings"
472 <<
" will be printed." << std::endl;
487 std::queue<Halfedge*> &
q,
488 std::queue<Halfedge*> &q_rdg,
489 std::queue<Halfedge*> &q_crn) {
497 if ( frank_org != 2) {
520 if ( frank_org == 0 || frank_org < frank_dst ||
acc.
is_border(hopp) ||
529 else if ( frank_org == 1) {
547 std::queue<Halfedge*> &q_rdg,
548 std::queue<Halfedge*> &q_crn) {
549 if ( !q.empty())
return false;
551 for (
int i=0;
i<2; ++
i) {
552 std::queue<Halfedge*> &qbuf = (
i==0) ? q_rdg : q_crn;
553 while ( !qbuf.empty()) {
554 Halfedge *h = qbuf.front(); qbuf.pop();
574 std::queue<Halfedge*>
q, q_rdg, q_crn;
576 for (
int ncomp=1; ;++ncomp) {
578 if ( seed==NULL)
return;
584 std::cout <<
"There appear to be multiple connected components "
585 <<
"in the input mesh.\n\tWorking on component "
586 << ncomp << std::endl;
588 std::cout <<
"\nThe input meshes have "
590 "the same orientation") << std::endl;
592 std::cout <<
"Starting with seed vertex "
594 <<
" in pane " <<
acc.
get_pane(b)->
id() <<
" of blue mesh at "
595 << b->origin()->point() << std::endl;
620 const Real tol_snap_fea = 0.2, tol_snap_border = 2./3.;
639 g1 = it->halfedge(
GREEN); t1 = it->parent_type(
GREEN);
640 if ( it==il.
begin()) {
645 --it; g0 = it->halfedge(
GREEN); t0 = it->parent_type(
GREEN);
652 intersect_link( x, b, g0, t0, g1, t1, start, &cb, &cg, &g2, &t2);
655 if ( is_feature && cb < 1 && cb > 0) {
657 is_border ? tol_snap_border : tol_snap_fea);
659 else if ( !is_feature && cb < 1 &&
660 ( is_dst_feature && cb>1-tol_snap_fea &&
663 is_dst_feature && cb>1-tol_snap_border &&
667 cb = 1 + tol_snap_fea;
682 tol_snap_border : tol_snap_fea);
697 static int count=0, countmax = 10;
698 if (
verbose && count < countmax) {
702 if ( count == 0) std::cerr << std::endl;
704 <<
" is not matched with green boundary" << std::endl;
707 else if ( is_border && cb>0 && cb<1 &&
711 if ( count == 0) std::cerr << std::endl;
712 std::cerr <<
"WARNING: Blue border edge " << b->
origin()->
point()
714 <<
" is not matched with green boundary " << std::endl;
718 if ( is_dst_feature && cb>=1 &&
acc.
get_inode( dst)==NULL &&
722 <<
" is not matched with green ridge. cb is " << cb
723 <<
" and nc is " << nc << std::endl;
726 else if ( is_feature && cb<1 &&
729 std::cerr <<
"WARNING: Blue ridge edge " << b->
origin()->
point()
731 <<
" is not matched with green ridge. cb is " << cb
732 <<
" and nc is " << nc << std::endl;
746 while ( !il.
empty()) {
772 std::vector<RFC_Pane_overlay*> ps;
777 for ( std::vector<RFC_Pane_overlay*>::iterator
778 pit=ps.begin(); pit!=ps.end(); ++pit){
780 for ( HDS::Vertex_iterator vit=(*pit)->hds().vertices_begin();
781 vit!=(*pit)->hds().vertices_end(); ++vit)
782 if ( vit->halfedge() && vit->halfedge()->destination() == &*vit
789 for ( HDS::Halfedge_iterator hit=(*pit)->hds().halfedges_begin();
790 hit!=(*pit)->hds().halfedges_end(); ++hit) {
802 for ( std::vector<RFC_Pane_overlay*>::iterator
803 pit=ps.begin(); pit!=ps.end(); ++pit) {
805 for ( HDS::Facet_iterator fit=(*pit)->hds().facets_begin();
806 fit!=(*pit)->hds().facets_end(); ++fit, ++count) {
818 for ( ; v != vend; ++
v)
825 for ( ; vr != vrend; ++vr)
835 for (std::list<INode*>::iterator it=
inodes.begin(); it!=
inodes.end(); ++it) {
845 if ( j) i=
j;
else break;
899 std::vector<RFC_Pane_overlay*> ps;
903 for (std::vector<RFC_Pane_overlay*>::iterator
904 pit=ps.begin(); pit!=ps.end(); ++pit) {
906 for ( HDS::Facet_iterator fit=(*pit)->hds().facets_begin();
907 fit!=(*pit)->hds().facets_end(); ++fit) {
941 std::queue< INode*>
q;
964 if ( &il.
back() !=
i)
continue;
969 if ( &ilr.
front() !=
i)
continue;
994 &b1, &t, v1, &nc,
eps_p)) {
1016 if ( !q.empty()) { i = q.front(); q.pop(); }
else i = NULL;
1036 if ( &il.
back() !=
i)
continue;
1040 else if ( !ilr.
empty()) {
1041 if ( &ilr.
front() !=
i)
continue;
1067 const Vertex *anchor,
bool panic) {
1075 const Real tol_nm_large = 0.6, tol_nm_small=0.3;
1076 const Real tol_nm = panic ? tol_nm_small : tol_nm_large;
1077 const Real tol_proj=0.5, tol_snap=0.2;
1081 do_intersect &= (normal_match >= tol_nm);
1084 std::cerr <<
"INFO: Intersection with green edge ("
1086 <<
") is at bparam=" << tcb <<
", gparam=" << tcg << std::endl;
1088 if ( tcb<HUGE_VAL) {
1089 std::cerr <<
"\t inner product of normals equal to "
1090 << normal_match << std::endl;
1092 if ( normal_match<tol_nm_large) {
1093 std::cerr <<
"WARNING: Intersection was rejected due to normal mismatch under tolerance "
1094 << tol_nm_large << std::endl;
1096 if ( normal_match > tol_nm_small) {
1097 std::cerr <<
"WARNING: Trying with reduced normal-matching tolerance of "
1098 << tol_nm_small << std::endl;
1104 if ( do_intersect && tcb == 0) {
1107 *cb = 0.; *g = g2; *cg = tcg; *found=
false;
1113 if ( (tcb*
eps_e > 1.) || orient_match < -
eps_p ||
1114 normal_match < tol_nm || tcb<0.) {
1115 if ( *cb == HUGE_VAL) *g = g2;
1123 if (
verbose && snapcode == 7 && tcg > tol_snap && tcg < 1-tol_snap ) {
1124 std::cerr <<
"WARNING: Blue edge (" << b->
origin()->
point()
1126 <<
" appears to walk over a green corner "
1128 <<
" in an ambiguous way. This may cause overlay to failure. "
1132 if ( do_intersect) {
1134 if ( ( case1 = tcg == 1. || snapcode==6 || snapcode==7 &&
1136 tcg == 0. || snapcode==5 || snapcode==7 &&
1138 ( case1 = *found && tcg>0.5 &&
1142 if ( *found && *cb >1 && *cb < 1+tol_proj || tcb == 1) *cb = 1;
1143 else if ( !*found || tcb < *cb) *cb = tcb;
1147 else if ( !*found || !snapcode && tcb < *cb ||
1149 { *g = g2; *t =
PARENT_EDGE; *cg = tcg; *cb = tcb; *found =
true; }
1151 else if ( tcg >=0. && tcg <= 1.) {
1155 if ( ( case1 = tcg == 1. || snapcode==6 || snapcode==7 &&
1157 tcg == 0. || snapcode==5 || snapcode==7 &&
1163 if ( *found && *cb <= 1)
1166 *g = g2->
next(); *cg = 0;
1169 if ( !*found || tcb < *cb) *cb = tcb;
1172 *g = g2->
prev(); *cg = 1.;
1175 if ( !*found || tcb < *cb) *cb = tcb;
1180 else if ( !*found || !snapcode && tcb < *cb ||
1182 { *cg = tcg; *g = g2; *t =
PARENT_FACE; *cb = tcb; *found =
true; }
1184 else if ( !*found && tcb>=0) {
1186 if ( *cb > 0 && *cb < HUGE_VAL &&
1191 if ( tcb > 1 && *cb >1) {
1193 if ( tcb < *cb) *cb = tcb;
1197 if ( tcb ==1 || tcb >1 && tcb < 1+tol_proj && *cb < 1 ||
1198 tcb<=1 && *cb > 1 && *cb < 1+tol_proj)
1200 else if ( tcb < *cb) *cb = tcb;
1203 else if ( *cb == HUGE_VAL ||
1204 *cg < tcg && tcg < 0 || *cg > tcg && tcg > 1) {
1214 *cb = tcb; *cg = tcg;
1228 if ( *cg>1) { *cg = 1; }
else if ( *cg <0) { *cg = 0.; }
1233 if ( *cb <=0.) *cb = 0.;
1236 else if ( *cg >= 1.)
1238 else if ( *cg <= 0.)
1265 *cb = *cg = HUGE_VAL;
1274 int snapcode = is_feature ? 4 : 0;
1277 snapcode, NULL, trytime)) {
1278 if ( found)
return true;
1281 }
while ( ( g2 = g2->next()) != g1);
1299 if ( g2->
prev()==g1) snapcode += 1;
1300 else if (g2->
next()==g1) snapcode += 2;
1305 snapcode, NULL, trytime)) {
1306 if ( found)
return true;
1309 }
while ( ( g2 = g2->
next()) != g1);
1338 snapcode, v, trytime)) {
1339 if ( found)
return true;
1342 }
while ( ( g2 = g2->
next()) != g1_1);
1352 if (found)
return true;
1357 std::cerr <<
"WARNING: Encountered inconsistency when intersecting blue edge ("
1362 <<
") \nwith the link of the ";
1363 if ( t1 ==
PARENT_FACE) std::cerr <<
"green face incident on";
1365 if ( t1 ==
PARENT_VERTEX) std::cerr <<
"source vertex of green";
1373 intersect_link( x, b, g0, t0, g1, t1, start, cb, cg, g, t, 1);
1375 if ( *cb < HUGE_VAL) {
1376 std::cerr <<
"WARNING: Input meshes appear to have severe normal mismatch." << std::endl;
1377 std::cerr <<
"WARNING: Trying to continue with relaxed normal matching.\n\n" << std::endl;
1383 std::cerr <<
"WARNING: Could not find edge intersection." << std::endl;
1384 std::cerr <<
"WARNING: Trying to recover with point projection.\n\n" << std::endl;
1395 const int color)
const {
1430 if ( t1 ==
PARENT_EDGE && ( h0 == h1 || hopp == h1)) {
1432 if ( h0 == h1 && nc0<nc1 || hopp == h1 && 1.-nc0<nc1)
1466 const int color)
const {
1477 return std::make_pair( g, g);
1491 if ( e2 == NULL)
return false;
1546 for ( ; it !=
iend; ++it,++
n) {
1548 os <<
"GEOMETRY T=LINE3D";
1549 if ( color) os <<
" C=" << color;
1550 os <<
" LT=0.2" << std::endl;
1567 os << n <<
' ' << n*2 <<
' ' << 0 <<
'\n';
1571 for ( i=n; i>0; --
i) os << 2 <<
'\n';
1572 for ( i=n; i>0; --
i) os << 0 <<
'\n';
1576 for ( ; it !=
iend; ++it) {
1584 std::pair<const INode *, const Overlay::Halfedge*>
1591 return std::pair<const INode *, const Halfedge*>(NULL,NULL);
1596 return std::pair<const INode *, const Halfedge*>(NULL,NULL);
1609 if ( v1 == &il.
back())
1617 if ( v1 == &ilr.
front())
1623 return std::pair<const INode*, const Halfedge*>(v2, h);
1646 return std::pair<const INode*, const Halfedge*>(v2, h);
1650 return std::pair<const INode *, const Halfedge*>(NULL,NULL);
1654 std::pair<const INode *, const Overlay::Halfedge*>
1661 return std::pair<const INode *, const Halfedge*>(NULL,NULL);
1666 return std::pair<const INode *, const Halfedge*>(NULL,NULL);
1679 if ( v1 == &il.
front())
1687 if ( v1 == &ilr.
back())
1692 return std::pair<const INode*, const Halfedge*>(v2, h);
1719 return std::pair<const INode*, const Halfedge*>(v2, h);
1723 return std::pair<const INode *, const Halfedge*>(NULL,NULL);
1730 std::pair<const INode*,const Halfedge*> b, g;
1738 if ( g.first==NULL)
return b.first;
1739 if ( b.first!=NULL) {
1760 INode_const_list::const_iterator last_checked,
1762 int color,
int depth)
const {
1763 if ( face.size() < 3)
return true;
1764 RFC_assertion( last_checked != face.begin() && last_checked != face.end() && depth < 1000);
1766 INode_const_list::const_iterator it=last_checked,
iend=face.end(),inext;
1767 const INode *v0 = *(--last_checked), *v1 = *it, *v2;
1772 inext = it; ++inext;
1773 if ( inext == iend) {
1776 sub_faces.push_back( std::vector< const INode*>());
1777 std::vector< const INode*> &vec = sub_faces.back();
1778 vec.reserve( face.size());
1779 vec.insert( vec.end(),face.begin(), face.end());
1788 subdivide( sub2, ++sub2.begin(), sub_faces, color, depth+1);
1792 if ( v2 != *inext)
break;
1800 typedef std::map< const INode *, INode_const_list::const_iterator> IMap;
1802 for ( INode_const_list::const_iterator
i = face.begin();
i!=
iend; ++
i)
1803 imap.insert( std::make_pair( *
i,
i));
1805 IMap::const_iterator mit;
1807 std::list< const INode *> sub1, sub2;
1808 sub1.insert( sub1.end(), face.begin(), inext);
1812 if ( (mit=imap.find( v1)) == imap.end()) {
1813 sub1.push_back( v1);
1814 sub2.push_front( v1);
1816 if (v2) { v0=v1; v1 = v2; }
else break;
1823 bool ret1=
true, ret2=
true;
1825 INode_const_list::const_iterator sub_it1 = --sub1.end();
1826 if (v2 && mit->second != face.begin())
1827 { sub1.insert( sub1.end(), mit->second,
iend); ++sub_it1; }
1828 if (v2) ret1 =
subdivide( sub1, sub_it1, sub_faces, color, depth+1);
1831 if ( v2) sub2.push_front( *mit->second);
1832 if ( v2 && mit->second != face.begin())
1833 { sub2.insert(sub2.end(),it,mit->second); }
1835 { sub2.insert(sub2.end(),it,
iend); }
1836 ret2 =
subdivide( sub2, ++sub2.begin(), sub_faces, color, depth+1);
1837 return ret1 || ret2;
1845 if ( !f.halfedge()->is_border() &&
1847 sf[2]->halfedge(color), sf[2]->parent_type(color)))
1848 return f.halfedge();
1855 const Halfedge *h,
int color)
const {
1871 hi = hj; nc =
Point_2( 1.-nc[0], 0.);
break;
1887 switch( e.size_of_edges()) {
1891 else if ( hi == h->
prev()) {
1892 return Point_2( nc[1], 1.-nc[0]-nc[1]);
1896 return Point_2( 1.-nc[0]-nc[1], nc[0]);
1902 else if ( hi == h->
prev()) {
1903 return Point_2( nc[1], 1-nc[0]);
1905 else if ( hi == h->
next()) {
1906 return Point_2( 1-nc[1], nc[0]);
1910 return Point_2( 1-nc[0], 1-nc[1]);
1932 if ( i) nodes.push_back( i);
1936 if ( ! il.
empty()) {
1939 for ( ; v != vend; ++
v) nodes.push_back( &*v);
1943 if ( !ilr.
empty()) {
1945 for ( ; vr!=vrend; ++vr) nodes.push_back(&*vr);
1960 std::vector<RFC_Pane_overlay*> ps;
1963 for (std::vector<RFC_Pane_overlay*>::iterator
1964 pit=ps.begin(); pit != ps.end(); ++pit) {
1966 for ( HDS::Facet_iterator fit=(*pit)->hds().facets_begin();
1967 fit!=(*pit)->hds().facets_end(); ++fit) {
1972 if ( nodes.size() <= 2)
continue;
1977 subdivide( nodes, ++nodes.begin(), sub_faces, color);
1981 num_faces += sub_faces.size();
1982 Subface_list::iterator sfit = sub_faces.begin(), sfend=sub_faces.end();
1983 os <<
"GEOMETRY T=LINE3D C=BLACK"
1984 <<
" LT=0.15\n" << sub_faces.size() << std::endl;
1985 for ( ; sfit != sfend; ++sfit) {
1987 os << sfit->size()+1 <<
" ";
1988 for ( Subface_list::value_type::iterator
1989 vit=sfit->begin(); vit!=sfit->end(); ++vit) {
1991 (*vit)->nat_coor( color))
1994 os <<
op.
get_point( (*sfit->begin())->halfedge( color),
1995 (*sfit->begin())->nat_coor( color))
2001 std::cout <<
"\tTotal number of sub-faces in the overlay is "
2002 << num_faces << std::endl;
2008 os <<
"OFF" << std::endl;
2012 std::vector<RFC_Pane_overlay*> ps;
2018 for (std::vector<RFC_Pane_overlay*>::iterator
2019 pit=ps.begin(); pit != ps.end(); ++pit) {
2021 for ( HDS::Facet_iterator fit=(*pit)->hds().facets_begin();
2022 fit!=(*pit)->hds().facets_end(); ++fit) {
2027 if ( nodes.size() <= 2)
continue;
2032 subdivide( nodes, ++nodes.begin(), sub_faces, color);
2036 nfaces += sub_faces.size();
2040 os <<
inodes.size() <<
' ' << nfaces <<
" 0" << std::endl;
2044 std::map< const void*, int> ids;
2045 for ( std::list< INode*>::const_iterator
2048 (*i)->nat_coor( color))
2054 for (std::vector<RFC_Pane_overlay*>::iterator
2055 pit=ps.begin(); pit != ps.end(); ++pit) {
2057 for ( HDS::Facet_iterator fit=(*pit)->hds().facets_begin();
2058 fit!=(*pit)->hds().facets_end(); ++fit) {
2063 if ( nodes.size() <= 2)
continue;
2068 subdivide( nodes, ++nodes.begin(), sub_faces, color);
2072 Subface_list::iterator sfit = sub_faces.begin(), sfend=sub_faces.end();
2074 for ( ; sfit != sfend; ++sfit) {
2077 for ( Subface_list::value_type::iterator
2078 vit=sfit->begin(); vit!=sfit->end(); ++vit) {
2079 os <<
" " << ids[*vit];
2087 std::cout <<
"\tTotal number of sub-faces in the overlay is "
2088 << nfaces << std::endl;
std::string name() const
The name of the window.
Vertex * get_origin(Halfedge *h) const
Halfedge * get_next(Halfedge *h) const
std::reverse_iterator< const_iterator > const_reverse_iterator
std::list< const INode * > INode_const_list
const INode * get_next_inode(const INode *v1, const INode *v2, int) const
Parent_type parent_type(const int color) const
bool intersect(const Halfedge *b, const Halfedge *g, Real start, Real *c1, Real *c2, Real *dir, Real *dir_match, bool is_opposite, Real eps_e) const
std::pair< const Halfedge *, const Halfedge * > Parent_pair
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
Halfedge * get_prev(Halfedge *h) const
INode * get_buffered_inode(Halfedge *h, int tag) const
bool is_primary(const Vertex *v) const
Halfedge_overlay * halfedge() const
Halfedge * get_opposite(Halfedge *h) const
void int int REAL REAL * y
void write_overlay_off(std::ostream &, const COM::Window *)
std::reverse_iterator< iterator > reverse_iterator
Vertex_overlay * destination()
#define COM_assertion_msg(EX, msg)
RFC_Pane_overlay * get_pane(Vertex *v) const
void project_adjacent_green_vertices(const INode *, Halfedge *)
Helper for associate_green_vertices().
Overlay(const COM::Window *w1, const COM::Window *w2, const char *pre)
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
void write_inodes_tec(std::ostream &os, const char *color)
bool is_feature_1(const Halfedge *h) const
boolean empty(T_VertexSet s)
Halfedge * get_parent_face(const Subface &sf, int color)
bool marked(const Halfedge *h) const
bool do_intersect(const Line_2< R > &p1, const Line_2< R > &p2)
SURF::Vector_3< Real > Vector_3
SURF::Generic_element_2 Generic_element
INode * get_inode(Vertex *v) const
Real normalmatch(const Halfedge *b, const Halfedge *g) const
Host_face get_edge_parent(const INode &i0, const INode &i1, const int color) const
Vector_3 get_face_normal(const Halfedge *b, const Point_2 &nc, int scheme=0) const
void insert_node_in_green_edge(INode *v, int tag)
Parent_type parent_type() const
void panes(std::vector< Pane * > &ps)
Get a vector of local panes contained in the window.
Halfedge * get_halfedge(Vertex *v) const
bool is_feature_0(const Vertex *v) const
A window is a collection of panes.
Vertex_overlay * origin()
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
bool is_on_feature(const Vertex *v) const
void get_inodes_of_face(const Facet *f, INode_const_list &nodes)
bool intersect_link(const INode *x, const Halfedge *b, const Halfedge *g0, const Parent_type t0, Halfedge *g1, const Parent_type t1, Real start, Real *cb, Real *cg, Halfedge **g, Parent_type *t, int tryindex=0)
void snap_blue_ridge_edge(const Halfedge *b, const Halfedge *g, Real *cb, Real *cg, Parent_type *t, Real tol=0.1) const
#define RFC_END_NAME_SPACE
void insert_edge_into_queue(Halfedge *h, INode *v, std::queue< Halfedge * > &q, std::queue< Halfedge * > &q_rdg, std::queue< Halfedge * > &q_crn)
const Point & point() const
void set_buffered_inode(Halfedge *h, int tag, INode *i) const
Halfedge_overlay * prev()
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
const Point_2S & nat_coor(const int color) const
int size_of_faces() const
Get the total number of faces contained the window.
void write_inodes_vec(std::ostream &os)
Facet * get_facet(Halfedge *h) const
const COM::Window * base() const
Get a reference to the base COM::Window object.
void intersect_blue_with_green()
void sort_on_green_edges()
#define RFC_BEGIN_NAME_SPACE
void delete_overlay_data()
std::vector< const INode * > Subface
INode_list & get_inode_list(Halfedge *h) const
int count_edges(const Halfedge *e) const
bool do_match(const Bbox_3 &bb, double tol) const
void snap_blue_ridge_vertex(const Vertex *v, Halfedge **g, Parent_type *t, Point_2 *nc, Real tol=0.1) const
bool verify_inode(const INode *i)
void write_overlay_tec(std::ostream &, const COM::Window *)
Real sq_length(const Halfedge &h) const
reverse_iterator rbegin()
bool project_onto_element(const Point_3 &p, Halfedge **g, Parent_type *pt, Vector_3 dir, Point_2 *nc_out, const Real eps_p, Real eps_np=-1.) const
Halfedge * halfedge(const int color) const
bool intersect_link_helper2(Real *cb, Real *cg, Halfedge **g, Parent_type *t)
bool logical_xor(bool a, bool b) const
HDS_accessor< Tag_true > acc
int size_of_nodes() const
Get the total number of nodes contained the window.
Halfedge_overlay * next()
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
bool subdivide(const INode_const_list &face, INode_const_list::const_iterator last_checked, Subface_list &sub_faces, int color, int depth=0) const
void detect_features()
The main entry of feature detection.
std::list< Subface > Subface_list
#define RFC_assertion_code
int get_index(const Vertex *v) const
Halfedge * get_next_around_origin(Halfedge *h) const
Point_2 get_nat_coor(const INode &i, const Generic_element &e, const Halfedge *h, int color) const
Parent_pair get_edge_pair_parents(const INode &i0, const INode &i1, const int color) const
void mark(Halfedge *h) const
bool intersect_link_helper(const Halfedge *b, Halfedge *g2, Real start, Real *cb, Real *cg, Halfedge **g, Parent_type *t, bool *found, int snapcode, const Vertex *anchor, bool panic)
Point_3 get_point(const Halfedge *b, const Point_2S &nc) const
void insert_node_in_blue_edge(INode &x, Halfedge *b)
Vertex * get_destination(Halfedge *h) const
Some basic geometric data types.
void set_tolerance(double tol)
long double dist(long double *coord1, long double *coord2, int size)
bool is_border(const Halfedge *h) const
void set_inode(Vertex *v, INode *i) const
std::pair< const INode *, const Halfedge * > get_next_inode_ccw(const INode *v0, const INode *v1, int color) const
Bbox_3 get_bounding_box() const
Get the bounding box of the window.
IO::Mode set_ascii_mode(std::ios &i)
void create_overlay_data()
bool is_feature_1(const Halfedge *h) const
RFC_BEGIN_NAME_SPACE double get_wtime()
void set_parent(Halfedge *h, const Point_2 &p, int color)
Vector_3 & get_normal(int v)
void associate_green_vertices()
std::list< INode * > inodes
SURF::Vector_2< Real > Point_2
std::pair< const INode *, const Halfedge * > get_next_inode_cw(const INode *v0, const INode *v1, int color) const
bool is_queue_empty(std::queue< Halfedge * > &q, std::queue< Halfedge * > &q_rdg, std::queue< Halfedge * > &q_crn)
bool contains(const Halfedge *e1, const Parent_type t1, const Halfedge *e2, const Parent_type t2) const