Closed ccoustet closed 1 year ago
Hi again Christophe. Could you please explain what you mean by truncation?
Hi Angus,I call truncation the loss of precision resulting of the scaling-unscaling process I apply when creating the polygons.The exact position of the vertices is not so important to me (and cannot be fully preserved anyway). What is important is that, once created, the vertices does not change if they should not, or holes will appear in the final geometry. Dr Christophe Coustet
OK. Obviously when the offset delta is 0, then the input paths should be returned unchanged. And this already happens if you use ClipperOffset directly. However the InflatePaths function(s) which call ClipperOffset internally aren't doing this, and this is particularly problematic for the float point version since is scaling and descaling etc without otherwise doing anything. Will fix.
Hopefully fixed now 🤞🙏.
Hi everyone, My software needs the coordinates to remain consistent between operations.* I tried to apply truncation at the very beginning of my polygon creation (using the same scale/inv_scale process used in InflatePaths).
This way offset operations retain full precision (critical with offset=0). The problem is that I just discovered that the clipping process in ClipperD::ClipperD, the one involved in clipping operations, is different: I no longer have a way to early truncate polygons to ensure NULL ops let them unchanged.
I have no problem with either of the two ways to truncate, but I would need the same to be used consistently in any truncation operation in the library.