!********************************************** BASIC GEOMETRY MODULE sline( FLOAT x:=500 >"Distance from bow !"); !* Generates a single section line. !* !* (C)Microform AB, J.Kjellander !* !********************************************** VECTOR p1; REF hull_id,l_id,r_id; STRING s*132; BEGINMODULE !* !***Check distance from bow. !* if x < 1 then exit("Bow distance too small !"); endif; !* !***Global ID of hull. !* set_root_gm(); hull_id:=get_next_gm(1,16384,"hull"); !* !***ID for left and right hull surfaces. !* s:=rstr(hull_id); l_id:=rval(s+"#30#30"); r_id:=rval(s+"#30#33"); !* !***Where does hull begin. !* p1:=on(l_id,vec(0,0)); !* !***Local system in bow. !* csys_1p(#1,"Bow",p1,0,0,0:BLANK=1); mode_local(#1); !* !***Local system at section. !* csys_1p(#2,"Section",vec(x,0,0),0,90,0:BLANK=1); !* !***Create section curve. !* cur_int(#3,l_id,#2,1:BLANK=0,LEVEL=2,PEN=2); cur_int(#4,r_id,#2,1:BLANK=0,LEVEL=2,PEN=2); ! cur_comp(#5,#3,#4:LEVEL=2,PEN=2); ENDMODULE !*****************************************************