Replies: 3 comments 5 replies
-
If I understand you correctly, you're looking for a way to offset using a position- and direction-dependent magnitude? I'm not sure if that would be easy to accomodate in the current offsetter. It might be easier to subdivide the polygon and project using a local equidistant projection, until a distortion criterion is met; then assemble the pieces in a intermediate, global projection (e.g. by using a small "epsilon" offset to "fudge" over map discontinuities, then apply a union). |
Beta Was this translation helpful? Give feedback.
-
The approach I took was to rotate the 3D poly points onto the xy plane, offset them, then rotate them back.
I've not fully tested it but it has been working with the 3D polygons I've test thus far. ;-) |
Beta Was this translation helpful? Give feedback.
-
Here's a better implementation (using a 4x4 rotation matrix) for flattening, offsetting, then restoring polygon points.
|
Beta Was this translation helpful? Give feedback.
-
I am interested whether Clipper2 provides or plans to provide tool to offset polygon in 3D. For example I have a polygon in 3D which belongs to cone surface. There are ways to project it into 2D and offset using this library. But transforming result back to 3D will not have the same offset because of distortion.
I have found such paper describing ways to solve this: here and wondered if something is already done in Clipper2?
Beta Was this translation helpful? Give feedback.
All reactions