Skip to content

Commit

Permalink
DOC: update readme, provide more info on arguments in mapa ipynb (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
fgebhart authored Feb 12, 2022
1 parent 18bcd4b commit 5c2f0bc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ mapa
A [jupyter notebook](https://jupyter.org/) will be started with an interactive map. Follow the described steps by
executing the cells to create a 3d model of whatever place you like.

Choose bounding box | Create STL file
Choose bounding box | Create STL file
:-------------------------:|:-------------------------:
![](https://i.imgur.com/76hcx9N.jpg) | ![](https://i.imgur.com/llvxlrk.png)

Slice STL file | 3D print
:-------------------------:|:-------------------------:
![](https://i.imgur.com/AKSRHbK.jpg) | ![](https://i.imgur.com/WQn9nwY.png)

### 2. Using the dem2stl cli
The `dem2stl` cli lets you create a 3d-printable STL file based on your tiff file. You can run a demo computation to get
Expand Down
2 changes: 1 addition & 1 deletion mapa/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
help=(
"Whether maximum resolution should be used. Note, that this flag potentially increases compute time "
"dramatically. The default behavior (i.e. max_res=False) should return 3d models with sufficient "
"resolution, while the output stl file should be <= 200 MB."
"resolution, while the output stl file should be < ~300 MB."
),
)
@click.option(
Expand Down
21 changes: 6 additions & 15 deletions mapa/mapa.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6d67123be9b649ba8aaf3a75e415986e",
"model_id": "c6ed5b5bb2d5430394a72af98a754b8f",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -42,15 +42,6 @@
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Rectangle detected, execute next cells to continue!\n",
"Rectangle detected, execute next cells to continue!\n",
"Rectangle detected, execute next cells to continue!\n"
]
}
],
"source": [
Expand Down Expand Up @@ -95,16 +86,16 @@
}
],
"source": [
"stl_file_name = \"alps.stl\"\n",
"stl_file_name = \"output.stl\"\n",
"\n",
"path = create_stl_for_bbox(\n",
" bbox_geometry=drawer.last_draw[\"geometry\"],\n",
" output_file=stl_file_name,\n",
" output_file=stl_file_name, # path to output stl file\n",
" model_size=200, # in millimeter\n",
" z_offset=3.0, # in millimeter\n",
" z_scale=3.0,\n",
" max_res=False,\n",
" make_square=False,\n",
" z_scale=3.0, # factor to scale z-axis with\n",
" max_res=False, # whether to use maximum resolution, `True` might consume a lot of time and memory\n",
" make_square=False, # cuts longer side of the input bbox to get a square\n",
")"
]
},
Expand Down

0 comments on commit 5c2f0bc

Please sign in to comment.