# Selection bits?

**URL:** <https://forum.techsoft3d.com/t/selection-bits/4145>\
**Category:** HOOPS Visualize Web\
**Created:** [October 23, 2024, 8:10pm UTC](https://forum.techsoft3d.com/t/selection-bits/4145 "2024-10-23T20:10:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![guillaume.robichaud](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@guillaume.robichaud](https://forum.techsoft3d.com/u/guillaume.robichaud)\
**Post date:** [October 23, 2024, 8:10pm UTC](https://forum.techsoft3d.com/t/selection-bits/4145/1 "2024-10-23T20:10:56Z")

</div>

We’re having performance issues when using pickAllFromPoint but I see we can filter based on selection bits: [PickConfig — HOOPS Communicator Documentation](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/Communicator.PickConfig.html#Communicator.PickConfig.requiredBitsAll)

I’m wondering how to set those bits on meshes we create dynamically…

Also, would that even help performance-wise?

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [October 23, 2024, 9:36pm UTC](https://forum.techsoft3d.com/t/selection-bits/4145/2 "2024-10-23T21:36:29Z")

</div>

Hello @guillaume.robichaud,

In the [MeshData](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/MeshData.html#meshdata) class, there are functions which take on a bitmask as the last parameter:

- [addFaces](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/MeshData.html#MeshData.addFaces)
- [addPoints](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/MeshData.html#MeshData.addPoints)
- [addPolyline](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/MeshData.html#MeshData.addPolyline)

As far as potentially improving the overall selection performance, I’m not so sure if it will have an effect.

Thanks,  
Tino
