コード例 #1
0
ファイル: ArcHost.cs プロジェクト: seasailor/designscript
 internal ArcEntity()
 {
     CenterPoint = new PointEntity();
     Normal      = DsVector.ByCoordinates(0, 0, 1);
     Radius      = 1;
     StartAngle  = 30;
     SweepAngle  = 60;
 }
コード例 #2
0
        public virtual IVector TangentAtParameter(double param)
        {
            if (null != StartPoint && null != EndPoint)
            {
                return(DsVector.ByCoordinates(EndPoint.X - StartPoint.X, EndPoint.Y - StartPoint.Y, EndPoint.Z - StartPoint.Z));
            }

            return(DsVector.ByCoordinates(param, param, param));
        }
コード例 #3
0
 internal CoordinateEntity()
 {
     this.Origin = new PointEntity()
     {
         X = 0, Y = 0, Z = 0
     };
     this.XAxis = DsVector.ByCoordinates(1, 0, 0);
     this.YAxis = DsVector.ByCoordinates(0, 1, 0);
     this.ZAxis = DsVector.ByCoordinates(0, 0, 1);
 }
コード例 #4
0
 public IVector[] GetVertexNormals()
 {
     return(new DsVector[2] {
         DsVector.ByCoordinates(0, 0, 1), DsVector.ByCoordinates(1, 0, 0)
     });
 }
コード例 #5
0
 internal CircleEntity()
 {
     this.CenterPoint = new PointEntity(0, 0, 0);
     this.Radius      = 3;
     this.Normal      = DsVector.ByCoordinates(0, 0, 1);
 }
コード例 #6
0
 internal IVector directionTo(IPointEntity point)
 {
     return(DsVector.ByCoordinates(point.X - this.X, point.Y - this.Y, point.Z - this.Z));
 }
コード例 #7
0
ファイル: PlaneHost.cs プロジェクト: hipigod/Dynamo
 internal PlaneEntity()
 {
     this.Origin    = new PointEntity();
     this.Normal    = DsVector.ByCoordinates(0, 0, 1);
     this.contextCS = new CoordinateEntity();
 }
コード例 #8
0
        public void UpdateCuboid(double[] data, double length, double width, double height)
        {
            PointEntity origin = new PointEntity(data[0], data[1], data[2]);

            ContextCoordinateSystem.Set(origin, DsVector.ByCoordinates(length, 0, 0), DsVector.ByCoordinates(0, width, 0), DsVector.ByCoordinates(0, 0, height));
        }
コード例 #9
0
 public IVector NormalAtParameter(double u, double v)
 {
     return(DsVector.ByCoordinates(u, v, u + v));
 }
コード例 #10
0
 public virtual IVector NormalAtParameter(double param)
 {
     return(DsVector.ByCoordinates(param, param, param));
 }
コード例 #11
0
 public IVectorEntity NormalAtPoint(IPointEntity point)
 {
     return(DsVector.ByCoordinates(point.X, point.Y, point.Z));
 }
コード例 #12
0
 public IVectorEntity TangentAtVParameter(double u, double v)
 {
     return(DsVector.ByCoordinates(0, u, v));
 }