Surface from OCC to OIV

Please tell me how can I convert a OCC surface (Geom_BSplineSurface) to a OIV surface (SoNurbsSurface) so I can add it to a SoSeparator to view in OIV.
Thanks a lot.

Gabrio Girardi's picture

The issue still is opened. I need to convert a surface made in OCC to use in OIV. I suppose I need to retreive the poles, the uKnot to pass then to control point of the SoNurbsSurface.
Do you have some idea?
Thanks

n-southall's picture

Hi Gabrio,

Check out the documentation for Geom_BSplineSurface - you'll find functions such as:

Standard_Integer NbUPoles() const;
Standard_Integer NbVPoles() const;
Standard_Integer NbUKnots() const;
Standard_Integer NbVKnots() const;

void Poles (TColgp_Array2OfPnt& P) const;
void Weights (TColStd_Array2OfReal& W) const;
void UKnots (TColStd_Array1OfReal& Ku) const;
void VKnots (TColStd_Array1OfReal& Kv) const;

These should give you everything you need to create the OIV surface

Cheers,

Neil

Gabrio Girardi's picture

Thanks a lot for your reply.

Roman Lygin's picture

Hi Gabrio,

Just a hint - you might want to analyze the coupling with Coin3D (which implements OIV API). You may find it here http://www.opencascade.org/org/community/projects/?project_id=18 but consider it is very old and was experimental, prototype-level. You will likely want to improve/extend it.

Good luck.
Roman