Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] How to list all the property maps of a surface mesh

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] How to list all the property maps of a surface mesh


Chronological Thread 
  • From: Maxime Gimeno <>
  • To:
  • Subject: Re: [cgal-discuss] How to list all the property maps of a surface mesh
  • Date: Tue, 20 Oct 2020 09:09:13 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:QMpaCxGRhXb9oWILApqRIZ1GYnF86YWxBRYc798ds5kLTJ76p867bnLW6fgltlLVR4KTs6sC17OJ9f+6Ej1dqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba5wIRmsrwjdqMYajI9iJ60s1hbHv3xEdvhMy2h1P1yThRH85smx/J5n7Stdvu8q+tBDX6vnYak2VKRUAzs6PW874s3rrgTDQhCU5nQASGUWkwFHDBbD4RrnQ5r+qCr6tu562CmHIc37SK0/VDq+46t3ThLjlSEKPCM7/m7KkMx9lK1UoByjqBJ/zYDaY5ybOuRica7GZ9wWWXBMU9xNWyBdAI6xaZYEAeobPeZfqonwv1wAogGxBAmtAePg1CJDiH733a0/zeshFwbG1xEnEtILqnvVo9T1NKIMXuyvw6nIzDDDYO1Q2Tf684XIfRUhruuNXbJ0a8be1U4vFwbcg1iWtIfqMC+b2P4XvGiH8+pvS/ivi2g/pgxyrTWixNshh4vUio8a113J6zt1zYQoKNCmVEJ2f8KoHZlOuyyEK4Z7QMAvT311tSsmxbALtp61ciYLxZg72hPSbeGMfYaP4hLmTumRIDF4iWpkeLK5nRay8FKvxvfyVsmu1ltBsylLksHUu3wTyxDe7tKLR/h980u7xzqDyhzf5vtLLE06k6fQNoQvzaQqlpUJtETOBi/2l1vyjK+Rbkgk//Kn6+XjYrn/oZ+cK5J4hhjwMqkhlMGzG+s4Mg8JX2iU/eSzyqfv8lH+QLVPlvE2k6/Zv47GJckDuKK1HwtY3pwg5hu/FTuqzskUkWUdIF9Kdh+Ll43pNEvPIPD8A/e/mVOskDJzyvDDJLLgDZTNLn3dn7v7crZ96ktcxxQ1zdBY/J9UBbQBL+jyWk/1rtDXEhg5Mwmsz+b9FNp9zp8eWX6IAqKBLKzSvkWH5uY2L+aRZY8VoyryK+U+5/71lnI5gl8cfayx3ZQNcny4H/JmI1+YYXX2mNsBH30K7UIDSvf3ggiCTSJLfCT1GLkt4ykyToOgF4bKAI63x6eQ2T+yWZxQaGcBAV+FFTLkdp6PRuwXOx+UOdJrsiABUe2hV5M5zkPp8xTrzqJuaOvS4CwR85z5k8Nk4vXa0hA0+zszBMuU1ySBTnp/g3gTFAIwx711nUFt1gKDzbRgmK4fUsdC4utAFAY8L5/VieJgTMvjXxrIOdaPRlHhSdqvBXQ9T8k63sQVMHp6Tt6thxSG0yuxCKIOjJSKAoY1++TSxSvfPcF4nlPPxKgkghEJQ85CM2ru0qt25wnWCsjGkkCUkaGCeqEV3SqL/2CGmznd9HpEWRJ9BP2WFUsUYVHb+IygtxHyCoS2ALFiCTNvjMuLK69EcNrs1AwUS/LqOdCYaGW0yT7pWES4g4iUZY+vQF0zmSXQDE9ezlIW9HeCcA8iX2Kv/zmYAztpGlbiJUjr9Lsm8S/pfgoP1wiPKnZZ+f+t4BdM3K6TTvoS2vQPvyJz8zg=

You can get the list of names of the properties attached to a given simplex type, with the function `properties<T>()`, but it won't return the actual thing, only a string.
So you can call `sm.properties<vertex_descriptor>()` and search for a string containing "normal", but then you would have to guess that it is actually a CGAL::Surface_mesh<Kenerl_t>::Property_map<vertex_descriptor_t, Kernel_t::Vector_3>  to get it. Or else you'll have to try for every possible type that could be a normal, like `std::array<float, 3>` for example, until one matches.


Le lun. 19 oct. 2020 à 23:36, Yaoyu Hu <> a écrit :
Hi there!

I am just wondering that for a surface mesh, without knowing the actual types of the property maps, can we get a list of the names (string) of the property maps? 

Or, without knowing the names (string) of the property maps, can we list all the property maps that have a specific type?

I'm thinking of scenarios like my upstream processing may produce a property map for vertex normals, but I do not know the type or the name of the vertex normal property map. I'd like to search for a property map that looks like a vertex normal property map. E.g I may look for a property map with the type of CGAL::Surface_mesh<Kenerl_t>::Property_map<vertex_descriptor_t, Kernel_t::Vector_3> but without knowing the name. Or look for a property map that has the name of "vertex_normals" (a non-conventional name) without knowing the type of the property map.

Regards,

Yaoyu

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss




Archive powered by MHonArc 2.6.19+.

Top of Page