コード例 #1
0
 public override bool Execute(ExecutionInfo exInfo = null)
 {
     if (Points != null && Points.Count > 2)
     {
         if (!Points.ArePlanar())
         {
             throw new Exception("Points do not lie on the same plane!");
         }
         // TODO: Check for re-entrancy!
         PlanarRegion pRegion = new PlanarRegion(new PolyLine(Points, true));
         Element        = Model.Create.PanelElement(pRegion, exInfo);
         Element.Family = BuildUp;
         return(true);
     }
     else
     {
         throw new Exception("Insufficient points to define a panel!");
     }
 }