# Meshing operations in Julia

**URL:** <https://discourse.julialang.org/t/meshing-operations-in-julia/87609>\
**Category:** Specific Domains\
**Tags:** mesh, meshes\
**Created:** [September 21, 2022, 11:54pm UTC](https://discourse.julialang.org/t/meshing-operations-in-julia/87609 "2022-09-21T23:54:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yewalenikhil65](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yewalenikhil65/32/26873_2.png) [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Post date:** [September 21, 2022, 11:54pm UTC](https://discourse.julialang.org/t/meshing-operations-in-julia/87609/1 "2022-09-21T23:54:23Z")

</div>

Is it possible to do following Meshlab operations using Meshes.jl or similar package ?

```python
model.meshing_remove_connected_component_by_diameter()
model.meshing_remove_connected_component_by_face_number()
model.meshing_remove_folded_faces()
model.meshing_isotropic_explicit_remeshing(targetlen=ml.Percentage(0.5))

```

Descriptions as per meshlab are available here [List of Filters — PyMeshLab documentation](https://pymeshlab.readthedocs.io/en/latest/filter_list.html#meshing_remove_connected_component_by_diameter)

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [November 16, 2022, 8:32pm UTC](https://discourse.julialang.org/t/meshing-operations-in-julia/87609/2 "2022-11-16T20:32:47Z")

</div>

@yewalenikhil65 sorry I missed the question. It would help if you could share the exact meanings of these operations. It is hard to tell otherwise.

---

<div class="post-metadata">

**Author:** ![yewalenikhil65](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yewalenikhil65/32/26873_2.png) [@yewalenikhil65](https://discourse.julialang.org/u/yewalenikhil65)\
**Post date:** [November 17, 2022, 3:37am UTC](https://discourse.julialang.org/t/meshing-operations-in-julia/87609/3 "2022-11-17T03:37:28Z")

</div>

> [@yewalenikhil65](#):
>
> `l.meshing_remove_folded_faces()`

These operations fall under cleaning and `repairing` meshes inside Meshlab… To quote its function from docs, please check following image from Meshlab documentation

 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/1/910f0f6ab8d23f5ad31bfd3303fd0f0c17257083.png)

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [November 17, 2022, 9:20am UTC](https://discourse.julialang.org/t/meshing-operations-in-julia/87609/4 "2022-11-17T09:20:20Z")

</div>

These should be easy to produce with the infrastructure in Meshes.jl. For example, given a `mesh` you can extract the graph of vertices as an `adjacencymatrix(mesh)`, use Graphs.jl to find the connected components and then use the `vertices(mesh)` to decide whether or not a component satisfies a given criterion for removal. Of course there are many details to address, but the building blocks are there.

Feel free to reach out in our Zulip channel if you have more specific questions or if you would like to implement these functions yourself.
