Skip to main content
Question

Polygon generalize

  • September 10, 2020
  • 3 replies
  • 160 views

venu
Contributor
Forum|alt.badge.img+5
  • Contributor

The below shown image polygon is generated from 4 lines and the big vertical line's top and bottom portion of polygon should be smooth like shown below expected output.

 

Please can suggest the workflow to achieve the result.

 

Input

Input

 

Expected outputOutput

 

3 replies

caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • September 11, 2020

Use the Generalise transformer. Only problem is it will smooth the entire polygon, not just the "ends".


venu
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • September 11, 2020
caracadrian wrote:

Use the Generalise transformer. Only problem is it will smooth the entire polygon, not just the "ends".

Thanks for your response. I tried the result was not satisfied.

@Takashi Iijima​ 

Please can advise for to achieve.​


Forum|alt.badge.img+1
  • September 14, 2020

It might require a bit of work, but if you can extract the 3 end points on each end of this shape, which is easily done, you can use an arc estimator with these 3 points, or a 2DArcReplacer if you have more informations and want it a bit more precise.

And after you get the 2 arcs needed, you just assemble them with your output, as "Arcs and ellipses will be stroked prior to the calculation of the hull.", so not with the input.

If you know how to fill the blank/empty space, use the transformer, I don't know if there is one

If you don't, you can fill it with a custom transformer using python (might require multiple calls)

https://matplotlib.org/3.2.1/api/_as_gen/matplotlib.pyplot.fill_between.html

And finally use the dissolver to erase any interior leftovers

Sounds tortured, and it is, but it should work. There might be and easier way.

 

Hope this helps


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings