Beispiel #1
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            DMesh3_goo goo   = null;
            Plane      plane = new Plane();
            bool       cap   = false;

            DA.GetData(0, ref goo);
            DA.GetData(1, ref plane);
            DA.GetData(2, ref cap);

            DMesh3 ms = new DMesh3(goo.Value);

            g3.MeshPlaneCut cutter = new g3.MeshPlaneCut(ms, plane.Origin.ToVec3d(), plane.ZAxis.ToVec3d());
            cutter.Cut();

            if (cap)
            {
                cutter.FillHoles();
            }

            DA.SetData(0, cutter.Mesh);
        }
 public PlanarHoleFiller(MeshPlaneCut cut)
 {
     Mesh = cut.Mesh;
     AddFillLoops(cut.CutLoops);
     SetPlane(cut.PlaneOrigin, cut.PlaneNormal);
 }