Is it expected outcome that 3D curve is missing or not?
Yes and no. I'd say it is expected if you've been working with OpenCascade for years. Still, after a decade with the lib, it was not so expected for me. But once I saw it, I understood why this happens. The cause is that 2D to 3D mapping requires approximation, and that is not something you might want to have automatically, because of possible precision issues and performance overheads.
Is there a way to build the 3D curve at the end?
One pretty straightforward way of doing this is to run shape healing, e.g., like this:
Code:
ShapeFix_Edge sae;
sae.FixAddCurve3d(helixEdge);
Look at this wormlike spline that it builds for you:
I'm sure there's a way to build a 3D curve in a more "regular" way, i.e. without these woozy control points positions, but the shape is satisfactory, and it looks good enough. If you follow the original discussion on the OCC forum, you'll see that Roman proposes AdvApprox package to build this 3D curve manually. I'm pretty sure that the shape healing function that I used above is doing the same sort of thing.
Does "visualization logic can handle such cases" mean the logic realized somewhere in your software, and so it will be normally displayed only there, or there is a low level support at, let's say, OpenGl level for such cases, and so other viewers will be also Ok?
Having such edges without 3D reps is, let's say, "mathematically enough" as you can evaluate your surface S(u,v) along the 2D curve and this would yield a perfectly three-dimensional point. So, the 3D representation is kind of implicitly encoded in the surface equation plus pcurve equation. To answer your question, yes, treating such edges properly requires something at the level of your visualization code. To be specific, you need to have a discretizer that is able to generate a polyline from such a "seemingly incomplete" edge definition.
Interesting, so it's only the projection that you are visualizing - not what is projected onto, hence no 3D curve is defined?
Is a 3D polyline visualized, but the code that prepares this polyline is kind of aware that an edge might not have a 3D curve. In such cases, the polygonizer should evaluate S(c2d(t)), where c2d is a pcurve and S is the surface (cylinder here).
All these curve and surface evaluations make precise CAD kernels so exciting, as they naturally bring numerical methods and differential geometry into play. These are the classy things that people have been investigating since the times of Euler, Gauss, Klein, Poincare, etc., etc.