Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] how can I store collapsed edges using CGAL

Subject: CGAL users discussion list

List archive

[cgal-discuss] how can I store collapsed edges using CGAL


Chronological Thread 
  • From: nm <>
  • To:
  • Subject: [cgal-discuss] how can I store collapsed edges using CGAL
  • Date: Thu, 28 Feb 2019 05:05:28 -0600 (CST)
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=SoftFail ; spf=Pass
  • Ironport-phdr: 9a23:0dc8KRUrwEEhhfZBj51PJYW1sPbV8LGtZVwlr6E/grcLSJyIuqrYYxeFt8tkgFKBZ4jH8fUM07OQ7/iwHzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba9xIRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KptVRTmijoINyQh/W/ZisJ+kqFVrg+uqBNjzIDZe52VNONicq/BYd8WWWhMU8BMXCJBGIO8aI4PAvIHPeZdsoLwoEUBrR2xBQW2AuPvzSJIhmX23aIg1eQtCwTG3AsgH90UtXTbssj6ObwdUeCw1qbIzDHDY+lK1jf67YjFaxYsquyCU7J3dMre00gvFwXdg1WWs4PqJCia1uATvGSB8+VgUuevhmg6oA9yujii3togh43Ni44PxF3J9j91zYU0KNGiSUN2YNipG4ZKuS6ALYt5WMYiTnlouCkkzr0Gvoa2fC4FxZg9wR7QceeIfJOM4h39TuqePTB4hHd9dLK+gRa971Sgx/XhWsSw1FtGtCRIn9rWun0O1hHf8MmKR/pl8kekwzmP1gTT6u9eIUAzkKrWM4Auwrg/lpYJt0TDGTL2mF/2jKCMcEUo4O2o6+PnYrr8o5+TKZJ7hxrxMqQrgMO/AOA4PhISUGic/OSwzKfj8lHhQLVWkv02lbHUv4zVJcsBoq61GhJa0oc46xmjEjemy88YkGIcLFNFfRKHl5LmN0vPIPD+F/e/gk6jnC1lx/DcbfXdBcDGIXHH1bvgZr1g8FV0yQwpzNkZ6YgHJKsGJaf1XweludrXSBk+Lha0yuChDdJ934YTVUqAB6aYNOXZtlretbFnGPWFeIJA4GW1EPMi/fO71SZoy29YRrGg2N4sUF79G/1nJ0uDZn+124UOFG4Lukw1S+m40wTeAw4WXG67WucH3h9+EJivVN6RSYWkgbjH1yC+TMUPOzJ2T2uUGHKtTL2qHvcBbCXLf51nznoCXLKrT4Jn3har5lb3

'm creating an application on QT-creator and using CGAL to read .off file as
Linear_cell_complex_for_bgl_combinatorial_map_helper and simplify it using
edge_collapse method . I want to store the list of collapsed edges,incident
vertices, position of points , and other needed information to re-insert the
removed edges again .
, my code :

struct Stats
{
Stats() : collapsed(0) {}
std::size_t collapsed ;
} ;

struct My_visitor : SMS::Edge_collapse_visitor_base<LCC>
{

My_visitor( Stats* s) : stats(s){}
void OnCollapsed( Profile const& , vertex_descriptor )
{
++ stats->collapsed;

Profile::halfedge_descriptor();
}

Stats* stats ;

void OnCollapsing(Profile const& profile,boost::optional<Point> placement
)
{
std::cout << "My_visitor::OnCollapsing()" << std::endl;
* std::cout <<( profile.v0()) << " will collapse into "<< profile.v1() <<
std::endl;*
}
};
void MainWindow ::simplify()
{
My_visitor vis(&stats) ;

int r = SMS::edge_collapse
(lcc
,stop
,CGAL::parameters::halfedge_index_map(get(CGAL::halfedge_index, lcc))
.vertex_index_map(get(boost::vertex_index, lcc))
.get_cost(SMS::Edge_length_cost<LCC>())
.get_placement(SMS::Midpoint_placement<LCC>()).visitor(vis)
);

std::cout << "\nEdges collapsed: " << stats.collapsed
<< std::endl;
}

it's shows the following error :
no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka
‘std::basic_ostream’} and ‘const vertex_descriptor’ in the bolded code line




--
Sent from: http://cgal-discuss.949826.n4.nabble.com/



Archive powered by MHonArc 2.6.18.

Top of Page