private void updateLocalFrameTransforms() { _localFrame.Transforms.Clear(); var dz = DirectionLocalZ.IsTiny() ? -1 * Vector3d.ZAxis : DirectionLocalZ; if (DrawUtil.DensityFactorLocalFrame < 0.001) { double p = Value.Domain.ParameterAt(0.5); Point3d pMid = Value.PointAt(p); Vector3d tMid = Value.TangentAt(p); Transform tScale = Rhino.Geometry.Transform.Scale(Point3d.Origin, DrawUtil.ScaleFactorLocalFrame); Transform tOri = TransformUtils.GetGlobalTransformLine(tMid, dz); Transform tTrans = Rhino.Geometry.Transform.Translation(new Vector3d(pMid)); _localFrame.Transforms.Add(tTrans * tOri * tScale); } else { _localFrame.Transforms.AddRange(DrawUtil.GetCurveTransforms(Value, true, dz, null, DrawUtil.ScaleFactorLocalFrame, DrawUtil.DensityFactorLocalFrame)); } }