Ejemplo n.º 1
0
        /// <summary>
        /// Unhides the point cloud.
        /// </summary>
        /// <param name="identifier">The name of the point cloud</param>
        protected void UnhidePointCloud(string identifier)
        {
            if (m_pointclouds.Any(x => x.GetName() == identifier) == false)
            {
                return;
            }

            PointCloudBase pc = m_pointclouds.Find(x => x.GetName() == identifier);

            pc.Unhide();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns the outline of the point cloud.
        /// </summary>
        /// <param name="identifier">The name of the point cloud</param>
        /// <returns>The outline</returns>
        protected Outline GetPointCloudOutline(string identifier)
        {
            if (m_pointclouds.Any(x => x.GetName() == identifier) == false)
            {
                return(null);
            }

            PointCloudBase pc = m_pointclouds.Find(x => x.GetName() == identifier);

            return(pc.Outline);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Returns the cloud points of the point cloud.
        /// </summary>
        /// <param name="identifier">The name of the point cloud</param>
        /// <returns>The CloudPoint array of the points</returns>
        protected CloudPoint[] GetCloudPoints(string identifier)
        {
            if (m_pointclouds.Any(x => x.GetName() == identifier) == false)
            {
                return(null);
            }

            PointCloudBase pc = m_pointclouds.Find(x => x.GetName() == identifier);

            return(pc.Points);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Returns the transform of the point cloud.
        /// </summary>
        /// <param name="identifier">The name of the point cloud</param>
        /// <returns>The transform</returns>
        protected Transform GetPointCloudTransform(string identifier)
        {
            if (m_pointclouds.Any(x => x.GetName() == identifier) == false)
            {
                return(Transform.Identity);
            }

            PointCloudBase pc = m_pointclouds.Find(x => x.GetName() == identifier);

            return(pc.Transform);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Removes the point cloud.
        /// </summary>
        /// <param name="element_id">The element id of the point cloud</param>
        protected void RemovePointCloud(ElementId element_id)
        {
            if (m_pointclouds.Any(x => x.ElementId == element_id) == false)
            {
                return;
            }

            PointCloudBase pc = m_pointclouds.Find(x => x.ElementId == element_id);

            m_pointclouds.Remove(pc);
            pc.Delete();
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Removes the point cloud.
        /// </summary>
        /// <param name="identifier">The name of the point cloud</param>
        protected void RemovePointCloud(string identifier)
        {
            if (m_pointclouds.Any(x => x.GetName() == identifier) == false)
            {
                return;
            }

            PointCloudBase pc = m_pointclouds.Find(x => x.GetName() == identifier);

            m_pointclouds.Remove(pc);
            pc.Delete();
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Creates a point cloud.
        /// </summary>
        /// <param name="document">The active document</param>
        /// <param name="identifier">The name of the point cloud</param>
        /// <param name="points">The points</param>
        /// <param name="transform">The transform</param>
        protected void CreatePointCloud(Document document, string identifier, CloudPoint[] points, Transform transform)
        {
            t_pending_points = points;

            using (Transaction t = new Transaction(document, identifier))
            {
                t.Start();
                PointCloudType     type     = PointCloudType.Create(document, m_identifier, identifier);
                PointCloudInstance instance = PointCloudInstance.Create(document, type.Id, transform);
                PointCloudBase     new_pc   = m_pointclouds.Last();
                new_pc.ElementId = instance.Id;
                new_pc.Document  = document;
                new_pc.Engine    = this;
                t.Commit();
            }
        }