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 04:31:29 -0600 (CST)
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=SoftFail ; spf=Pass
  • Ironport-phdr: 9a23:cRWfjxGjZK3qqojLsE7lKJ1GYnF86YWxBRYc798ds5kLTJ78pM6wAkXT6L1XgUPTWs2DsrQY07qQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmDmwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VDK/5KlpVRDokj8KOTA5/m/JicJ+ka1Urw6uqRFk347UeZ2ZOOZicq/Bf94XQ3dKUMZLVyxGB4Oxd40PD+8cNutfsYb9oVQOoQG4BQmrGePv0D9IiWXw3aEg1uQhFgHG0xYlH90QrXvZt9r1NKIIXuC0yKnE1ynMb/RT2Trk7oXDbx4vofaJXb1qcMrRz1EiFwXfgVqLsoPlOy2a2v4RvGic6uptU/+khW0/qwxpvzSiwsMhhpPHi48W0FzJ9iR0zJw0KNC5TkNwfMSqH4FKty6AMot7WsMiTH9suCY90rAGv5G2cDIMyJs93BHQcPiHfJaS7h3/U+aRJC90hHNjeL2hmxa/6VWsx+n4W8Wu3ltHrTBJn9rNu3wX1hHe69CLSv5n8Ueg3TaP2RrT6uZBIU0si6XbLZEhzqQ2lpoUrETDBC/2l1/wjKOMc0Uk/eio5P7iYrr4u5CRLIB0igTkPaQvnsyzG/g3Mg8LX2SD4+SzyKXj/VHlQLVNlvA5jqbZv4reJcgCu6G5AhRV3Zo+6xakFDery88YnHkCLFJdYh2LlYnpO1fUIPD5F/izmVqskC04j8zBa7buC5GIInnYm6r6Zp587VRdwUw914Nx/ZVRX7cEaKb+XEC3stvFFB8wNUqxxObuDdhx/owbUGOLRKSeNfWB4hez+uszLrzUN8cuszHnJq19vq+8vToCgVYYOJKR894SYXG8EO5hJhzAM3Xpi9YFV2wNu1hlFbC4uBi5STdWIk2Kceck/DhiUdCpCI7CQsamh7nThH7mTK0TXXhPDxW3KVmtd4iAXK5ROiTOZMlomDYAWP6qTIpzjBw=

'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