Create.NewFloor() to Floor.Create() question

Create.NewFloor() to Floor.Create() question

dtartaglia_PYEBEB5KA84W
Enthusiast Enthusiast
361 Views
3 Replies
Message 1 of 4

Create.NewFloor() to Floor.Create() question

dtartaglia_PYEBEB5KA84W
Enthusiast
Enthusiast

Hi,

 

The previous code (Create.NewFloor) took a List<CurveArray>. Floor.Create() takes a List<CurveLoop>. Is there a way to convert one to the other?

 

Thanks,

Dan

0 Likes
Accepted solutions (1)
362 Views
3 Replies
Replies (3)
Message 2 of 4

moturi.magati.george
Autodesk
Autodesk

Hi @dtartaglia_PYEBEB5KA84W,

Since Create.NewFloor() is obsolete, I think you can convert CurveArray to CurveLoop using the code below:

CurveArray ConvertLoopToArray( CurveLoop loop )
{
      CurveArray a = new CurveArray();
      foreach( Curve c in loop)
      {
        a.Append( c );
      }
      return a;
}
  Moturi George,     Developer Advocacy and Support,  ADN Open
0 Likes
Message 3 of 4

dtartaglia_PYEBEB5KA84W
Enthusiast
Enthusiast

Hi @moturi.magati.george

 

The code you supllied converts a  CurveLoop to a CurveArray. I need a way to do the opposite.

 

Thanks,

Dan

0 Likes
Message 4 of 4

Accepted solution

I think I figured it out. Needed to change to CurveLoop earlier in my code.

0 Likes