{"id":13714944,"url":"https://github.com/wildmeshing/TriWild","last_synced_at":"2025-05-07T03:31:13.160Z","repository":{"id":56370316,"uuid":"184290352","full_name":"wildmeshing/TriWild","owner":"wildmeshing","description":"TriWild: Robust Triangulation with Curve Constraints","archived":false,"fork":false,"pushed_at":"2022-12-16T12:55:47.000Z","size":21243,"stargazers_count":232,"open_issues_count":6,"forks_count":27,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-14T03:34:20.104Z","etag":null,"topics":["geometry-processing","meshing","traingulation"],"latest_commit_sha":null,"homepage":"https://dl.acm.org/doi/pdf/10.1145/3306346.3323011","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wildmeshing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.MPL2","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-30T15:49:24.000Z","updated_at":"2024-10-11T06:48:49.000Z","dependencies_parsed_at":"2023-01-29T14:00:19.062Z","dependency_job_id":null,"html_url":"https://github.com/wildmeshing/TriWild","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wildmeshing%2FTriWild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wildmeshing%2FTriWild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wildmeshing%2FTriWild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wildmeshing%2FTriWild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wildmeshing","download_url":"https://codeload.github.com/wildmeshing/TriWild/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252806420,"owners_count":21807199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geometry-processing","meshing","traingulation"],"created_at":"2024-08-03T00:00:52.266Z","updated_at":"2025-05-07T03:31:08.145Z","avatar_url":"https://github.com/wildmeshing.png","language":"C++","funding_links":[],"categories":["Meshing","Maths"],"sub_categories":["Triangular and tetrahedral meshing"],"readme":"# TriWild: Robust Triangulation With Curve Constraints\n\n![](figures/teaser_row.jpg)\nYixin Hu, Teseo Schneider, Xifeng Gao, Qingnan Zhou, Alec Jacobson, Denis Zorin, Daniele Panozzo.\nACM Transactions on Graphics (SIGGRAPH 2019).\n\n![Build](https://github.com/wildmeshing/TriWild/workflows/Build/badge.svg)\n[![Build Status](https://img.shields.io/docker/cloud/build/yixinhu/triwild.svg)](https://hub.docker.com/r/yixinhu/triwild)\n\n## Important Tips\n\n💡💡💡 We also have 3D version of \"TriWild\" - **TetWild**! It's the parent of TriWild. TetWild can generate linear tetrahedral meshes robustly and automatically. Check it out 👉 **[TetWild](https://github.com/Yixin-Hu/TetWild)**.\n\n💡💡💡 If you are interested in the algorithm details, please refer to our **[paper](https://dl.acm.org/doi/pdf/10.1145/3306346.3323011)** first. We provide plenty of examples and statistics in the paper.\n\n```\n@article{Hu:2019:TRT:3306346.3323011,\n author = {Hu, Yixin and Schneider, Teseo and Gao, Xifeng and Zhou, Qingnan and Jacobson, Alec and Zorin, Denis and Panozzo, Daniele},\n title = {TriWild: Robust Triangulation with Curve Constraints},\n journal = {ACM Trans. Graph.},\n issue_date = {July 2019},\n volume = {38},\n number = {4},\n month = jul,\n year = {2019},\n issn = {0730-0301},\n pages = {52:1--52:15},\n articleno = {52},\n numpages = {15},\n url = {http://doi.acm.org/10.1145/3306346.3323011},\n doi = {10.1145/3306346.3323011},\n acmid = {3323011},\n publisher = {ACM},\n address = {New York, NY, USA},\n keywords = {curved triangulation, mesh generation, robust geometry processing},\n}\n```\n\n💡💡💡 Check our **[license](https://github.com/wildmeshing/TriWild#license)** first.\n\n## Dataset\n\n💡💡💡 **Please kindly cite our paper when using our pre-generated data.**\n\n### Examples in the Paper\n\nDownload [zip](https://drive.google.com/file/d/13xZqYpBz1cV1JaakgkcSO6hSbV9or5V4/view?usp=sharing).\n\n💡💡💡Quickly try TriWild on some small exmaples here!!\n\n### 20k Openclip Dataset\n\nInput: [19686 meshes (.obj) each with a curved feature file (.json)](https://drive.google.com/file/d/1yhrJtfCVMahwgPc0pmX0D8GAJgZ9M7v9/view?usp=sharing)\n\n(For your reference, [here](https://drive.google.com/open?id=1RWzbLKqXeWIQeNYaAfzE8BEcqJZ0R6b6) is original 20k SVG images. Those with animation are not converted to obj/json.)\n\nOutput with curved constrains: [19685 meshes (.msh)](https://drive.google.com/open?id=189OP5v5EJNP9QMqpWw_XuGRK_MjMThuJ)\n\nOutput with linear constrains(todo James): [19686 meshes (.msh)]()\n\n## Installation\n\nYou can use TriWild either by pulling a Docker image or compiling the source code with CMake.\n\n### via Docker\n\nInstall Docker and run Docker. Pull TetWild Docker image and run the binary:\n\n```bash\ndocker pull yixinhu/triwild\ndocker run --rm -v \"$(pwd)\":/data yixinhu/triwild /app/TriWild/build/TriWild [TriWild arguments]\n```\n\n### via CMake\nOur code was originally developed on MacOS and has been tested on Linux and Windows. We provide the commands for installing TriWild in Unix OS:\n\n- Clone the repository into your local machine:\n\n```bash\ngit clone https://github.com/wildmeshing/TriWild\n```\n- Compile the code using cmake (default in Release mode):\n\n```bash\ncd TriWild\nmkdir build\ncd build\ncmake ..\nmake -j\n```\n\n- Check the installation:\n\n```bash\n./TriWild --help\n```\nThis command should show a list of TriWild parameters.\n\n## Usage\n\n**Input**：\n\n- Linear constraints (required): segment soup in `.obj` format.\n\n- Curved constraints: Bezier curves in `.json` format.\n\n**Output**: Linear/high-order triangle mesh in `.msh` format.\n\nPlease check dataset above for examples.\n\n### Quick Try\n\nYou can try TriWIld quickly with default parameters by running\n\n```\n./TriWild --input input.obj\n```\nfor linear constrains, or\n\n```\n./TriWild --input input.obj --feature-input input.json\n```\nfor curved constrains.\n\n### Command Line Switches\n\n```\nUsage: ./TriWild [OPTIONS]\n\nOptions:\n  -h,--help                   Print this help message and exit\n  --input TEXT (REQUIRED)     Input segments in .obj format.\n  --output TEXT               Output path.\n  --postfix TEXT              Add postfix into outputs' file name.\n  --feature-input TEXT        Input feature json file.\n  --stop-quality FLOAT        Specify max AMIPS energy for stopping mesh optimization.\n  --max-its INT               Max number of mesh optimization iterations.\n  --stage INT                 Specify envelope stage\n  --envelope-r FLOAT          relative envelope epsilon_r. Absolute epsilonn = epsilon_r * diagonal_of_bbox\n  --feature-envelope-r FLOAT  Relative feature envelope mu_r. Absolute mu = mu_r * diagonal_of_bbox\n  --target-edge-length FLOAT  Absolute target edge length l.\n  --target-edge-length-r FLOAT\n                              Relative target edge length l_r. Absolute l = l_r * diagonal_of_bbox\n  --log-file TEXT             Output a log file.\n  --min-angle FLOAT           Desired minimal angle.\n  --mute-log                  Mute prints.\n  --cut-outside               Remove \"outside part\".\n  --skip-eps                  Skip saving eps.\n  --cut-holes TEXT            Input a .xyz file for specifying points inside holes you want to remove.\n  --output-linear-mesh        Output linear mesh for curved pipeline.\n```\n\nMore details about some important parameters:\n\n* **`--feature-input`**\n\nWe provide a [python script](https://github.com/teseoch/svg2obj) for converting a svg to curves in `.json` format.\n\n* **`--envelope`**\n\nRelative surface envelope \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=$\\epsilon_r$\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?$\\epsilon_r$\" title=\"$\\epsilon_r$\" /\u003e\u003c/a\u003e (1e-3 in default). Absolute surface envelope \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=$\\epsilon\u0026space;=\u0026space;\\epsilon_r\u0026space;d$\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?$\\epsilon\u0026space;=\u0026space;\\epsilon_r\u0026space;d$\" title=\"$\\epsilon = \\epsilon_r d$\" /\u003e\u003c/a\u003e, where \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=$d$\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?$d$\" title=\"$d$\" /\u003e\u003c/a\u003e is the length of the diagonal of the bounding box of input.\n\n* **`--feature-envelope`**\n\nRelative feature envelope \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=$\\mu_r$\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?$\\mu_r$\" title=\"$\\mu_r$\" /\u003e\u003c/a\u003e (1e-3 in default with linear constraints and 2e-3 for curved constraints). Absolute feature envelope \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=$\\mu\u0026space;=\u0026space;\\mu_r\u0026space;d$\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?$\\mu\u0026space;=\u0026space;\\mu_r\u0026space;d$\" title=\"$\\mu = \\mu_r d$\" /\u003e\u003c/a\u003e.\n\n* **`--target-edge-length-r`**\n\nRelative targeted edge length \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=$\\ell_r$\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?$\\ell_r$\" title=\"$\\ell_r$\" /\u003e\u003c/a\u003e (0.05 in default). Absolute targeted edge length \u003ca href=\"https://www.codecogs.com/eqnedit.php?latex=$\\ell\u0026space;=\u0026space;\\ell_r\u0026space;d$\" target=\"_blank\"\u003e\u003cimg src=\"https://latex.codecogs.com/gif.latex?$\\ell\u0026space;=\u0026space;\\ell_r\u0026space;d$\" title=\"$\\ell = \\ell_r d$\" /\u003e\u003c/a\u003e.\n\n## License\n\nTriWild is MPL2 licensed and free for both commercial and non-commercial usage. However, you have to cite our work in your paper or put a reference of TriWild in your software. Whenever you fix bugs or make some improvement of TriWild, you should contribute back.\n\n## Gallery\n![](figures/mosaic_new.png)\n\n\u003c!--## Acknowledgements\n\n(todo)--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwildmeshing%2FTriWild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwildmeshing%2FTriWild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwildmeshing%2FTriWild/lists"}