Skip to content

Commit c9f87de

Browse files
committed
Add license and readme
1 parent a5bb03d commit c9f87de

2 files changed

Lines changed: 72 additions & 0 deletions

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 Marian Kleineberg
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Pointcloudprinter
2+
A tool to turn pointcloud data from aerial lidar scans into solid meshes for 3D printing.
3+
4+
## Requirements
5+
- Data: Your data needs to be one or multiple `.xyz` text files that contain comma separated numbers. I've tested this tool with data from [here](https://www.opengeodata.nrw.de/produkte/geobasis/dom/dom1l/). This website provides free data for the German state NRW.
6+
- A computer running Windows. (You can port this software to Linux though)
7+
- Have [Blender](https://www.blender.org/download/) and [Meshlab](http://www.meshlab.net/#download) installed.
8+
9+
## Usage
10+
1. Download and unpack this software.
11+
2. Download your pointcloud data and move your `.xyz` files into the data folder. You can also put them somewhere else and configure the location later.
12+
3. Decide on the location of the square you would like to extract from the data. I suggest you use [Google Maps](https://www.google.com/maps/) to find the right place. Copy the two numbers in your Google Maps URL. They are the latitude and longitude.
13+
4. Edit the file `create_mesh.bat` and put in your configuration. You need to set your latitude and longitude. You can also set the size of the square you'd like to extract.
14+
5. Double click the `create_mesh.bat` file. It will now run all the steps required to generate the mesh. Depending on how much data there is to process, this will take between a few minutes and an hour. Once finished, the window closes and if everything worked, a file called `mesh.stl` can be found in the project directory.
15+
16+
If you followed these steps and it did or did not work, please [tell me how it worked](mailto:mail@marian42.de)!
17+
18+
## How it works
19+
This paragraph will explain what each line of the batch file does.
20+
21+
pointcloudtool.exe extract %datadirectory% pointcloud.xyz %latitude% %longitude% %projection% %size%
22+
23+
This line runs the code from this repository to search all `.xyz`files in the `%datadirectory%`. It collects all points that are in the specified square and writes them to the file `pointcloud.xyz`.
24+
25+
pointcloudtool.exe fix pointcloud.xyz pointcloud.xyz heightmap.xyz
26+
27+
This line runs the same program to fix holes in the pointcloud by adding new points where there are holes.
28+
These holes confuse the mesh reconstruction algorithm later. It also creates a simplified heightmap of the pointcloud with normals.
29+
30+
%meshlab% -i pointcloud.xyz -i heightmap.xyz -o mesh.stl -s filter_script.mlx
31+
32+
This line runs Meshlab with a script that contains instructions on how to reconstruct the mesh.
33+
First, Meshlab runs a surface reconstruction algorithm on the heightmap.
34+
This can be done because normals where calculated for it earlier.
35+
Then, the normals of this mesh are transferred to the actual, high-detail pointcloud.
36+
The mesh reconstruction algorithm is run again, now on the big pointcloud.
37+
This mesh is then saved to mesh.stl.
38+
39+
pointcloudtool.exe makeSolid mesh.stl mesh.stl cube.stl %size% %verticaloffset%
40+
41+
This line, again, uses the program from this project.
42+
It adds new triangles around the seam of the mesh and connects them, resulting in a watertight, solid mesh. This could already be 3D-printed!
43+
Furthermore, it creates a box with the exact horizontal and vertical dimensions that where configured.
44+
45+
%blender% -b -P intersect.py -- mesh.stl cube.stl mesh.stl
46+
47+
This line uses Blender calculate the boolean intersection between the solid mesh and the box. The result of this is the final mesh.
48+
49+
## License
50+
51+
This project is distributed under the MIT licensense. Exempt from the license are the parts that link a source, as I didn't write them.

0 commit comments

Comments
 (0)