Round polyline

Info about design forms features
jkrsik
Posts: 30
Joined: 06 Oct 2014, 13:10

Round polyline

Postby jkrsik » 02 Feb 2015, 07:29

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

jkrsik
Posts: 30
Joined: 06 Oct 2014, 13:10

Re: Round polyline

Postby jkrsik » 20 Nov 2015, 12:59

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
Original_polygon.PNG
Original polygon
Original_polygon.PNG (385 Bytes) Viewed 7221 times
/attachment
attachment=1
RoundPolygon_before.PNG
RoundPolygon output before change
RoundPolygon_before.PNG (476 Bytes) Viewed 7221 times
/attachment
attachment=0
RoundPolygon_after.PNG
RoundPolygon output after change
RoundPolygon_after.PNG (463 Bytes) Viewed 7221 times
/attachment


Return to “Design forms features”

Who is online

Users browsing this forum: No registered users and 2 guests