Contributions are welcome, and can consist of code, documentation, artwork, or data. PerfectTIN does not yet have a mailing list, so contact me if you're interested. Much of the code is modified from Bezitopo, so you'll probably also want to read Bezitopo too.
I've been working on Bezitopo for over twelve years, and my coding style has changed. The current indentation is two spaces; tab characters (optional) are every eight columns. But you may see other styles in some files.
New classes are usually with each word capitalized (e.g. LasHeader
). But there are many uncapitalized classes still in the code.
All measurements of physical quantities for which an SI unit exists are in coherent SI units except
- local angles and some global angles are in fixed-point binary with 0x80000000 meaning 2π;
- sleep times for threads are in milliseconds.
In file formats created for PerfectTIN, the same units should be used, regardless of what units the program displays in.
When writing a new feature which can be automatically tested, write a test. Some test conditions cannot be written until the code is working. In this case, write the output of the test to a file (the PostScript files generated by testptin
are this kind of file), inspect it, and write the test condition.
When writing code to read a file, fuzz it, so that the program is highly unlikely to crash when fed a file of that format, malformed or not. I use American Fuzzy Lop.
PerfectTIN is licensed under the LGPL. Make sure that new contributions are LGPL-compatible. If they are code, put the licensing text at the top of the file; for artwork, put it in the .qrc
file.
If your employer or university could claim copyright over your contribution, be sure that they are fine with the code being released under the LGPL.