Domain in curve

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?

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