Hey !
Ok this time no repo because it’s kind of a theory problem. Ca we scale a mesh in order to have a kind of margin all around the “shrinked” mesh. I have tried with the scaling option but it’s not working at all. I have tried a lot of math on the scaling side.
An example of what I want :

I know on simple meshes scaling would work but on more complicated ones it hasn’t for now.
here is how I calculate my ratios for the scaling:

[“x”, “y”, “z”].forEach(function(e){
var min = self.getMinSizeOriented(e); //basicly boundingbox.minimum
var max = self.getMaxSizeOriented(e); //asicly bounginfbox.maximum
var size = max - min;
var value = 1 - (2 * self.shrinkDistance)/size
ratios[e] = value >= 0 ? value : 1;
});

I don’t really understand what you do here but I need to do this but without using the scale option… Because on non convex elements the scale option doesn’t apply a margin but just scales down the element. The final objective to this is to be able to get only the margin of a mesh like here :