!*********************************************************************** ! Create V isoparameter curves on a surface ! 2006-03-25 Gunnar Liden !----------------------------------------------------------------------- !****h* General_VKN/s_isovpar ! NAME ! s_isovpar: --- This module places a series of V-parameter ! lines on a surface --- [s_isovpar.MBS] ! ! DESCRIPTION ! This module take the following steps to place V-isolines : ! * Retrieve number of patches. Calls of GETSURH ! * Create V parameter lines ! ! SOURCE GLOBAL GEOMETRY MODULE s_isovpar ( REF s_id > "@t16 Select surface"; INT n_v:= 30 > "Number of V parameter lines"); !*** (End of RoboDoc input) !*********************************************************************** ! Internal variables !----------------------------------------------------------------------- INT npatu; ! Number of patches in U direction INT npatv; ! Number of patches in V direction STRING iso_c*1; ! Isoparameter U or V FLOAT start_p; ! Curve start parameter FLOAT end_p; ! Curve end parameter INT i_v; ! Loop index V parameter FLOAT delta; ! Delta parameter value BEGINMODULE !*********************************************************************** ! Algorithm !----------------------------------------------------------------------- !*********************************************************************** ! 1. Retrieve number of patches. Calls of GETSURH. !----------------------------------------------------------------------- GETSURH(s_id,"NPATU",npatu); GETSURH(s_id,"NPATV",npatv); !*********************************************************************** ! 2. Create U parameter lines !----------------------------------------------------------------------- IF n_v >= 2 THEN delta:= npatv/(n_v-1); ELSE EXIT("s_isovpar n_v < 2"); ENDIF; iso_c := "V"; start_p:= 0.0; end_p := npatu; FOR i_v:= 1 TO n_v DO CUR_ISO(#1,s_id,iso_c, (i_v-1)*delta, start_p,end_p); ENDFOR; ENDMODULE