26 #include <TopoDS_Shape.hxx>
27 #include <BRepPrimAPI_MakeSphere.hxx>
30 MG_PRIMITIVE_SPHERE::MG_PRIMITIVE_SPHERE(
double centre_x,
double centre_y,
double centre_z,
double rayon):MG_PRIMITIVE(),x(centre_x),y(centre_y),z(centre_z),r(rayon)
35 MG_PRIMITIVE_SPHERE::MG_PRIMITIVE_SPHERE(
long unsigned int num,
double centre_x,
double centre_y,
double centre_z,
double rayon): MG_PRIMITIVE(num),x(centre_x),y(centre_y),z(centre_z),r(rayon)
40 MG_PRIMITIVE_SPHERE::MG_PRIMITIVE_SPHERE(MG_PRIMITIVE_SPHERE& mdd):MG_PRIMITIVE(mdd),x(mdd.x),y(mdd.y),z(mdd.z),r(mdd.r)
45 MG_PRIMITIVE_SPHERE::~MG_PRIMITIVE_SPHERE()
50 void MG_PRIMITIVE_SPHERE::enregistrer(std::ostream& o,
double version)
52 o <<
"%" << get_id() <<
"=SPHERE("<< x <<
","<< y <<
","<< z <<
","<< r <<
");" << std::endl;
55 void MG_PRIMITIVE_SPHERE::construit(
void)
57 centre =
new gp_Pnt();
61 forme = BRepPrimAPI_MakeSphere(*centre,r).Shape();