4

I'm using a 3d printer that create to wide walls (all dimensions are 0.3mm too big) also I need to correct the stl file by eroding it. Is there such a feature in meshlab ?

Entretoize
  • 2,124
  • 3
  • 23
  • 44

2 Answers2

3

A different method (slower but topologically more accurate) is using the uniform mesh resampling filter and specifying a positive (negative) offset for obtain a dilate (erode) effect. In this case a new, approximated, mesh is created and precision (and time) depends on the precision parameter you set.

ALoopingIcon
  • 2,218
  • 1
  • 21
  • 30
  • But this will modify the topology of the mesh. For example, I have dilated an icosahedron (12 vertex, 20 triangles) with uniform mesh resampling and the result has 5520 vertex and 11036 triangles. Also, it will smooth every edges and vertex so they will be smooth. This may be a desirable or undesirable effect. – Rockcat Oct 24 '19 at 09:14
  • 1
    A topologically correct dilation (erosion) *needs* a remeshing of the surface. Simple example: if you dilate a torus, at a certain point the hole will disappear... So normal-translation of vertices correctly works for small offsets and/or "regular" simple shapes. – ALoopingIcon Nov 11 '19 at 12:16
1

There is a very easy way to achieve dilate/erode. Use the filter -> "Smoothing, fairing and Deformation" -> "Per Vertex Geometric Function" and create a function that add/subtract the value of the normal to the coordinates of each vertex:

x = x-nx
y = y-nz
z = z-nz

If you need to erode by a given factor, just multiply the normal by that factor.

x = x-0.3*nx
y = y-0.3*nz
z = z-0.3*nz
Rockcat
  • 3,002
  • 2
  • 14
  • 28
  • Thank you, but what happen when a vertex is shared between some angle faces ? The translation along each face normal will be smaller than the 0.3 I need I think. – Entretoize Oct 24 '19 at 14:37