algorithmic modeling for Rhino
I wanna create List<Surface> something like that (Bottom).
What's the problem of my script ?
protected override void SolveInstance(IGH_DataAccess DA)
{
Brep brep = null;
double factor = double.MaxValue;
if (!DA.GetData(0, ref brep))
return;
if (!DA.GetData(1, ref factor))
return;
List<Surface> srfs = new List<Surface>();
Interval inter = new Interval(0, 1);
for(Int32 i = 0; i <brep.Surfaces.Count ; i++)
{
brep.Surfaces[i].SetDomain(0, inter);
brep.Surfaces[i].SetDomain(1, inter);
Point3d center = Point3d.Unset;
center = brep.Surfaces[i].PointAt(0.5, 0.5);
brep.Surfaces[i].Transform(Transform.Scale(center, factor));
srfs.Add(brep.Surfaces[i]);
}
DA.SetDataList(0, srfs);
}
Thanks in advance :D
Tags:
Hi Hannes ~
You mean brep or brep face data type has trimmed information ?
Thanks :D
A Brep is a topological type collection of objects, it consists of the following data (not an exhaustive list):
--
David Rutten
david@mcneel.com
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by