ACIS沒有專門的橢球函數,採用scale_transf函數來實現,以爲例,先建立原點爲圓心,x軸長爲的直徑正圓體,再沿y、z方向拉伸,最後將橢球移到球心(5,4,6)
BODY* sphere1;
api_solid_sphere(SPAposition(0,0,0),8,sphere1);//x軸長爲直徑
api_transform_entity(sphere1,scale_transf(1,0.25,25.0/16.0));//拉伸
api_merge_seam_edges(sphere1);//拉伸過後實體會出現一條線,用這個API縫合
api_transform_entity(sphere1,translate_transf(5,4,6));//移動到球心