Message 1 of 7
problem in drawing hexagoan
Not applicable
02-12-2009
05:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to draw the Hexagon using Polyline in AutoCAD using C#.net technology, but i cant. I am giving first point through prompt and that is in Point3d format and when we add vertex to polyline in hexagon that required point in point2d format. give me the way that I get success.
also tell me how to calculate that angle in hexagon. which is 120 if hexagon and 108 in pentagon.
I am drawing polygon on my own points,like this
Polyline p = new Polyline(6);
p.AddVertexAt(0, new Point2d(9.50,10), 0, 0, 0);
p.AddVertexAt(1, new Point2d(21, 10), 0, 0, 0);
p.AddVertexAt(2, new Point2d(26.30, 20), 0, 0, 0);
p.AddVertexAt(3, new Point2d(21, 30), 0, 0, 0);
p.AddVertexAt(4, new Point2d(9.60, 30), 0, 0, 0);
p.AddVertexAt(5, new Point2d(3, 20), 0, 0, 0);
p.AddVertexAt(6, new Point2d(9.50, 10), 0, 0, 0);
btr.AppendEntity(p);
trans.AddNewlyCreatedDBObject(p, true);
I want to draw the polygon with user choices. help me.
also tell me how to calculate that angle in hexagon. which is 120 if hexagon and 108 in pentagon.
I am drawing polygon on my own points,like this
Polyline p = new Polyline(6);
p.AddVertexAt(0, new Point2d(9.50,10), 0, 0, 0);
p.AddVertexAt(1, new Point2d(21, 10), 0, 0, 0);
p.AddVertexAt(2, new Point2d(26.30, 20), 0, 0, 0);
p.AddVertexAt(3, new Point2d(21, 30), 0, 0, 0);
p.AddVertexAt(4, new Point2d(9.60, 30), 0, 0, 0);
p.AddVertexAt(5, new Point2d(3, 20), 0, 0, 0);
p.AddVertexAt(6, new Point2d(9.50, 10), 0, 0, 0);
btr.AppendEntity(p);
trans.AddNewlyCreatedDBObject(p, true);
I want to draw the polygon with user choices. help me.