Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5745

Curve domain of reversed curve

$
0
0

@Holo wrote:

Hi guys, I ran into a problem with a curve’s domain when the curve is reversed.

if I try this example script that adds a point at the middle of the domain then the point is added to the start of the curve:


import rhinoscriptsyntax as rs
obj = rs.GetObject("Select a curve")
if rs.IsCurve(obj):
    domain = rs.CurveDomain(obj)
    t = domain[1]/2.0
    point = rs.EvaluateCurve(obj, t)
    rs.AddPoint( point )

image

Is that expected behaviour?

I understand that this happens because the curve start that used to be “0” is now the curve end at “-0” and that the curve end at “140” is not the curve start at “-140”, but it seems a bit odd that the example fails on reversed curves.

(BTW: I made a workaround so I don’t need that :slight_smile: Thanks!)

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5745

Trending Articles