I have a circular face from which I want to add a bottle cap like hemisphere.
I have the radius of the circular face but not its center point. I've used the following code but the hemisphere doesn't completely fit.
double ToolRadius = 10;
gp_Pnt centerMass = props.CentreOfMass();//get the center of mass
gp_Ax2 Ax2(centerMass, normal);
TopoDS_Face S2 = BRepPrimAPI_MakeSphere(Ax2, ToolRadius, PI);
I've attached an image of the shapes. How can I make the bottle cap completely fit?