Exemplo n.º 1
0
        public PassNode(NsNode parent, IList<Point3D> xyz, IList<Point3D> uvw, IList<double> speed, IList<double> caxis)
            : this(parent)
        {
            ContourAttribute pl = new ContourAttribute(this, null, xyz);
            Attributes.Add(pl);
            //pl.BlockRef.LayerIndex = 0;

            pl = new ContourAttribute(this, null, uvw);
            Attributes.Add(pl);
            //pl.BlockRef.LayerIndex = 1;

            ArrayAttribute aa = new ArrayAttribute(this, null, speed);
            Attributes.Add(aa);
            //aa.BlockRef.LayerIndex = 2;

            aa = new ArrayAttribute(this, null, caxis);
            Attributes.Add(aa);
            //aa.BlockRef.LayerIndex = 3;

            double scale = Length / 20.0;
            int mid = xyz.Count/2;
            Vector3D[] tpn = TPN(mid);

            //add a direction arrow
            ArrowAttribute arrow = new ArrowAttribute(this, XYZ(mid), tpn[0], tpn[1], tpn[2], scale);
            Attributes.Add(arrow);
            //arrow.BlockRef.LayerIndex = 4;

            //add a gantry frame for each point
            FrameAttribute gant;
            for( int i = 0; i < uvw.Count; i++ )
            {
                tpn = TPN(i);
                if( tpn == null )
                    continue;
                gant = new FrameAttribute(this, XYZ(i), tpn[0], tpn[1], tpn[2], scale);
                Attributes.Add(gant);
                //gant.BlockRef.LayerIndex = 1;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Constructs a pass from just xyz data
 /// </summary>
 /// <param name="parent">The parent node</param>
 /// <param name="xyz">the xyz points to construct the pass from</param>
 public PassNode(NsNode parent, IList<Point3D> xyz)
     : this(parent)
 {
     ContourAttribute pl = new ContourAttribute(this, null, xyz);
     Attributes.Add(pl);
 }