Subject: CGAL users discussion list
List archive
- From: Mael <>
- To:
- Subject: Re: [cgal-discuss] How to specify Edge Collapse Constrained Border
- Date: Fri, 2 Aug 2019 23:28:35 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:W9xx6Rw6AxOgdq/XCy+O+j09IxM/srCxBDY+r6Qd2+ISIJqq85mqBkHD//Il1AaPAdyBraMVwLON6ejJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglVmjaxe7d/IRG5oQnMuMQan5ZpJ7osxBfOvnZGYfldy3lyJVKUkRb858Ow84Bm/i9Npf8v9NNOXLvjcaggQrNWEDopM2Yu5M32rhbDVheA5mEdUmoNjBVFBRXO4QzgUZfwtiv6sfd92DWfMMbrQ704RSiu4qF2QxLulSwJNSM28HvPh8JtkqxbrhKvqR9xzYHab46aNuZxc7jHct8GX2dMRNpdWiJDD466coABD/ABPeFdr4TloFUBtwWxBQ2xD+7ozz9HnGH53akg3+Q7FgHGwQMhEMwKsHjOqNX6LrwdXvurw6TTwjXMcfRW2TLj54jUaBAgof+MUqhsfsrNzkkvDQPEgk+MpoziOjOYz+IAuHWV4epnUOKgkW8nqwdprzip3MgjkZLGhoYLxVze6Sp5x4M1KcWkR050e9GkFIFctyaAN4t5Ws8tWGZouCEhyr0ao5K7ezIKyJshyhXCaPKHa5CF7xHhWeqLJTp1h2hpdK+9ihu860Ss1/HwW8es3FtJrydJiMfAumwN2hDJ9MSKRftw8l281TuM2A3e7PxPL1oumqrBMZEhx6Y9lpoNvkTHGS/7gEX7gLWTdkUj+uWk8eHnba/npp+YLoN0jRz+Mrg0lsy4H+Q4MhICX26F9uSgzLHj/Ev5T6tWjvAukaTUsorWKMAYq6KjHgNY0Igu5wyiAzu63tkUhXwHI0hEeBKDgYjpIVbOIPXgAPe6mVujjjNry+rcPr3mH5XMIWbMkLP7cbZ58UFT0xE8ws5E6pJbFL4BJ/fzVVHttNzCDh45PRa7zPr7CNV6zIMfWXiDDbOeMKPXqVOI/P4gI/GQZI8JvzbwM+Qq5/H0gn89gFMSYKip3YALZ3ClBfRmOF6UYWHsg9cECWcFpBAyTO3siF2YUD5cfWy+X6wm5mJzNIXzBojKQsWhgaeKwTygNpxQfGFPTF6WQlnycIDRfv4BbGrGJ8ZslnoeUqWxRotn0RikvgLSxLdgK+fI4DwWvJn/08JkoebUkEdhpnRPE82B3jTVHClPlWQSSmpuhfwtkQlG0l6GlJNArblAD9UJvqFGXwA/OILG3uJzAMz1QBOHddCMGg7/H4eWRAopR9d0+OcgJkZwH9L40kKemS+tXvkQnr2PQZsp7uTbwXi3IcthmS6fhfsRymI+S84KDlWIw6t29gzdHYnMyRzLmKutcKkAxj/D/WyfynCf+kpfVVwoXA==
Hello, The documentation for the edge collapse function is here: https://doc.cgal.org/latest/Surface_mesh_simplification/group__PkgSurfaceMeshSimplificationRef.html#ga5f51d0ea2897f3c22e870279cfb4bd41. This optional parameter must be a property map (see https://www.boost.org/doc/libs/1_49_0/libs/property_map/doc/property_map.html)
that will answer whether an edge of your mesh can be simplified or
not (if not, it is said to be constrained). The API
that the simplification algorithm uses to query the map and that
your property map must respect is "get(the_property_map,
edge_descriptor)". In the example, the property map that we use is
called "bem" (for "border edge map"), and is of type "Border_is_constrained_edge_map". It's a
simple struct that simply calls CGAL::is_border()
for any query edge of 'surface_mesh' and thus we will never
collapse any border edge. As you can see, it defines the
"get(pmap, edge)" operator required. The one that is passed to the
algorithm is constructed at line with the following: 'Border_is_constrained_edge_map
bem(surface_mesh);'. Now, to pass this property map to the function, we use something called named parameters (also from the boost library originally). Named parameters a way to pass optional parameters without having to respect a specific order. Instead you just use a tag to indicate what you are passing as parameter. In the example, this is the part ", CGAL::parameters::edge_is_constrained_map(bem).get_placement(Placement(bem)": the last parameter of the edge collapse function is all the optional parameters. Here, we are passing two optional parameters: a specific placement (this is completely irrelevant for your question), and an edge constraint map (tag: edge_is_constrained_map, object: bem). Thus the algorithm will call the get operator of bem (the object of type Border_is_constrained_edge_mapĀ defined above) to check if it is allowed to collapse some edges or not. I hope this clarifies things for you. Best On 02/08/2019 22:26, Shrabani Ghosh
wrote:
Hi, I am trying to use the edge collapse constrained border example. I have tried on a few example data. Every time there are 6 edges that are nonremovable. I think somewhere the program sets 6 edges as non-removable. Could you please help me which part of the program specifies that? I am referring to this example. https://doc.cgal.org/latest/Surface_mesh_simplification/Surface_mesh_simplification_2edge_collapse_constrained_border_surface_mesh_8cpp-example.html I am new on CGAL. Any help will be really appreciated. Regards Shrabani Ghosh -- Sent from: http://cgal-discuss.949826.n4.nabble.com/ |
- [cgal-discuss] How to specify Edge Collapse Constrained Border, Shrabani Ghosh, 08/02/2019
- Re: [cgal-discuss] How to specify Edge Collapse Constrained Border, Mael, 08/02/2019
- Re: [cgal-discuss] How to specify Edge Collapse Constrained Border, Shrabani Ghosh, 08/05/2019
- Re: [cgal-discuss] How to specify Edge Collapse Constrained Border, Mael, 08/02/2019
Archive powered by MHonArc 2.6.18.