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

IEnumerableList.duplicate(deepCop) when Transform?

$
0
0
var list = x.ToList();
    var list2 = new List<Curve>(x);
    var w = new List<Curve>();
    dynamic t ;
    for(int i = 0;i < x.Count;i++){
      t = Rhino.Geometry.Transform.Translation(y);
      x[i].Transform(t);
      w.Add(x[i]);}
    A = w;
    B = list;
    C = list2;


valuLst().gh (6.6 KB)

Hi, when Transform, even if we get the list in a list of another list, all the lists are removed from Value mode? For example, here A, B, C should not be equal? But equal?

var tmp = new List<object>();
    for(int i = 0;i < x.Count;i++)
    {tmp.Add(x[i].Duplicate());}
    var list = x.ToList();
    var list2 = new List<Curve>(x);
    var w = new List<Curve>();
    dynamic t ;
    for(int i = 0;i < x.Count;i++){
      t = Rhino.Geometry.Transform.Translation(y);
      x[i].Transform(t);
      w.Add(x[i]);}
    A = w;
    B = tmp;
    C = list2;

by this the technique is solved, :point_up_2:

but is there another solution to the duplicat (deepCopy) {IEnumerable<T>List(RhinoObject)}?

Now tmp! = W or A! = B;

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4153

Trending Articles