Exemplo n.º 1
0
 public TS_part(TS_materials.TS_material material, TS_contour contour, List <TS_void> voids)
 {
     Material = material;
     Voids    = new ObservableCollectionEx <TS_void>();
     Contour  = contour;
     Voids.AddRange(voids);
     GeometryComponents = null;
     CalcProperties();
 }
Exemplo n.º 2
0
        private static TS_contour ReadContour(string pathToThePart)
        {
            string     path   = pathToThePart + c;
            TS_contour result = new TS_contour(ReadPoints(path));
            string     name   = FileName(path);

            result.Name = name;
            return(result);
        }
Exemplo n.º 3
0
        private static List <TS_part> ReadParts(string pathToTheSection)
        {
            List <TS_part> Parts      = new List <TS_part>();
            List <string>  partsPaths = Directory.GetDirectories(pathToTheSection + p).ToList();

            foreach (var path in partsPaths)
            {
                TS_contour cont = ReadContour(path);
                TS_materials.TS_material mat   = ReadMaterial(path);
                List <TS_void>           voids = ReadVoids(path);
                TS_part Part = new TS_part(mat, cont, voids);
                Part.Name = FolderName(path);
                Parts.Add(Part);
            }
            return(Parts);
        }
Exemplo n.º 4
0
        public static TS_section CreateInitiateSection()
        {
            List <TS_point> PointsC0 = new List <TS_point> {
                new TS_point()
            };
            TS_contour Contour0 = new TS_contour(PointsC0);

            List <TS_point> PointsV0 = new List <TS_point> {
                new TS_point()
            };
            TS_void Void0 = new TS_void(PointsV0);

            Void0.Name = "new Void";
            List <TS_void> Voids0 = new List <TS_void>()
            {
                Void0
            };

            TS_part Part0 = new TS_part(new TS_mat_universal(), Contour0, Voids0);

            Part0.Name = "Part1";
            List <TS_part> Parts0 = new List <TS_part>()
            {
                Part0
            };

            TS_bar        Bar0  = new TS_bar(new TS_point(), Double.NaN);
            List <TS_bar> Bars0 = new List <TS_bar>()
            {
                Bar0
            };
            TS_reinforcement        Reo0  = new TS_reinforcement(Bars0, new TS_mat_universal());
            List <TS_reinforcement> Reos0 = new List <TS_reinforcement>()
            {
                Reo0
            };

            TS_section Section0 = new TS_section(Parts0, Reos0);

            return(Section0);
        }