Skip to content

Commit

Permalink
Merge pull request #84 from ThomasPe/master
Browse files Browse the repository at this point in the history
Fix tilewidth_scale &  use_geo_coords paramters for standalone
  • Loading branch information
ChHarding authored Dec 23, 2023
2 parents a779fb1 + 8c13873 commit 723b5ab
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM chharding/touchterrain_jupyter:latest
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/anaconda
{
"name": "TouchTerrain",
"build": {
"context": "..",
"dockerfile": "Dockerfile"
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
8888
],
"customizations": {
"vscode": {
"extensions": [
"ms-python.python"
]
}
}
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "python --version",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
3 changes: 3 additions & 0 deletions TouchTerrain_standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def main():
"ntilesx": 1, # number of tiles in x and y
"ntilesy": 1,
"tilewidth": 80, # width of each tile in mm (<- !!!!!), tile height is calculated
"tilewidth_scale": None,
"use_geo_coords": False,
"basethick": 1, # thickness (in mm) of printed base
"zscale": 1.0, # elevation (vertical) scaling
"fileformat": "STLb", # format of 3D model files: "obj" wavefront obj (ascii),"STLa" ascii STL or "STLb" binary STL
Expand All @@ -100,6 +102,7 @@ def main():
"offset_masks_lower": None, # e.g. [[filename, offset], [filename2, offset2],...] Masked regions (pixel values > 0) in the file will be lowered by offset(mm) * pixel value in the final model.
"fill_holes": None, # e.g. [10, 7] Specify number of interations to find a neighbor threshold to fill holes. -1 iterations will continue iterations until no more holes are found. Defaults to 7 neighbors in a 3x3 footprint with elevation > 0 to fill a hole with the average of the footprint.
"min_elev" : None, # None means: will be calculated from actual elevation later. min_elev defines the elevation that will be at base_thickness
"no_normals": True
}

# write an example json file, in case it gets deleted ...
Expand Down

0 comments on commit 723b5ab

Please sign in to comment.