示例#1
0
        public void TransformOntoAxis(StructuralAxis axis)
        {
            double x = 0, y = 0, z = 0, xx = 0, yy = 0, zz = 0;

            x  += axis.Xdir.Value[0] * Value[0];
            y  += axis.Xdir.Value[1] * Value[0];
            z  += axis.Xdir.Value[2] * Value[0];
            xx += axis.Xdir.Value[0] * Value[0];
            yy += axis.Xdir.Value[1] * Value[0];
            zz += axis.Xdir.Value[2] * Value[0];

            x  += axis.Ydir.Value[0] * Value[1];
            y  += axis.Ydir.Value[1] * Value[1];
            z  += axis.Ydir.Value[2] * Value[1];
            xx += axis.Ydir.Value[0] * Value[0];
            yy += axis.Ydir.Value[1] * Value[0];
            zz += axis.Ydir.Value[2] * Value[0];

            x  += axis.Normal.Value[0] * Value[2];
            y  += axis.Normal.Value[1] * Value[2];
            z  += axis.Normal.Value[2] * Value[2];
            xx += axis.Normal.Value[0] * Value[0];
            yy += axis.Normal.Value[1] * Value[0];
            zz += axis.Normal.Value[2] * Value[0];

            this.Value = new List <double>(new double[] { x, y, z, xx, yy, zz });
            GenerateHash();
        }
 public StructuralSpringProperty(StructuralAxis axis, StructuralVectorSix stiffness, string applicationId = null, Dictionary <string, object> properties = null)
 {
     this.Axis          = axis;
     this.Stiffness     = stiffness;
     this.ApplicationId = applicationId;
     if (properties != null)
     {
         this.Properties = properties;
     }
     GenerateHash();
 }
示例#3
0
        public StructuralNode(double[] value, StructuralAxis axis, StructuralVectorBoolSix restraint, StructuralVectorSix stiffness, double mass, string applicationId = null, Dictionary <string, object> properties = null)
        {
            if (properties != null)
            {
                Properties = properties;
            }
            Value         = value.ToList();
            Axis          = axis;
            Restraint     = restraint;
            Stiffness     = stiffness;
            Mass          = mass;
            ApplicationId = applicationId;

            GenerateHash();
        }
示例#4
0
        public StructuralStorey(StructuralAxis axis, string applicationId = null, Dictionary <string, object> properties = null)
        {
            if (axis != null)
            {
                this.Axis.Origin = axis.Origin;
                this.Axis.Xdir   = axis.Xdir;
                this.Axis.Ydir   = axis.Ydir;
                this.Axis.Normal = axis.Normal;
            }
            this.ApplicationId = applicationId;

            if (properties != null)
            {
                this.Properties = properties;
            }

            GenerateHash();
        }
示例#5
0
        public Structural2DElement(double[] vertices, int[] faces, int[] colors, Structural2DElementType elementType, string propertyRef, StructuralAxis axis, double offset, string applicationId = null, Dictionary <string, object> properties = null)
        {
            if (properties != null)
            {
                Properties = properties;
            }
            Vertices      = vertices.ToList();
            Faces         = faces.ToList();
            Colors        = colors == null ? null : colors.ToList();
            ElementType   = elementType;
            PropertyRef   = propertyRef;
            Axis          = axis;
            Offset        = offset;
            ApplicationId = applicationId;

            TextureCoordinates = null;

            GenerateHash();
        }
示例#6
0
        public StructuralLoadPlane(StructuralAxis loadPlaneAxis, int elementDimension, double tolerance, int span, double spanAngle, string applicationId = null, Dictionary <string, object> properties = null)
        {
            if (loadPlaneAxis != null)
            {
                this.Axis.Origin = loadPlaneAxis.Origin;
                this.Axis.Xdir   = loadPlaneAxis.Xdir;
                this.Axis.Ydir   = loadPlaneAxis.Ydir;
                this.Axis.Normal = loadPlaneAxis.Normal;
            }
            this.ElementDimension = elementDimension;
            this.Tolerance        = tolerance;
            this.Span             = span;
            this.SpanAngle        = spanAngle;
            this.ApplicationId    = applicationId;

            if (properties != null)
            {
                this.Properties = properties;
            }

            GenerateHash();
        }
示例#7
0
        public StructuralNodalInfluenceEffect(StructuralInfluenceEffectType effectType, string nodeRef, double factor, StructuralAxis axis, StructuralVectorBoolSix directions, string applicationId = null, Dictionary <string, object> properties = null)
        {
            if (properties != null)
            {
                this.Properties = properties;
            }
            this.ApplicationId = applicationId;
            this.EffectType    = effectType;
            this.NodeRef       = nodeRef;
            this.Factor        = factor;
            this.Axis          = axis;
            this.Directions    = directions;

            GenerateHash();
        }