- filesystem
- CLion
- Using WSL
- CMake help
| import sys | |
| import point_cloud_utils as pcu | |
| import numpy as np | |
| def main(): | |
| # Load vertices and faces for a mesh | |
| # mv, mf = pcu.load_mesh_vf("./cube2.obj") | |
| mv, mf = pcu.load_mesh_vf("./filled_SM_dataset_4.obj") |
| import polyscope as ps | |
| import json | |
| import sys | |
| import numpy as np | |
| import math | |
| def recusionvisit(a, vs): | |
| for each in a: |
| import jsonschema_rs | |
| import json | |
| import sys | |
| import urllib.request | |
| # try: | |
| js = json.loads(open("/Users/hugo/temp/hhh/test.ext.json").read()) | |
| print("yessss") |
| # import jsonschema | |
| # import json | |
| # s = json.loads(open("/Users/hugo/projects/cityjson-specs/schemas/cityjson.min.schema.json").read()) | |
| # i = json.loads(open("/Users/hugo/data/cityjson/v1.1/denhaag/DenHaag_01.city.json").read()) | |
| # # i = json.loads(open("/Users/hugo/data/cityjson/v1.1/denhaag/b32.city.json").read()) | |
| # isValid = True | |
| # es = [] | |
| # myvalidator = jsonschema.Draft7Validator(s, format_checker=jsonschema.FormatChecker()) | |
| # for err in sorted(myvalidator.iter_errors(i), key=str): |
| import json | |
| import msgpack | |
| import cbor2 | |
| # filename = '/Users/hugo/temp/c++11/data/DenHaag_01.json' | |
| # filename = '/Users/hugo/data/cityjson/examples/vienna/v100/Vienna_102081.json' | |
| filename = '/Users/hugo/data/cityjson/examples/zurich/Building_LoD2_V10.json' | |
| fin = open(filename) | |
| j = json.loads(fin.read()) |
| [package] | |
| name = "fixcjpdok" | |
| version = "0.1.0" | |
| authors = ["Hugo Ledoux <h.ledoux@tudelft.nl>"] | |
| edition = "2018" | |
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
| [dependencies] |
NOTE: There are usually many options to set up a development environment on each operating system. What proposed here is not the only option, but I try to minimize your effort. Besides, you may skip some of the steps if they have been properly set up already. Or if you know what you're doing, you're allowed to use any C++ you want. As long as you know how to deal with a CMake project, it's good.
Here's a small test project with one C++ unit (hello.cpp) and a CMake file (the project file to tell the compiler how to compile the project).
Install Microsoft Visual Studio Community 2019, and not Visual Studio Code.
| from random import random | |
| def move_obj(infile, outfile, translate=(0,0,0), delimiter=' ', standard_building_height=None): | |
| tx,ty,tz = translate | |
| with open(outfile,'w') as fo: | |
| with open(infile,'r') as f: | |
| for i, line in enumerate(f): | |
| if line.startswith('v'): | |
| columns = line.split(delimiter) |