Grasshopper

algorithmic modeling for Rhino

hi all,

 

I know this is a very basic question. but I am trying to set the domain of a curve to t0=0 and t1=1. 

 

in the c# component i referenced x as a curve.

I tryed 

 

x.Domain.T0(0);     

x.Domain.T1(1); 

 A = x;

 

But it doesn´t work....

 

Can any one help me?

 

thanks in advance!

 

Benjmain 

Views: 3294

Replies to This Discussion

Hi Benjamin,

 

the Interval type in RhinoCommon is a struct (Value Type), not a class (Reference Type). What this means is that when you ask a Curve for it's domain, you get a copy of the actual interval. Changing this copy doesn't accomplish anything and therefore the compiler won't let you do it.

 

x.Domain = new Interval(0, 1);

 

is what you want.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

 

I have got it! Thank you very much!

 

best 

 

Benjamin 

Hi Benjamin and David,

 

Is there any way to do this (set curve domainthe to 0-1) without the C# component (without scripting i mean)

 

Thanks,

 

Yuval

Right click on any curve input and select 'reparameterize'

simple and helpful

Thanks!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service