Variable Width Offsets #499
Replies: 10 comments 12 replies
-
Hi Marius.
Yes, Clipper can certainly help, but you'll still need to do a lot of work too, and make relatively minor modifications to Clipper.
|
Beta Was this translation helpful? Give feedback.
-
http://www.angusj.com/clipper2/Docs/Units/Clipper/Functions/SimplifyPaths.htm |
Beta Was this translation helpful? Give feedback.
-
Also, see some draft variable offset code here: |
Beta Was this translation helpful? Give feedback.
-
I'd like to have another look at this, so a smallish data sample would be helpful. |
Beta Was this translation helpful? Give feedback.
-
Edit: OK, I can see now if I make the SVG image 10x bigger that there are tiny imperfections in the path, just as you've indicated. |
Beta Was this translation helpful? Give feedback.
-
Sorry. You were the totally unworthy target of some of my minor frustrations at others who've asked much less considered questions. |
Beta Was this translation helpful? Give feedback.
-
😁. Try this ... in OffsetPoint():
|
Beta Was this translation helpful? Give feedback.
-
Marius, could you please provide the data for this second case (plus the offsetting code). |
Beta Was this translation helpful? Give feedback.
-
What I was after was the code you're using to generate the offset. For example ...
And with offset of 20, I'm not seeing any imperfections in the solution (using my amended (If you just click on the image above, GitHub will make a mess of it. So you'll need to save it to file and then open it with your web browser.) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@AngusJohnson, thanks a million for creating and maintaining this fantastic library!
I work with landscape architecture. A relatively common challenge in the design process is finding variable-width offsets of linear features. Real-life example:
The top curve is the one I care about as a designer, the bottom one is a result of projecting perpendicular rays onto the underlying terrain. All is fine, as long as the guiding curve is not concave and/or the target surface relatively close. Things can get messy, though:
2023-04-20.08-28-47.-.Trim.mp4
In our profession, we face these challenges all the time:
Do you have an idea how Clipper could help here?
Beta Was this translation helpful? Give feedback.
All reactions