Exemplo n.º 1
0
        private void updateSupportTransforms()
        {
            _supp_condition.Transforms.Clear();

            var dz = DirectionLocalZ.IsTiny() ? Vector3d.ZAxis : DirectionLocalZ;

            _supp_condition.Transforms.AddRange(DrawUtil.GetCurveTransforms(Value, _supp_condition.LocalFrame, dz, null, DrawUtil.ScaleFactorSupports, DrawUtil.DensityFactorSupports));
        }
Exemplo n.º 2
0
        private void updateLocalFrameTransforms()
        {
            _localFrame.Transforms.Clear();

            Transform tScale = Rhino.Geometry.Transform.Scale(Point3d.Origin, DrawUtil.ScaleFactorLocalFrame);

            Vector3d lx = DirectionLocalX.IsTiny() ? Vector3d.XAxis : DirectionLocalX;
            Vector3d lz = DirectionLocalZ.IsTiny() ? -1 * Vector3d.ZAxis : DirectionLocalZ;

            Transform tFinal = TransformUtils.GetGlobalTransformPoint(lx, lz);

            Transform tTranslate = Rhino.Geometry.Transform.Translation(new Vector3d(Value.Location));

            tFinal = tTranslate * tFinal * tScale;

            _localFrame.Transforms.Add(tFinal);
        }
Exemplo n.º 3
0
        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));
            }
        }
Exemplo n.º 4
0
        private void updateSupportTransforms()
        {
            _supp_condition.Transforms.Clear();

            Transform tScale = Rhino.Geometry.Transform.Scale(Point3d.Origin, DrawUtil.ScaleFactorSupports);

            Vector3d lx = DirectionLocalX.IsTiny() ? Vector3d.XAxis : DirectionLocalX;
            Vector3d lz = DirectionLocalZ.IsTiny() ? Vector3d.ZAxis : DirectionLocalZ;

            Transform tFinal = Rhino.Geometry.Transform.Identity;

            if (_supp_condition.LocalFrame)
            {
                tFinal = TransformUtils.GetGlobalTransformPoint(lx, lz);
            }

            Transform tTranslate = Rhino.Geometry.Transform.Translation(new Vector3d(Value.Location));

            tFinal = tTranslate * tFinal * tScale;

            _supp_condition.Transforms.Add(tFinal);
        }