MoI discussion forum
MoI discussion forum

Full Version: Rebuild curve variation

Show messages: All  1-2  3-5

From: archetype (FABIENF)
14 Aug 2018   [#3] In reply to [#2]
Hi Michael,

The segments would not necessarily have equal length (although it might be a nice option to have available). I am most interested in an adaptive algorithm, where tight bends yield short segments and vice versa. Being able to choose the number of segments would be the way to go then.

Although I suspect that there's a certain threshold, in terms of minimum segments before falling back to another (green line in the example) algorithm or simply fail with a warning. I think three would be too low to represent such a curve at all, no?

Ideally, such a script would allow an offset value from the initial curve as well, although doing an offset manually afterwards would be fine.

It's a real-world use-case by the way, related to the stuff I've shown you recently.

Thanks,

Fabien
From: BurrMan
14 Aug 2018   [#4] In reply to [#3]
you could do that currently by using the save point file and import point file commands.

So, rebuild your curve to your point count (Or you already have the curve with point count)

Show the points and copy and past them, then save the point file.

Importing the point file gives the option to bring it in as a polyline.

Maybe a scriptor can combine all of this into a single, realtime command...
From: Michael Gibson
14 Aug 2018   [#5] In reply to [#3]
Hi Fabien, yes your desired result does look like the control polygon of a curve so try doing a regular curve rebuild and then extracting the control polygon like Burr writes above. Yours kind of looks more like a quadratic curve's control polygon so you might try doing a FitCrv in Rhino with Degree=2 and see if that's closer or not.

> I think three would be too low to represent such a curve at all, no?

Yes I think so but that can kind of indicate that what you're asking for is not very well defined as a specific algorithm. A script needs to follow some specific steps.

- Michael

Show messages: All  1-2  3-5