surface bounded by non-contiguous curves

I need to connect two non-intersecting non-coplanar closed bspline curves with a surface between them (should be "reasonable", but no other conditions are required).

I found closest points between the two curves (b1 and b2) and constructed b12 and b21, so that b1'-b12-b2'-b21 are contiguous (and non-overlapping, to make sure, b1' and b2' are open segments of b1 and b2). Now, constructing GeomFill_BSplineCurves(b1,b12,b2,b21,GeomFill_StretchStyle) throws . I verified contiguity of the bsplines manually (dumping coordinates). Code snippet is at http://www.arcig.cz/~eudoxos/occ-geomfill.cc temporarily.

Mea culpa? OpenCascade bug? Any idea how to create the surface in a better way? Thanks - Vaclav S.

Stephane Routelous's picture

Hi,

I don't know about your crash, but perhaps you can check the Plate algorithms ( see sample 11 )

HTH,

Stephane

Vaclav Smilauer's picture

Many thanks for the hint, it definitely looks like the way to go. I hope it will handle a hudred of slice outlines gracefully. Thanks again!

PS. (OT) Before I proceed to try it, I need to find out how to convert TopoDS_Shape to its underlying Geom_BSplineCurve (after export and import to and from IGES).

Stephane Routelous's picture

I don't have OCC installed, but if I remember correctly :
TopoDS_Face theFace = TopoDS::Face(theShape);
Handle_Geom_Surface theSurface = BRep_Tool::Surface(theFace);
Handle_Geom_BSplineSurface theBSurface = Handle_Geom_BSplineSurface::DownCast(theSurface);

should work the same for TopoDS_Edge,BRep_Tool::Curve,etc...

HTH,

Stephane

PS : don't forget to check the intermediate results !

Vaclav Smilauer's picture

Docs do not mention if the GeomPlate constructed surface may be closed. If the result is constructed by deforming the initial surface, am I infering right that providing closed initial surface will result in closed resulting surface?

Also, I did not see any constraints on number of curves/points that can be worked with. I do not care for speed at all, but (it curves are eventually broken to points) I will need around 20000 points, depending on precision. Is there a hard-wired limit or simply time-efficiency will decrease?

Thanks, VS

(PS. TopoDS_Shape -> Geom_BSplineCurve works perfectly :-) )