Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Convert Polyhedron_3 Vertex_handles to integers

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Convert Polyhedron_3 Vertex_handles to integers


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] Convert Polyhedron_3 Vertex_handles to integers
  • Date: Tue, 26 Feb 2019 08:15:59 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:5CwnKBf9YMx9QunM7R62spcPlGMj4u6mDksu8pMizoh2WeGdxcS5YR7h7PlgxGXEQZ/co6odzbaO4+a4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTahYr5+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hycdLzM37X/ZisJwgqxYrhyuqRNwzIzIb4yOLvVyYrnQcMkGSWdPXMtcUTFKDIOmb4sICuoMJfpVr4/gqFsUsxSxHxKsD/7vxDBSnXD2x6w62PkmHA7c2gwvAsgOv2rOo9XuLqsSX/q6w7LSzTXCdP5W1iny6I/Nch8/vfGMR7JxccTLxkYzCwPFiU+QqIz/MzyJ0eQNtnGW4ux9XuyhjG4nrht+ojmpxso0lobJiZgaylTe+SV+2oY1Ktu1Q1N4b968CJZduCCXO5FrTs8+Q2xkoik3x7IctZKmeCUHyowrywDFZ/Cac4WE+B3uWPiLLTtlhH9pZbSyjAuo/0e60O3zTMy03U5KriVbltnMsWgA2hLJ5siCTftx40Ws1DWV2wDW8O5EIEQ0mbPcK5483r48jJ0TsVrDHiPsnkX5krOWel0l+uiu9evnfq3rq5CdOoNulw3yLqQjltawDOk3KAQCQmyW9Oak2L3m50L5QbFKjvMskqnetZDXPd4UpqikDA9PzIks8Q2/Ay2o0NsChnYHNlNFdQmIj4f3PFHOJe73Deulg1Wsnjdk3ezJPqHmApXXLnnPiqvufbF460JE0go80chf545ICrEGOP/8RkDxu8bcDhMgLgO0wv3nB8lg1oMFQmKCGbSZMaPXsV+Q/O0jOeiMZIkPuDb8Mfcp/fDujWVq0WMaKKKm1J9SZHGjFel9OG2YZ2Dti5EPCzQkpA07GcXshEePWCUbSX+4RaN0sjg9BJirBJyFSImnmr2p0yq8G5BKfHFIA1uQFm35MY6DXqFfO2qpPsZ9n2lcBvCaQIg72ET27V6o+/9cNuPRvxYgm9fm3dlx6ffUkEtrpzN5CMGQz3ucQWh/gmQSVnk926Ut+RUhmGfG6rBxhrljLfIW/+lACF5oOpPbyuFmEcH8Uwndec2YDl2hR4f+WGxjfpcK29YLJn1FNZCigxTEhXT4WPkQkOXUVNox+6PYmn/sO4B61XaA0qQ93QEr

Hello,

On what do you want to apply std::distance ?

You can add an int field to vertices as described here: https://doc.cgal.org/latest/Polyhedron/index.html#title12

You might switch to Surface_mesh   https://doc.cgal.org/latest/Surface_mesh/index.html
as the Vertex_index   is fundamentally an int

Andreas

On 2/26/2019 5:50 AM, Robert Sage wrote:
Hello, 
We need to convert Polyhedron_3 facet vertices from Vertex_handle to integer ids exactly like I see in:
https://doc.cgal.org/latest/Polyhedron/Polyhedron_2polyhedron_prog_off_8cpp-example.html
So we have adapted this code but are observing each std::distance operation runs at O(n) and thus the whole conversion takes a long time for Polyhedron with many facets. Is there a more efficient way?  
Thank you!
Robert
-- 
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project

phone: +33.492.954.912    skype: andreas.fabri



Archive powered by MHonArc 2.6.18.

Top of Page