encoding utf-8 source WesternFront2.th # Change name to the main therion file #Surveys to output #----------------- select WesternFront2Plan@WesternFront2 export map -proj plan -layout local -o WesternFront2Output/WesternFront2.pdf #Produces plan of cave, on a single sheet #export map -proj extended -layout local -o WesternFront2Output/WesternFront2Ee.pdf #export model -fmt survex -o WesternFront2Output/WesternFront2.3d #Survex file showing centre line only #export model -o WesternFront2Output/WesternFront2.lox #3d therion model to be viewed in the therion viewer #export map -proj plan -o WesternFront2Output/_Walls.3d #Survex file showing walls only #export model -o WesternFront2/OutputWesternFront2.kml #export map -o WesternFront2Output/WesternFront2.kml layout local base-scale 1 300 scale 1 200 symbol-set BCRA #debug station-names #debug on #legend on #colour map-fg altitude #colour map-fg scrap #colour map-fg [97 86 38] ##Pale Yellow## #colour map-bg [90 90 90] ##Light Grey## north grid grid bottom #grid top #grid-size 20 20 20 m #grid-coords all #border #rotate -90 #map-header 100 100 ne #transparency on scale-bar 10 metres symbol-colour area water [25 50 100] #symbol-colour area sump [10 10 100] #symbol-colour area flowstone [20 20 20] symbol-colour line water-flow [22 22 95] #symbol-colour point water-flow [22 22 95] symbol-colour group centerline [100 0 0] symbol-colour point station [0 0 0] #symbol-hide group centerline #1. hides all centerline symbols from everywhere (stations and shots). #symbol-hide point cave-station #2. tells therion, that you want to show stations in the cave. #But in fact point cave-station itself does not show any symbol. #It only specifies, that stations in the cave should be shown rather than surface stations. symbol-assign area blocks BCA #code tex-map #/topodate {25 October 2017} #endcode ####CODE TO PUT BORDER AROUND MAP#### #----------------------------- #layout layoutMapBorder #code tex-map #\framethickness=0.5mm #endlayout #LayoutMapBorder ###############OVERIDES############## ##Overide Therion Map Header Data### #----------------------------------- #code tex-map #\cavename={Tom Taylors Cave\medskip \size[30] How Stean Gorge\medskip \size[30]North Yorkshire} #endcode #map-comment "How Stean Gorge" ##Overide cave length and depth to remove surface leg data## #---------------------------------------------------------- #code tex-map #\topoteam{BSD} #\cavelength{164m} #\cavedepth{12m} #endcode ####AA's Blocks#### code metapost initsymbol("a_blocks_BCA"); def a_blocks_BCA (expr p) = T:=identity; symbol_distance:=1.0; % Distance between the blocks as set out in a rectangular grid block_randomisation:=0.7; % Max each point of the base block can be moved. Too big and they can intersect themselves base_rotation:= 0; % Rotation from 0 of base block, can be used to set all blocks to the same angle random_rotation:= 360; % Rotation either side of base rotation eg 20 will be plus or minus 10 each side min_scale_factor:=0.7; % Minimum multiplier used for the base shape add_scale_factor:= 0.6; % Added to the minimum multiplier to get the maximum scale block_rectangle:=1.5; % How much longer the block is than it is wide, before randomising shift_randomisation:=0.75; % Max random amount block can be moved from the original grid %Now set the proportions of different sided block b_tri:=1; b_quad:=3; b_pent:=4; b_hex:=2; pickup PenC; path q, regular, qq; q = bbox p; pair outside; outside:= ulcorner q + up; picture tmp_pic; uu := max(u, (xpart urcorner q - xpart llcorner q)/100, (ypart urcorner q - ypart llcorner q)/100); iu := uu * block_rectangle; blocks := b_tri+b_quad + b_pent + b_hex; tmp_pic := image( for i = xpart llcorner q step symbol_distance * block_rectangle * uu until xpart urcorner q: for j = ypart llcorner q step symbol_distance*uu until ypart urcorner q: pick_sides := uniformdeviate(blocks); if pick_sides < b_tri: sides:=3; elseif pick_sides < b_tri + b_quad: sides:=4; elseif pick_sides < b_tri + b_quad +b_pent: sides:=5; else: sides:=6 fi; qq := for n:=0 upto sides-1: ((cosd(360*n/sides))*iu/2,(sind(360*n/sides))*uu/2) -- endfor cycle; %radius is 0.5 divide by 2 qq := punked ((qq) randomized (block_randomisation * uu)) scaled (uniformdeviate(add_scale_factor)+min_scale_factor) rotated (base_rotation + random_rotation / 2 - uniformdeviate(random_rotation) ) shifted ((i,j) randomized (shift_randomisation * uu)); forever: % Repeatedly reduces the size of the image, as this is done round zero it also moves it to the zero location, until it fits in the area exitif xpart (p intersectiontimes qq) < 0; qq:= qq scaled (0.99 ); endfor; if pointinside((i,j),p,outside): % Cleans lines on border, assumably ones outside with jut an edge touching thclean qq; thclean qq; thclean qq; thclean qq; thdraw qq; fi; endfor; endfor; ); clip tmp_pic to p; drawoptions(); draw tmp_pic; enddef; endcode endlayout