begintemplate ObliquePath
public dtrunk_to_tip, trunk_section, root_oblique
strdef sexec
objref trunk_section
strdef trunk_section_name
objref root_oblique
strdef root_oblique_name
objref tip_section
strdef tip_section_name
objref oblique_path
proc init () {
sec_count=0
forsec $o1 {
if (sec_count==1) {
root_oblique = new SectionRef()
root_oblique_name=secname()
}
if (!sec_count) {
distance(0,1)
trunk_section = new SectionRef()
trunk_section_name=secname()
}
sec_count=sec_count+1
tip_section = new SectionRef()
tip_section_name=secname()
}
access root_oblique.sec
distance(0,0)
access tip_section.sec
dtrunk_to_tip=distance(1,1)
}
endtemplate ObliquePath