(core): new service module::core::data::SGetMesh
Description
This service is introduced in the context of the rework of sight::module::data::SExtractObj
. Please refer to #799 (closed) for details. It will replace the usage of sight::module::data::SExtractObj
for meshes and the usage of
sight::module::data::SExtractMeshByType
.
Proposal
The service configuration will be a bit more complex. Indeed, we already have a service that can extract meshes from a model given their type. Here is its current configuration:
<service uid="..." type="sight::module::data::SExtractMeshByType" >
<inout key="source" uid="...">
<extract type="organ1" />
<extract type="organ2" matching="(.*)surface(.*)"/>
</inout>
<out group="target">
<key uid="..."/>
<key uid="..."/>
</out>
</service>
Contrary to the previous new extraction services, the proposal here is to modify this existing service to make it a bit more generic. We should:
- add the possibility to set an index instead of a type
- simplify the configuration to match the layout of the other 3 previous services, by putting the parameters in the out group, and setting more meaningful key names.
- rename the service to
SGetMesh
At the end, we should have a configuration that looks like:
<service uid="..." type="sight::module::data::SGetMesh" >
<inout key="modelSeries" uid="..." />
<out group="mesh">
<key index="3" uid="..."/>
<key type="organ1" uid="..."/>
<key type="organ2" matching="(.*)surface(.*)" uid="..."/>
</out>
</service>
where:
- modelSeries is a
sight::data::ModelSeries
- mesh group data are
sight::data::Mesh
The service must be implemented, tested (in a unit-test). In existing XML configurations, the occurrences of SExtractObj
where this service is used to extract meshes must be replaced.
Links / references
#799 (closed) for details.