public GraphicsPath Add_Estribos(double EscalaX, double EscalaY, float rec, float Dx, float Dy) { GraphicsPath path = new GraphicsPath(); CCirculo circulo1, circulo2; double r1 = (radio - rec) * 100; double r2 = (r1 + FunctionsProject.Find_Diametro(Estribo.NoEstribo)); double[] pCentro = new double[] { Centro[0] + Dx, Centro[1] + Dy }; MAT_CONCRETE material = new MAT_CONCRETE { FC = 4220, Name = "FY4220" }; circulo1 = new CCirculo("Refuerzo", r1, pCentro, material, TipodeSeccion.Circle, pCoord: null); circulo1.Set_puntos(50, r1 * EscalaX); circulo2 = new CCirculo("Refuerzo", r2, pCentro, material, TipodeSeccion.Circle, pCoord: null); circulo2.Set_puntos(50, r2 * EscalaX); path.AddClosedCurve(circulo1.Puntos.ToArray()); path.AddClosedCurve(circulo2.Puntos.ToArray()); return(path); }
public override bool Equals(object obj) { if (obj is CCirculo) { CCirculo temp = (CCirculo)obj; if (temp.radio == radio & Material == temp.Material) { return(true); } } return(false); }
public int CompareTo(object obj) { if (obj is CCirculo) { CCirculo temp = (CCirculo)obj; if (Area > temp.Area) { return(1); } if (Area < temp.Area) { return(-1); } } return(0); }
public void Add_Ref_graph(double EscalaX, double EscalaY, double EscalaR, float Dx, float Dy) { GraphicsPath path; double r = 0; double[] pcentro; double xc, yc; CCirculo circulo; if (Shapes_ref != null) { Shapes_ref.Clear(); } else { Shapes_ref = new List <GraphicsPath>(); } foreach (CRefuerzo refuerzoi in Refuerzos) { path = new GraphicsPath(); r = FunctionsProject.Find_Diametro(Convert.ToInt32(refuerzoi.Diametro.Substring(1))) / 2; r = r * EscalaR; xc = Dx + refuerzoi.Coord[0] * EscalaX; yc = Dy - refuerzoi.Coord[1] * EscalaY; pcentro = new double[] { xc, yc }; MAT_CONCRETE material = new MAT_CONCRETE { FC = 4220, Name = "FY4220" }; circulo = new CCirculo("Refuerzo", r, pcentro, material, TipodeSeccion.Circle, pCoord: null); circulo.Set_puntos(10, r); path.AddClosedCurve(circulo.Puntos.ToArray()); Shapes_ref.Add(path); } }