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); }
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)); }
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()) { _loadCondition.Transforms.AddRange(DrawUtil.GetCurveTransforms(Value.Edges[beIndex], UseHostLocal, lx, bf, DrawUtil.ScaleFactorLoads, DrawUtil.DensityFactorLoads)); } } }