hr Sun, 05/15/2011 - 16:13 Forums: Other usage issuesHello, how can I creat a sphere with the range :Latitude Angle between 0 and 90 degree, and Longitude line Angle between 0 and 360 degree, and with a aixs as the sphere axis. Thank you! Fabian Hachenberg Mon, 05/16/2011 - 10:28 you'll need to provide an x axis also, then you can do gp_Ax1 anaxis = ...; gp_Dir xaxis = ...; Standard_Real radius = 1.0; Standard_Real minLatitude = 0; Standard_Real maxLatitute = PI*0.5; Standard_Real minLongitude = 0; Standard_Real maxLongitude = PI*2.0; gp_Ax3 sphere_coordinate_system(anaxis.Location(), anaxis.Direction(), xaxis); TopoDS_Face sphereface = BRepBuilderAPI_MakeFace(gp_Sph(sphere_coordinate_system, radius), minLongitude, maxLongitude, minLatitude, maxLatitude); Log in to post comments hr Mon, 05/16/2011 - 11:08 Thank you for your help. I have do it as you say, but why I get the whole sphere, not the semi sphere? Log in to post comments hr Mon, 05/16/2011 - 11:44 I got it ,thank you very much! Log in to post comments
Mon, 05/16/2011 - 10:28
you'll need to provide an x axis also, then you can do
gp_Ax1 anaxis = ...;
gp_Dir xaxis = ...;
Standard_Real radius = 1.0;
Standard_Real minLatitude = 0;
Standard_Real maxLatitute = PI*0.5;
Standard_Real minLongitude = 0;
Standard_Real maxLongitude = PI*2.0;
gp_Ax3 sphere_coordinate_system(anaxis.Location(), anaxis.Direction(), xaxis);
TopoDS_Face sphereface = BRepBuilderAPI_MakeFace(gp_Sph(sphere_coordinate_system, radius), minLongitude, maxLongitude, minLatitude, maxLatitude);
Mon, 05/16/2011 - 11:08
Thank you for your help. I have do it as you say, but why I get the whole sphere, not the semi sphere?
Mon, 05/16/2011 - 11:44
I got it ,thank you very much!