public override bool Execute(ExecutionInfo exInfo = null) { if (Perimeter != null && Perimeter.Plane() != null) { PlanarRegion pRegion = new PlanarRegion(Perimeter); Element = Model.Create.PanelElement(pRegion, exInfo); Element.Family = BuildUp; return(true); } else { throw new Exception("Input curve is not planar!"); } }
public override CartesianCoordinateSystem LocalCoordinateSystem(int i, double u, double v, Angle orientation, Angle xLimit) { //TODO: Offset according to u, v coordinates? Plane result = Perimeter.Plane(); Vector alignX = Vector.UnitX; Angle angleBetween = result.Z.AngleBetween(alignX); if (angleBetween <= xLimit || angleBetween >= Angle.Straight - xLimit) { alignX = Vector.UnitY; } Angle toOrient = result.X.AngleBetween(alignX); return(result.Rotate(toOrient + orientation)); }