Ejemplo n.º 1
0
        private void AddSupportColumn(IObject3D holder, double gridX, double gridY, double bottomZ, double topZ)
        {
            if (topZ - bottomZ < .01)
            {
                // less than 10 micros high, don't ad it
                return;
            }
            var support = new GeneratedSupportObject3D()
            {
                Mesh = PlatonicSolids.CreateCube(1, 1, 1)
            };

            support.Matrix = Matrix4X4.CreateScale(PillarSize - reduceAmount, PillarSize - reduceAmount, topZ - bottomZ)
                             * Matrix4X4.CreateTranslation(gridX, gridY, bottomZ + (topZ - bottomZ) / 2);

            holder.Children.Add(support);
        }
Ejemplo n.º 2
0
        private void AddSupportColumn(IObject3D holder, double gridX, double gridY, double bottomZ, double topZ)
        {
            if (topZ - bottomZ < .01)
            {
                // less than 10 micros high, don't ad it
                return;
            }

            // make it just a bit small so they always overlap correctly
            var reduceAmount = ColumnReduceAmount * .99;

            var support = new GeneratedSupportObject3D()
            {
                Mesh   = PlatonicSolids.CreateCube(1, 1, 1),
                Matrix = Matrix4X4.CreateScale(PillarSize - reduceAmount, PillarSize - reduceAmount, topZ - bottomZ)
                         * Matrix4X4.CreateTranslation(gridX, gridY, bottomZ + (topZ - bottomZ) / 2),
            };

            holder.Children.Add(support);
        }