Domain in curve

I wanted to ask a question about domains,
But should you be able to select the domains to use in a curve?
Thanks!

Hi @0904,

Yes, it is possible to set the domain of a curve. In general, however, we try to discourage developers from doing too much of this.

Poorly parameterized objects may not intersect and trim properly when combined with other objects. “Poorly parameterized” means the curve’s domain or the surface’s u or v spaces are tiny or huge compared to the size of the object.

When curves and surfaces are paramterized with a [0,1] domain, both the accuracy and the precision of geometric calculations like intersections and closest points are reduced, sometimes dramatically. Ideally the domain of a curve is close to it’s length and the domains of a surface is close to is average breadth in the appropriate direction.

We try to have parameterization match the length of a curve or some measure of the width of the surface. Derivative information is better if we do it this way.

Does this help?

– Dale

thanks Dale,
would an example code be possible?

Any help on that?
What examples to look for?

Thanks for the answer Lando

No it’s not about reparameterize

I would need to do the same thing without GH

So you want to create subcurves?

The subcurve component splits the curve with the bounds of the given domain

If you have a curve “myCurve” and the two parameters for the domain “t1 t0” in code you can do it like this:

MyCurveSplitted = myCurve.Split([t0, t1])

MyCurveSplitted then holds the parts of your original curve und you will habe to figure out which one you want.
You can read up on this here:
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Curve_Split_2.htm

1 Like

Hi Lando,

Must work as subcurves
but parametric as copy curve

PS in the picture I show that changing the domain changes the length of the Subcurve this would serve me

Did you try the sample? If you run the code twice with different values for t0 and t1 you get what you are describing

but, reparameterize the curve only…

It’s not about creating a SUBCRV
But, to customize the part you want to see