Skip to content

Instantly share code, notes, and snippets.

@A-gambit
Created June 2, 2015 21:05
Show Gist options
  • Select an option

  • Save A-gambit/ee3b69a1a94d47b6fe27 to your computer and use it in GitHub Desktop.

Select an option

Save A-gambit/ee3b69a1a94d47b6fe27 to your computer and use it in GitHub Desktop.
Transaction editDatabase = editor.Document.Database.TransactionManager.StartTransaction();
CreateSphere(editDatabase, new Point3d(1000, 1000, 0), 100);
Point3d currentCenter = new Point3d(0, 0, 0);
double u = 0;
while (u < Math.PI * 1000)
{
double x = u,
y = Math.Cos(u) + Math.Sin(Math.Sqrt(3)*u),
r = Math.PI / 100;
currentCenter = new Point3d(x, y, currentCenter.Z);
CreateCircle(editDatabase, currentCenter, Vector3d.ZAxis, r);
u += r*2;
}
editDatabase.Commit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment