protected internal override ExcelDxfBorderBase Clone() { return(new ExcelDxfBorderBase(_styles) { Bottom = Bottom.Clone(), Top = Top.Clone(), Left = Left.Clone(), Right = Right.Clone() }); }
/// <summary> /// Deep clone, to avoid mess up the original data during offsetting the boundary. /// </summary> /// <returns>Cloned object</returns> public Trapezoid Clone() { return(new Trapezoid( Top.Clone() as Line, Vertical.Clone() as Line, Bottom.Clone() as Line, Slanted.Clone() as Line)); }
public object Clone() { return(new CSSPadding { Left = Left.Clone() as CSSNumber, Right = Right.Clone() as CSSNumber, Top = Top.Clone() as CSSNumber, Bottom = Bottom.Clone() as CSSNumber }); }
public object Clone() { return(new CSSBorder { Left = Left.Clone() as CSSNumber, Right = Right.Clone() as CSSNumber, Top = Top.Clone() as CSSNumber, Bottom = Bottom.Clone() as CSSNumber, Type = Type, Radius = Radius.Clone() as CSSNumber, Color = Color.Clone() as CSSColor }); }
public Step CloneStep() { var clonedStep = (Step)Activator.CreateInstance(GetType()); //foreach (Symbol.Symbol symbol in Top) //{ // clonedStep.Top = symbol.Clone(); //} clonedStep.Top = Top.Clone(); clonedStep.Title = this.Title; return(clonedStep); }
/// <summary> /// Draw the trapezoid wire-frame with Revit Model curves. /// It's for debug use, to help developer see the exact location. /// </summary> /// <param name="revitDoc">Revit DB Document</param> public void Draw(Document revitDoc) { XYZ topDir = (Top.GetEndPoint(1) - Top.GetEndPoint(0)).Normalize(); XYZ verticalDir = (Vertical.GetEndPoint(0) - Vertical.GetEndPoint(1)).Normalize(); XYZ normal = topDir.CrossProduct(verticalDir); SketchPlane sketchplane = SketchPlane.Create(revitDoc, new Plane(normal, Vertical.GetEndPoint(0))); CurveArray curves = new CurveArray(); curves.Append(Top.Clone()); curves.Append(Vertical.Clone()); curves.Append(Bottom.Clone()); curves.Append(Slanted.Clone()); revitDoc.Create.NewModelCurveArray(curves, sketchplane); }