First let me apologize for the long winded background but I suspect it is needed to understand the issue.
In a nutshell, I created a hyperboloid surface geometry, made a face and shape and tried to display it. The result is in the attached figure (hyp01.png). From this, it can be seen that the left side of the white frame of the shape appears to follow the correct outline of a hyperboloid (upper sheet of 2 sheet version) but the actual shape is more like a cone. The right side 'frame' also appears to show a cone rather than a hyperboloid. I know the basic math is correct because I have tested in other software (sagemath) and it correctly displays the hyperboloid. I have also tested the return values of D0 and D1 throughout the u,v parameter space and all give correct values.
So my question is, did I create the shape correctly in the first place? Is there a better alternate method? Is there something obvious that I've missed? Any insight would be greatly appreciated.
Here is how I created this shape:
I created a new class derived from Geom_ElementarySurface for a hyperboloid. Included appropriate implementations of all the necessary procedures (D0, D1, D2, ... etc.) and then tested that I got the correct values back by succesive calls to D0. I then set about making a displayable shape using the following code snippet:
Handle(Geom_SQsurface) hypSurf = new Geom_SQsurface(hypAx3, 0.5,0.5,-1.25,0.0,0.0,0.0,1.0);
Handle(AIS_Shape) hypShape = new AIS_Shape(hypFace.Shape());
For a little context the inputs to Geom_SQsurface are basic parmaters for a generic surface of the form: Ax^2 + By^2+Cz^2+2Dx+2Ey+2Fz+G=0
Given non zero parameters for A, B, C, and G you can convert to a basic form for a hyperboloid (2 sheets in this specific case).
The u and v parameters in the BRepBuilderAPI_MakeFace call are the usual angle from the +x axis in the X-Y plane and an inclination value (See wikipedia entry on hyperboloids for further details on the math and parameterization).
The above does work and a shape is displayed with:
The problem is that the shape looks like a cone vs a hyperboloid as noted above and in the attached picture.