! ******************* profile2 ****************************** ! +++ ! ! Definition of a profile ! ! --- ! ! ! Revision history ! _______________ ! ! Copyright 1997-05-04 Gunnar Liden, All Rights Reserved ! ! Released under the MIT License: ! ! Permission is hereby granted, free of charge, to any person ! obtaining a copy of this software and associated documentation ! files (the "Software"), to deal in the Software without ! restriction, including without limitation the rights to use, ! copy, modify, merge, publish, distribute, sublicense, and/or sell ! copies of the Software, and to permit persons to whom the ! Software is furnished to do so, subject to the following ! conditions: ! ! The above copyright notice and this permission notice shall be ! included in all copies or substantial portions of the Software. ! ! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ! EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ! OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ! NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ! HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ! WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ! FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ! OTHER DEALINGS IN THE SOFTWARE. ! ! ************************************************************ !sdesce Definition of a profile !sdescs Definition av en profil GLOBAL GEOMETRY MODULE profile2 ( STRING s_d*30 := "Pro_12" >"Name / description"; INT graphic:= 1 >"=0: Show nothing =1: Profile =2: All"); ! Internal variables INT b_val_c; ! Blank value for output curves INT b_val_a; ! Blank value all other entities BEGINMODULE ! +++ ! Algorithm ! _________ ! --- ! +++ ! 1. Checks and initializations ! --- ! +++ ! Check graphic variable ! --- IF graphic = 0 THEN b_val_c := 1; b_val_a := 1; ELIF graphic = 1 THEN b_val_c := 0; b_val_a := 1; ELIF graphic = 2 THEN b_val_c := 0; b_val_a := 0; ELSE EXIT("profile2 graphic is not 0, 1 or 2"); ENDIF; ! +++ ! 2. Create profile curve (not yet programmed) ! --- ! +++ ! Create your own profile as a curve in the X/Y plane starting ! in 0 and ending in 1000.0 ! Register the profile curve as in module profile1 ! (as a GROUP with the name Profile) ! --- ! +++ ! 3. Registration of profile curve with GROUP name Profile ! --- ! GROUP(#2, "Profile", GLOBAL_REF(#1)); LST_INI("Printout from module: profil2"); LST_LIN(""); LST_LIN("No profile 2 has yet been programmed"); LST_LIN("An additional profile can easely be added"); LST_LIN("See source code profile2.MBS on directory mbs!"); LST_LIN(" "); LST_LIN("Delete this part! Use delete and select line"); LST_LIN(" "); LST_EXI(); LIN_FREE(#100, VEC(-2000,-2000,0), VEC( 2000, 2000,0):PEN=2); LIN_FREE(#101, VEC(-2000, 2000,0), VEC( 2000,-2000,0):PEN=2); ENDMODULE