private void updateLoadTransforms()
        {
            _loadCondition = new LoadCondition(Forces, Moments);

            Vector3d lx = Vector3d.Zero;

            if (!(ReferenceArea is null))
            {
                lx = ReferenceArea.DirectionLocalX;
            }
            //   iterate over BrepFaces
            foreach (BrepFace bf in Value.Faces)
            {
                //   iterate over Edges of current face and draw this edge
                foreach (int beIndex in bf.AdjacentEdges())
                {
                    var txList = DrawUtil.GetCurveTransforms(Value.Edges[beIndex], UseHostLocal, lx, bf, DrawUtil.ScaleFactorLoads, DrawUtil.DensityFactorLoads);
                    if (ReferenceArea != null && UseHostLocal && ReferenceArea.FlipZ)
                    {
                        foreach (var tx in txList)
                        {
                            _loadCondition.Transforms.Add(tx * Rhino.Geometry.Transform.Rotation(Math.PI, Vector3d.XAxis, Point3d.Origin));
                        }
                    }
                    else
                    {
                        _loadCondition.Transforms.AddRange(txList);
                    }
                }
            }
        }
Exemple #2
0
        private void updateLoadTransforms()
        {
            _loadCondition = new LoadCondition(Forces, Moments);

            Transform t = Rhino.Geometry.Transform.Identity;

            if (UseHostLocal)                 //transformation needed
            {
                Vector3d lx = Vector3d.XAxis; //default x,z directions
                Vector3d lz = Vector3d.Negate(Vector3d.ZAxis);
                //set localX and localZ directions if pointload has referencepoint and if directions are not zero
                if (!(ReferencePoint is null))
                {
                    if (!ReferencePoint.DirectionLocalX.Equals(Vector3d.Zero))
                    {
                        lx = ReferencePoint.DirectionLocalX;
                    }
                    if (!ReferencePoint.DirectionLocalZ.Equals(Vector3d.Zero))
                    {
                        lz = ReferencePoint.DirectionLocalZ;
                    }
                }
                t = TransformUtils.GetGlobalTransformPoint(lx, lz); //setup transform
            }

            t = Rhino.Geometry.Transform.Translation(new Vector3d(Value.Location)) * t * Rhino.Geometry.Transform.Scale(Point3d.Origin, DrawUtil.ScaleFactorLoads);

            _loadCondition.Transforms.Add(t);
        }
Exemple #3
0
            public override void Write(ILGenerator il)
            {
                var endIfLabel = il.DefineLabel();

                LoadCondition.Write(il);
                il.Emit(OpCodes.Brfalse, endIfLabel);
                LoadSuccess.Write(il);
                il.MarkLabel(endIfLabel);
            }
Exemple #4
0
        private void updateLoadTransforms()
        {
            _loadCondition = new LoadCondition(Forces, Moments);
            Vector3d lz = Vector3d.Negate(Vector3d.ZAxis); //default local z

            if (!(ReferenceLine is null))
            {
                if (!ReferenceLine.DirectionLocalZ.IsTiny())
                {
                    lz = ReferenceLine.DirectionLocalZ;
                }
            }
            _loadCondition.Transforms.AddRange(DrawUtil.GetCurveTransforms(Value, UseHostLocal, lz, null, DrawUtil.ScaleFactorLoads, DrawUtil.DensityFactorLoads));
        }