Limit the number of tesselated Points

Limit the number of tesselated Points

revitaddins
Contributor Contributor
365 Views
1 Reply
Message 1 of 2

Limit the number of tesselated Points

revitaddins
Contributor
Contributor

Hi Guys,

 

Any guidance on how to limit the number of tessellated points? say if curve length is 10, just make 5 points.

 

CurveArray curves = sketch.Profile.get_Item(0);
                        IList<XYZ> points = new List<XYZ>();
                        if (null != curves)
                        {
                            foreach (Curve cur in curves)
                            {
                                if(cur.GetType() == typeof(Line))
                                {
                                    points.Add(cur.GetEndPoint(0));
                                }

                                if (cur.GetType() == typeof(Arc))
                                {                                  
                                    points = cur.Tessellate() as List<XYZ>;                              
                                }                            

                            }
                            foreach (XYZ xYZ in points)
                            {

                            //Do something with Points
                            }

                        }

 Currently it's just creating random number of points

revitaddins_0-1590075664885.png

 

Thank you.

0 Likes
366 Views
1 Reply
Reply (1)
Message 2 of 2

cwaluga
Advocate
Advocate

The number is certainly not random but rather based on an approximation criterion, curvature or the like. You can take the curve and evaluate it yourself by your own rules if you are not satisfied with the results of tesselate.

0 Likes