I am trying to create a cylinder. To accomplish this I am creating two ellipses and two lines. After I try to insert them in the DWG dwaing I can see only the lines. Here is a code sniped so you can see what am i doing.
Double ellipseRadiusRatio = 0.4; Vector3d ellipseMajorAxis = new Vector3d(0.0, 1500.0, 0.0); Vector3d ellipseLeftCenter = new Vector3d(72541.7, 80198.5, 0.0); Vector3d ellipseRightCenter = new Vector3d(77145.7, 80173.6, 0.0); Ellipse leftEllipse = new Ellipse(); leftEllipse.MajorAxis.Add(ellipseMajorAxis); leftEllipse.RadiusRatio = ellipseRadiusRatio; leftEllipse.Center.Add(ellipseLeftCenter); leftEllipse.StartAngle = 0; Ellipse rightEllipse = new Ellipse(); rightEllipse.MajorAxis.Add(ellipseMajorAxis); rightEllipse.RadiusRatio = ellipseRadiusRatio; rightEllipse.Center.Add(ellipseRightCenter); rightEllipse.StartAngle = 0; Point3d ellipseTopStart = new Point3d(77154.7, 81673.6, 0.0); Point3d ellipseTopEnd = new Point3d(72541.7, 81698.5, 0.0); Point3d ellipseBottumStart = new Point3d(77154.7, 78673.6, 0.0); Point3d ellipseBottumEnd = new Point3d(72578.5, 78701.8, 0.0); Line ellipseTop = new Line(ellipseTopStart, ellipseTopEnd); Line ellipseButtom = new Line(ellipseBottumStart, ellipseBottumEnd); acBlkTblRec.AppendEntity(rightEllipse); acBlkTblRec.AppendEntity(leftEllipse); acBlkTblRec.AppendEntity(ellipseTop); acBlkTblRec.AppendEntity(ellipseButtom); acTrans.Commit();
I hope you can see the problem.
Thnaks in advance!
Solved! Go to Solution.
As I did not see your full code so I can't tell why it is going wrong. However, in below there are 2 links where drawing ellipse is involved. Try to compare your ellipse with those code: