Square to circle

   1862   5   2
User Avatar
Member
177 posts
Joined: 8月 2018
Offline
Building a little procedural setup:
Working with a simple 2x2 grid. My set up has an option for corner rounding with polybevel. All good.
However, sometimes my grid may be a square. In that case I'd like the maximum rounding to deliver a 'perfect' circle.
Because each rounded corner has a point at the end of the 90 degree arc, bevel collision avoidance seems to prevent rounding to a full circle.


Can anyone suggest an elegant solution?
Image Not Found
Edited by Mike_A - 2022年12月2日 10:59:07

Attachments:
square to circle.hiplc (126.1 KB)
square to circle.jpg (34.2 KB)

User Avatar
Member
24 posts
Joined: 12月 2014
Offline
Mike_A
Building a little procedural setup:
Working with a simple 2x2 grid. My set up has an option for corner rounding with polybevel. All good.
However, sometimes my grid may be a square. In that case I'd like the maximum rounding to deliver a 'perfect' circle.
Because each rounded corner has a point at the end of the 90 degree arc, bevel collision avoidance seems to prevent rounding to a full circle.
Image Not Found


Can anyone suggest an elegant solution?
Image Not Found

Just a remark on the polybevel / point / Shape: round
This does not produce circle arcs. It's producing some kind rounded path, good enough for viz to look like an arc circle, but it's not converging to a circle arc. - as of H19.5

Just in case you actually needed a circle arc, and somehow expected that Polybevel was trying to make a circle arc out of the point... The actual shape is never mentioned in the documentation

**

However, there is a trick to do it with polybevel: it produces an actual circle arc when used on an edge.
So you can polyextrude a 2D polyline, somehow group the edges that are in the ExtrudeSide group, and polybevel /edge / round said group.

As a bonus (because it's a surface), you can use all the options in the Collision Tab especially: Detect Loops, and Stop Loops: Simultaneously.

There is also a way using the new Curve SOP, which can, in certain cases, make nice rounded corners which are actually circle arcs.
The drawback is that it's an interactive tool, and I can't find a way to use it procedurally, at least with an input with a variable topology.

If you want to give it a try:
Grid 2x2 -> SOP Convert /Bezier Curve/ Check Interpolate though Hulls / <- this will create a Bezier curve that looks like the input, and has the right structure for the next step
Then Curve Bezier SOP
At this point in the UI, switch to select/ edit mode, drag / grab around all the points, and click create rounded corners in the viewport
Edited by alecaille - 2022年12月2日 16:16:51
User Avatar
Member
177 posts
Joined: 8月 2018
Offline
Useful info and a neat tip - thanks alecaille
Edited by Mike_A - 2022年12月3日 19:24:46
User Avatar
Member
471 posts
Joined: 7月 2005
Offline
Hi,
I've done some experiments in VEX with circular beveling a while ago. It works for open polysplines (with a modification for closed polysplines aswell). It also works for non-planar curves. But there might be some issues, if you don't set radius correctly, you may have overlapping parts. The workaround using the polybevel for extruded shapes (which alecaille mentioned) gives similar results, but you have to identify the original path points, which can be done (for example) by adding new polylines for each neighnour ignoring the edges, where the halfedge count is 2 (two sided edge) and polypath to connect each segment.

Attachments:
circle_corner_from_grid.hipnc (139.1 KB)

User Avatar
Member
177 posts
Joined: 8月 2018
Offline
Many thanks Aizatulin - I'll give that some study. Appreciated!
User Avatar
Member
330 posts
Joined: 4月 2018
Offline
You can pull this off with the Superquad shape.

https://gfycat.com/RipeImportantAfricanbushviper [gfycat.com]
  • Quick Links