echord.sml
# echord.sml
# demonstrate creating and reading an
# elliptical arc chord CAD element
clear();
# create a new file or open existing file
cad C;
GetOutputCAD(C);
# write an elliptical arc chord
numeric xin = 1000, yin = 2000, xSize = 500, ySize = 300, startAngle = 30;
numeric endAngle = 150, rotation = 45;
CADWriteEllipticalArcChord(C, 1, xin, yin, xSize, ySize, startAngle, endAngle, rotation);
# the elements are always appended to end of block
# so get number of elements - last element will be ours
numeric lastelem = CADNumElements(C, 1);
# now read data for most recently added element
numeric xCenter, yCenter, sAngle, eAngle;
CADReadEllipticalArcChord(C, 1, lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation);
print("write and read CAD elliptical arc chord");
string a$ = "element xCenter yCenter ";
string b$ = "xSize ySize sAngle eAngle rotation";
print(a$ + b$);
printf("%7d %8.2f %8.2f %8.2f %8.2f %8.2f%8.2f %8.2f \n",
lastelem, xCenter, yCenter, xSize, ySize, sAngle, eAngle, rotation);
CloseCAD(C);
©MicroImages, Inc. 2013 Published in the United States of America
11th Floor - Sharp Tower, 206 South 13th Street, Lincoln NE 68508-2010 USA
Business & Sales: (402)477-9554 Support: (402)477-9562 Fax: (402)477-9559
Business info@microimages.com
Support support@microimages.com
Web webmaster@microimages.com
|