Python script that reads 3d file and writes a javascript file

Michael Lake mikel at speleonics.com.au
Thu May 22 07:28:02 BST 2014


Hi Olly and all

Okies I have fixed the python script that does the labels. That is now working
fine. Looks like my only error now is the js that swaps E-W. As you noticed Olly
it's correct in the 3d as ASCII and looking at the 3dtopos output. 

I think I'll have to wait for other who have lconv.py to check if they get E-W
reversed. 

Quoting Olly Betts <olly at survex.com>:
> On Thu, May 22, 2014 at 02:19:20PM +1000, Michael Lake wrote:
> > I wrote a while ago ...
> > 
> > > Thanks Wookey. Everything is now working ace :-)
> > > I just had to add --enable-testprogs to the configure script and then 
> > > dump3d was built.
> 
> As of Survex 1.2.7, dump3d is built as standard, and --enable-testprogs
> no longer does anything.
> 
> > > Have now a 3d file being rendered and able to be 
> > > rotated. Its really neat :-) I think the js functions are the tricky
> bits. 
> > > The python is pretty understandable. 
> > 
> > Not everything is working OK though. 
> > 1. labels are not appearing 
> >    The 3d ASCII has labels at the end of NODE lines but the python code 
> >    in ltconv.py does not read those lines only MOVE and LINE statements. 
> 
> I don't seem to have a copy of ltconv.py, but I suspect it needs
> updating - in recent versions, dump3d outputs additional information at
> the end of some lines, and it sounds like this script is rejecting such
> lines.
> 
> > 2. east and west are swapped. It shows OK in Aven but swapped in
> > Squiggle. The js is too complex for me. 
> 
> Looks OK in the dump3d output to me - test.east is at (50,0,0), so
> positive X is East.
> 
> > Also a true east leg does not show, you need to set it to 90.1  
> 
> Again, looks OK in the dump3d output.
> 
> Cheers,
>     Olly
> 


Mike Lake




More information about the Survex mailing list