get_basis_surface

EXPRESS specification:

FUNCTION get_basis_surface
(c : curve_on_surface) : SET[0:2] OF surface; LOCAL surfs : SET[0:2] OF surface; n : INTEGER; END_LOCAL; surfs := []; IF 'STRUCTURAL_FRAME_SCHEMA.PCURVE' IN TYPEOF (c) THEN surfs := [c\pcurve.basis_surface]; ELSE IF 'STRUCTURAL_FRAME_SCHEMA.SURFACE_CURVE' IN TYPEOF (c) THEN n := SIZEOF(c\surface_curve.associated_geometry); REPEAT i := 1 TO n; surfs := surfs + associated_surface(c\surface_curve.associated_geometry[i]); END_REPEAT; END_IF; END_IF; IF 'STRUCTURAL_FRAME_SCHEMA.COMPOSITE_CURVE_ON_SURFACE' IN TYPEOF (c) THEN n := SIZEOF(c\composite_curve.segments); surfs := get_basis_surface(c\composite_curve.segments[1].parent_curve); IF n > 1 THEN REPEAT i := 2 TO n; surfs := surfs * get_basis_surface(c\composite_curve.segments[i].parent_curve); END_REPEAT; END_IF; END_IF; RETURN(surfs);
END_FUNCTION;