Esempio n. 1
0
        public static RoughPartConcentricMesh3D RotatingJaw(params object[] o)
        {
            double length = 45;
            RoughPartConcentricMesh3D mesh = new RoughPartConcentricMesh3D();
            BVHPolyMesh2D poly2D = new BVHPolyMesh2D();
            List<HEVector2> list = new List<HEVector2>();
            list.Add(new HEVector2(0, 30));
            list.Add(new HEVector2(length, 30));
            list.Add(new HEVector2(length, 60));
            list.Add(new HEVector2(length-15, 60));
            list.Add(new HEVector2(length-15, 110));
            list.Add(new HEVector2(length - 30, 110));
            list.Add(new HEVector2(length - 30, 150));
            list.Add(new HEVector2(0, 150));

            poly2D.CreateMeshFromVertices(list);
            mesh.Poly2D = poly2D;
            return mesh;
        }
Esempio n. 2
0
        public static RoughPartConcentricMesh3D SimpleChawJuckCylinder(params object[] o)
        {
            //double length = (double)o[0];
            //double radius = (double)o[2];

            double length = -120;
            double radius = 150;
            RoughPartConcentricMesh3D mesh = new RoughPartConcentricMesh3D();
            BVHPolyMesh2D poly2D = new BVHPolyMesh2D();
            List<HEVector2> list = new List<HEVector2>();
            list.Add(new HEVector2(length, 50));
            list.Add(new HEVector2(0, 50));
            list.Add(new HEVector2(0, radius));
            list.Add(new HEVector2(length, radius));

            poly2D.CreateMeshFromVertices(list);
            poly2D.CreateBVH(19, 1);
            mesh.Poly2D = poly2D;
            return mesh;
        }
Esempio n. 3
0
        public static RoughPartConcentricMesh3D Quad(params object[] o)
        {
            double length = (double)o[0];
            double radius = (double)o[2];
            int offset = (int)o[3];
            RoughPartConcentricMesh3D mesh = new RoughPartConcentricMesh3D();

            BVHPolyMesh2D poly2D = new BVHPolyMesh2D();
            List<HEVector2> list = new List<HEVector2>();
            list.Add(new HEVector2(0 + offset, 0));
            list.Add(new HEVector2(length + offset, 0));
            list.Add(new HEVector2(length + offset, radius));
            list.Add(new HEVector2(0 + offset, radius));

            poly2D.CreateMeshFromVertices(list);
            poly2D.CreateBVH(19, 1);
            mesh.Poly2D = poly2D;
            return mesh;
        }