Method for adding rounding to polyline corners (stirrups) is availabile.
RoundPolyline(object Points, double Radius, double NumberOfEdges);
method return array of points with rounding.
uexample:/u
Polyline - array of points without rounding X, Y
0.02 - radius of created rounding in m
4 - number of shapes in rounding
bobject PolyWithRounding = RoundPolyline(Polyline,0.02,4);/b
PolyWithRounding - array of points with rounding X, Y
Round polyline
Re: Round polyline
Output from method RoundPolyline was modified from version b15.2.110/b.size=85 (ToDo: check version number after merge)/size
It now returns also last point of polygon.
code
object pts = new object[];
pts.Add(new PointD(0, 0));
pts.Add(new PointD(1, 0));
pts.Add(new PointD(1, 1));
pts.Add(new PointD(0, 1));
pts.Add(new PointD(0, 0));
object Roundpts = RoundPolyline(pts, 0.1, 4); //rounding
object G = new Graphics();
G.DrawLines(Roundpts);
G.Draw(100);
/code
attachment=2
attachment=1
attachment=0
It now returns also last point of polygon.
code
object pts = new object[];
pts.Add(new PointD(0, 0));
pts.Add(new PointD(1, 0));
pts.Add(new PointD(1, 1));
pts.Add(new PointD(0, 1));
pts.Add(new PointD(0, 0));
object Roundpts = RoundPolyline(pts, 0.1, 4); //rounding
object G = new Graphics();
G.DrawLines(Roundpts);
G.Draw(100);
/code
attachment=2
- Original polygon
- Original_polygon.PNG (385 Bytes) Viewed 7221 times
attachment=1
- RoundPolygon output before change
- RoundPolygon_before.PNG (476 Bytes) Viewed 7221 times
attachment=0
- RoundPolygon output after change
- RoundPolygon_after.PNG (463 Bytes) Viewed 7221 times
Return to “Design forms features”
Who is online
Users browsing this forum: No registered users and 2 guests