Code Monkey home page Code Monkey logo

coacd's Introduction

Approximate Convex Decomposition for 3D Meshes with Collision-Aware Concavity and Tree Search [SIGGRAPH2022]

[project] [paper] [video]

Build PyPI - Downloads

[News] CoACD (both Python and C++) is supported on Linux (x86_64), Windows (amd64) and MacOS (x86_64 & apple sillicon) now!

[News] CoACD is now supported in Unity as a package!

[News] CoACD adds "auto" pre-processing mode, which produces better results for manifold meshes!

Approximate convex decomposition enables efficient geometry processing algorithms specifically designed for convex shapes (e.g., collision detection). We propose a method that is better to preserve collision conditions of the input shape with fewer components. It thus supports delicate and efficient object interaction in downstream applications.

avatar

PyPI

(1) Installation

pip install coacd

(2) Usage

import coacd

mesh = trimesh.load(input_file, force="mesh")
mesh = coacd.Mesh(mesh.vertices, mesh.faces)
parts = coacd.run_coacd(mesh) # a list of convex hulls.

The complete example script is in python/package/bin/coacd, run it by the following command:

cd python
python package/bin/coacd -i $InputFile -o $OutputFile

Unity

Supporting Unity 2020.1 or later. See the example project in unity branch.

movie_003_1.mp4

(1) Installation

  1. Open the Package Manager from Window -> Package Manager.
  2. Find and click the + button in the upper lefthand corner of the window. Select Add package from git URL.
  3. Enter the following URL:
https://github.com/SarahWeiii/CoACD.git?path=/Packages/info.flandre.coacd#unity
  1. Click Add.

(2) Usage

  1. Add a CoACD component to your object. You can tweak the parameters in the editor.

image

  1. Right click the component header lane. Then select Generate Collision Meshes or Generate Collision Meshes for Hierarchy to generate collision for the current object or all children of the current object that contains a MeshFilter, respectively.

image

  1. Unity mesh colliders will be created in the scene under Collision as a child of each object.

image

  1. Alternatively, you can call the runtime API as a method of the CoACD component:
public List<Mesh> RunACD(Mesh mesh);

Compile from source

(1) Clone the code

git clone --recurse-submodules https://github.com/SarahWeiii/CoACD.git

(2) Dependencies

Install dependencies: git and cmake >= 3.24. Recommended compilers: Linux g++ >= 9, < 12; clang on MacOS 10.14 or higher; MSVC 2019/2022 on Windows.

(3) Compile

First create the build directory:

cd CoACD \
&& mkdir build \
&& cd build \

Then run cmake. On Linux and MacOS:

cmake .. -DCMAKE_BUILD_TYPE=Release \
&& make main -j

On Windows (MSVC):

cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DOPENVDB_CORE_SHARED=OFF -DTBB_TEST=OFF -DCMAKE_CXX_FLAGS="/MT /EHsc"
cmake --build . --target main --config Release

(4) Quick start

We provide a set of default parameters, and you only need to specify the input and output path. You can take an arbitrary mesh as input (in .obj format, no need to be a manifold) and run the algorithm by the following command:

./main -i PATH_OF_YOUR_MESH -o PATH_OF_OUTPUT

The generated convex components (in both .obj and .wrl formats) will be saved in PATH_OF_OUTPUT.

Examples

We provide some example meshes and a run_example.sh, and the results will be saved in the outputs folder.

bash run_example.sh
  • You can adjust the threshold by -t to see results with different quality.
  • Three of the examples are from PartNet-M (Bottle.obj, Kettle.obj, KitchenPot.obj), which are non-manifold. Two of them are from Thingi10K (Octocat-v2.obj, SnowFlake.obj), which are both 2-manifold.

Parameters

Here is the description of the parameters (sorted by importance).

  • -i/--input: path for input mesh (.obj).
  • -o/--output: path for output (.obj or .wrl).
  • -ro/--remesh-output: path for preprocessed mesh output (.obj).
  • -pr/--prep-resolution: resolution for manifold preprocess (20~100), default = 50.
  • -t/--threshold: concavity threshold for terminating the decomposition (0.01~1), default = 0.05.
  • -pm/--preprocess-mode: choose manifold preprocessing mode ('auto': automatically check input mesh manifoldness; 'on': force turn on the pre-processing; 'off': force turn off the pre-processing), default = 'auto'.
  • -nm/--no-merge: flag to disable merge postprocessing, default = false.
  • -c/--max-convex-hull: max # convex hulls in the result, -1 for no maximum limitation, works only when merge is enabled, default = -1 (may introduce convex hull with a concavity larger than the threshold)
  • -mi/--mcts-iteration: number of search iterations in MCTS (60~2000), default = 100.
  • -md/--mcts-depth: max search depth in MCTS (2~7), default = 3.
  • -mn/--mcts-node: max number of child nodes in MCTS (10~40), default = 20.
  • -r/--resolution: sampling resolution for Hausdorff distance calculation (1e3~1e4), default = 2000.
  • --pca: flag to enable PCA pre-processing, default = false.
  • -k: value of $k$ for R_v calculation, default = 0.3.
  • --seed: random seed used for sampling, default = random().

An example of changing the parameters:

./main -i PATH_OF_YOUR_MESH -o PATH_OF_OUTPUT -t 0.05 -mi 200 -md 4 -mn 25

Parameter tuning tricks:

  1. In most cases, you only need to adjust the threshold (0.01~1) to balance the level of detail and the number of decomposed components. A higher value gives coarser results, and a lower value gives finer-grained results. You can refer to Fig. 14 in our paper for more details.
  2. If your input mesh is not manifold, you should also adjust the prep-resolution (20~100) to control the detail level of the pre-processed mesh. A larger value can make the preprocessed mesh closer to the original mesh but also lead to more triangles and longer runtime.
  3. The default parameters are fast versions. If you care less about running time but more about the number of components, try to increase searching depth (-md), searching node (-mn) and searching iteration (-mi) for better cutting strategies.
  4. Make sure your input mesh is 2-manifold solid if you want to use the -np flag. Skipping manifold pre-processing can better preserve input details, but please don't specify the -np flag if your input mesh is non-manifold (the algorithm may crush or generate wrong results).
  5. --seed is used for reproduction of the same results as our algorithm is stochastic.

Citation

If you find our code helpful, please cite our paper:

@article{wei2022coacd,
  title={Approximate convex decomposition for 3d meshes with collision-aware concavity and tree search},
  author={Wei, Xinyue and Liu, Minghua and Ling, Zhan and Su, Hao},
  journal={ACM Transactions on Graphics (TOG)},
  volume={41},
  number={4},
  pages={1--18},
  year={2022},
  publisher={ACM New York, NY, USA}
}

coacd's People

Contributors

abdealtheria avatar colin97 avatar eliphatfs avatar fbxiang avatar fire avatar isebasus avatar sarahweiii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coacd's Issues

Specifying max # hulls and max # vertices per hull

Hi,

Thanks a lot for your work on CoACD and for releasing it on GitHub and on PyPI! We have recently started using it instead of V-HACD and have been observing an incredible improvement in the results we get.

We have just one issue: for our use case, which involves using Isaac Sim's GPU dynamics, we need all of our convex decompositions to have fewer than 64 convex hulls, and each of those convex hulls needs to have less than 60 vertices. In V-HACD parameters exist for both of these, which makes it keep reducing until these are reached.

Is there any way we could do this in CoACD?

Thanks,
Cem

Tetrahedral decomposition?

Have you considered a version of CoAcd that uses pure tetrahedral decomposition? Tets are, after all, the quintessential convex mesh 🙂.

Tetrahedral meshes have a strong Finite Element theory supporting them, and are otherwise useful in many circumstances (e.g. very cheap, non-iterative colliders). TetWild and fTetWild are powerful, but they are not designed to give the user a precise, variable-resolution "coarsening" knob, that will dramatically reduce the number of tets at the cost of error w.r.t the surface mesh, which is what CoAcd is so good at.

We'd love to hear your thoughts on this.

For certain parameters of example objs, there may be assert failed in the C++ Windows compiled version.

For example, using these parameters will result in an error (CDT's commit id is cf4df31):
-i .\examples\Kettle.obj -o .\examples\Kettle_compiled.obj -t 0.05 -pm off -c 4 -pr 50 -s 1234
image

In addition, I found that setting breakpoints on the code of COACD is always ineffective when using VS or Rider on Windows. (breakpoints cannot be hit in the code of the submodule or CoACD itself.)
image

If someone encounters a similar problem, I would really appreciate it if they could reply.

Reduce number of vertices in each convex hull

I was wondering if there is a way to reduce the number of vertices of each convex hull.

Compared to VHACD I get a lot more vertices per convex hull with COACD. Although I am quite impressed with the quality of the decomposition of COACD, the high number of vertices will affect collision checking too just like having too many convex hulls.

Here is an example. Compare for instance the VHACD2 MEDIUM case that has 8 convex hulls with 369 vertices and the COACD LOW case that has a similar 7 convex hulls but with 10 times more vertices:

image

output format

Hi thanks for sharing this great work, I'm using CoACD to replace VHACD to build some robot simulation envs, but I found that when I specify the output to be .wrl format, the output is still in .obj format, and I'm wondering is there a way to save saperate cvx hulls so I can load them saperately to the simulator? Thanks

CPP Error after processing several examples

Thank you for open-sourcing this tool. It has been very helpful to run CD on some meshes that I have.

I was trying to decompose some meshes that I have, from an open-source dataset. After processing about ~200-300 meshes in a python for loop, I received this error:

python: /workspace/coacd/src/process.cpp:112: double coacd::MergeConvexHulls(coacd::Model&, std::vector<coacd::Model>&, std::vector<coacd::Model>&, coacd::Params&, double, double): Assertion `p1 < costSize' failed

I've seen this error about 2-3 times at this point. For context, I'm trying to decompose the mesh with these parameters:

coacd.run_coacd(
            mesh=mesh,
            threshold=0.05,
            max_convex_hull=10,
            merge=True,
        )

Please let me know if some of these parameters are incompatible or if this is a known bug for certain meshes.

Thank you!

Strange decomposition on simple case.

housetest1
Here's a simple test case.
househullbug1.zip

In the picture, the original model is on the right, and the convex decomposition
is on the left.

Three of the walls, and the ground slab, were convex in the input.
Yet they were subdivided into four parts with more complex geometry.
The fourth wall has a door cutout and a window cutout.
Those disappeared completely during convex decomposition.

This is unexpected.

Slimmer C++ dependencies?

Hi CoACD!

Yuval here from the MuJoCo dev team. Like many others, we are really impressed by CoACD outputs and are enthusiastically recommending it to our users at every opportunity.

We were delighted to discover that you now have a C++ API. Including optional automatic CoACD pre-processing would really improve our user's lives. However, we then saw that your dependencies include extremely large packages like openvdb and boost. We work very hard to keep MuJoCo's dependencies to the absolute minimum, and indeed all of our dependencies are very small and have no dependencies themselves.

Do you have any plans to reduce your dependency payload?

If yes, please let us know.
We would love to help spread your excellent algorithms to the physics-simulating, open-source world 🙂 🌍

Usage on Apple Silicon

Hi,

Would it be possible to install / build from source on apple silicon / arm64?

Thank you!

Crash when decomposing

I have a model of a cottage and the library is crashing when I try to decompose it. I am not sure if i'm doing something wrong.
image

Here is the .obj file for the cottage example.

Here is a minimal code example that builds all of the verts/indices and attempts to decompose them.
I was originally trying with preprocess = "" but even with preprocess = "auto" it still crashes so I think the cause is something else.

Thank you very much for your library!

Edit: When testing it out, it seems like if I increase the threadhold to 0.2 it will work, but obviously it produces results that are less than desirable with a threshold that high and even with the increased threshold preprocess must be on or it crashes.

Another crash during decomposing in debug mode

For some reason, the top row value is outside of the size of the costMatrix std::vector when I am decomposing this model in debug mode.
The size of the vector is 4005, and the top_row value is 4005.
https://github.com/SarahWeiii/CoACD/blob/main/src/process.cpp#L181

image

Model: https://drive.google.com/file/d/1Z1TG8CQqk_eUBzhLKfzvWFQh8ACBlSRN/view?usp=share_link

Code example: (Too long for pastebin)
https://drive.google.com/file/d/1eG44C6UPMUqGZjLxwxXyjIVD6zIzuabh/view?usp=share_link

Three point form of Plane, most likely mistake

class Plane
{
    bool pFlag;       // whether three point form exists
    vec3d p0, p1, p2; // three point form

The code has a value modification of these fields (in clip.cpp) but they are never used.
image

Crashes when building with Visual Studio 2019 on Windows 11

Hi,

I wanted to try this out on Windows 11 where cmake creates a Visual Studio 2019 project.

But when trying to run it the app crashes. Visual studio also reports potential errors in the code at multiple places.

The error is in triangle.h, line 13988: vertexloop[0] = vertices[i][0];
The vertexloop seems to be allocated incorrectly.

Even after I tried doing a brute malloc instead of the pool it crashed elsewhere.

I tried it on the bottle model.

Splitting into multiple files for Mujoco

Is there an easy way to create multiple files by specifying a folder directory and output format where each file has one convex hull.

Mujoco treats all meshes from the same file as a single convex hole and splitting it into multiple files solves this problem.

Threshold too high

I am trying to compute the convex decomposition of a mechanism but the threshold parameter is too high and does not allow to obtain a usable result.
Original file

Decomposed file

What can I do to obtain a better result?

error: variable or field ‘debug’ declared void 13 | inline void debug(spdlog::string_view_t fmt, const Args &...args)

when I try to "make",it occurs.
/home/ustc/PycharmProjects/CoACD/src/logger.h:13:21: error: variable or field ‘debug’ declared void
13 | inline void debug(spdlog::string_view_t fmt, const Args &...args)
| ^~~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:13:35: error: ‘string_view_t’ is not a member of ‘spdlog’
13 | inline void debug(spdlog::string_view_t fmt, const Args &...args)
| ^~~~~~~~~~~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:13:54: error: expected primary-expression before ‘const’
13 | inline void debug(spdlog::string_view_t fmt, const Args &...args)
| ^~~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:19:21: error: variable or field ‘info’ declared void
19 | inline void info(spdlog::string_view_t fmt, const Args &...args)
| ^~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:19:34: error: ‘string_view_t’ is not a member of ‘spdlog’
19 | inline void info(spdlog::string_view_t fmt, const Args &...args)
| ^~~~~~~~~~~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:19:53: error: expected primary-expression before ‘const’
19 | inline void info(spdlog::string_view_t fmt, const Args &...args)
| ^~~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:25:21: error: variable or field ‘warn’ declared void
25 | inline void warn(spdlog::string_view_t fmt, const Args &...args)
| ^~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:25:34: error: ‘string_view_t’ is not a member of ‘spdlog’
25 | inline void warn(spdlog::string_view_t fmt, const Args &...args)
| ^~~~~~~~~~~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:25:53: error: expected primary-expression before ‘const’
25 | inline void warn(spdlog::string_view_t fmt, const Args &...args)
| ^~~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:31:21: error: variable or field ‘error’ declared void
31 | inline void error(spdlog::string_view_t fmt, const Args &...args)
| ^~~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:31:35: error: ‘string_view_t’ is not a member of ‘spdlog’
31 | inline void error(spdlog::string_view_t fmt, const Args &...args)
| ^~~~~~~~~~~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:31:54: error: expected primary-expression before ‘const’
31 | inline void error(spdlog::string_view_t fmt, const Args &...args)
| ^~~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:37:21: error: variable or field ‘critical’ declared void
37 | inline void critical(spdlog::string_view_t fmt, const Args &...args)
| ^~~~~~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:37:38: error: ‘string_view_t’ is not a member of ‘spdlog’
37 | inline void critical(spdlog::string_view_t fmt, const Args &...args)
| ^~~~~~~~~~~~~
/home/ustc/PycharmProjects/CoACD/src/logger.h:37:57: error: expected primary-expression before ‘const’
37 | inline void critical(spdlog::string_view_t fmt, const Args &...args)
| ^~~~~
CMakeFiles/_coacd.dir/build.make:110: recipe for target 'CMakeFiles/_coacd.dir/src/clip.cpp.o' failed
make[2]: *** [CMakeFiles/_coacd.dir/src/clip.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/_coacd.dir/all' failed
make[1]: *** [CMakeFiles/_coacd.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Does CoACD use manifold plus?

AllocatorFooChar missing error when building from source

Getting this errror when building

Errors << CoACD:make /home/ubuntu/workspace/logs/CoACD/build.make.000.log In file included from /home/ubuntu/workspace/build/CoACD/_deps/tbb-src/test/conformance/conformance_allocators.cpp:21: /home/ubuntu/workspace/build/CoACD/_deps/tbb-src/test/common/allocator_test_common.h: In instantiation of ‘void TestAllocator(TestName, const Allocator&) [with Allocator = std::pmr::polymorphic_allocator<void>]’: /home/ubuntu/workspace/build/CoACD/_deps/tbb-src/test/conformance/conformance_allocators.cpp:86:123: required from here /home/ubuntu/workspace/build/CoACD/_deps/tbb-src/test/common/allocator_test_common.h:284:15: error: no class template named ‘rebind’ in ‘class std::pmr::polymorphic_allocator<void>’ 284 | using AllocatorFooChar = typename Allocator::template rebind<FooChar>::other; | ^~~~~~~~~~~~~~~~ compilation terminated due to -Wfatal-errors. make[2]: *** [_deps/tbb-build/test/CMakeFiles/conformance_allocators.dir/build.make:76: _deps/tbb-build/test/CMakeFiles/conformance_allocators.dir/conformance/conformance_allocators.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:8391: _deps/tbb-build/test/CMakeFiles/conformance_allocators.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:156: all] Error 2

The number of faces is 4x larger compared to vhacd in a test model

out.glb is coacd result, 25 piceces, 1254 triangles
image

code:

import coacd
import trimesh
import numpy as np

input_file = './input.obj'
mesh = trimesh.load(input_file, force="mesh")
mesh = coacd.Mesh(mesh.vertices, mesh.faces)

parts = coacd.run_coacd(mesh, merge=True, threshold=0.05, resolution=2000, preprocess_resolution=50) # a list of convex hulls.

mesh_parts = []
for vs, fs in parts:
    mesh_parts.append(trimesh.Trimesh(vs, fs))

scene = trimesh.Scene()
np.random.seed(0)
for p in mesh_parts:
    p.visual.vertex_colors[:, :3] = (np.random.rand(3) * 255).astype(np.uint8)
    scene.add_geometry(p)

scene.export('./out.glb')

out2.glb is vhacd, 27 piceces, 374 triangles
image

code:

import trimesh
import numpy as np

input_file = './input.obj'
mesh = trimesh.load(input_file, force="mesh")

parts = trimesh.interfaces.vhacd.convex_decomposition(mesh, maxhulls=10)

#print(parts)

#mesh_parts = []
#for vs, fs in parts:
#    mesh_parts.append(trimesh.Trimesh(vs, fs))

scene = trimesh.Scene()
np.random.seed(0)
for p in parts:
    p.visual.vertex_colors[:, :3] = (np.random.rand(3) * 255).astype(np.uint8)
    scene.add_geometry(p)

scene.export('./out2.glb')

source model:
image

files:
test.zip

I feel like the triangles are mainly on the smooth edges. Is there a way to make the edges of the model sharper?

P.S. windows verison seems not work, tested on 2 computers, windows11 anaconda python 3.10.

Remove syntax in the output file

Hi!

I'm using CoACD to preprocess my obj model to get higher resolution and compact collision meshes.

I found the output obj file containing the syntax, like o geometry_1 and o geometry_2, which split the whole mesh into small pieces. When the output obj model is imported into MuJoCo, the above syntax seems to prevent the model from being fully loaded, and all geometric elements after the place where the first syntax appears are not displayed.

Is there any way to remove these syntaxes without changing them manually? Thanks in advance!

When building CoAcd can't link to the standard math library on Macos

Can't link to the standard math library on the mac machine or on the cloud.

https://github.com/fire/CoACD/actions/runs/6448697326/job/17506251288

-- ----------------------------------------------------
-- ----------- Configuring OpenVDBBinaries ------------
-- ----------------------------------------------------
-- Performing Test EIGEN_COMPILER_SUPPORT_CPP11
-- Performing Test EIGEN_COMPILER_SUPPORT_CPP11 - Failed
-- Performing Test COMPILER_SUPPORT_std=cpp03
-- Performing Test COMPILER_SUPPORT_std=cpp03 - Failed
-- Performing Test standard_math_library_linked_to_automatically
-- Performing Test standard_math_library_linked_to_automatically - Failed
-- Performing Test standard_math_library_linked_to_as_m
CMake Error at build/_deps/eigen-src/CMakeLists.txt:108 (message):
-- Performing Test standard_math_library_linked_to_as_m - Failed
  Can't link to the standard math library.  Please report to the Eigen
  developers, telling them about your platform.
-- Configuring incomplete, errors occurred!

relationship between concavity threshold and actual distance

hi, I wanted to use this approximate convex decomposition to implement mesh offsetting, but I think I need the concavity metric to be exactly 2r + small delta where r is the offset distance. It seems that the concavity threshold we give can only be within 0.01 to 1, I wonder how that maps to actual distance?

(I am not familiar with geometry so I am not sure if I understand the metrics correctly)

Problem encounted in generating collision shape

Hello, thanks for your exciting work! When attempting to generate a collision shape, I've run into an error on occasion. Could you possibly provide some assistance with this?

[2023-10-17 20:55:47.905] [CoACD] [info] threshold 0.05
[2023-10-17 20:55:47.905] [CoACD] [info] max # convex hull -1
[2023-10-17 20:55:47.905] [CoACD] [info] preprocess mode auto
[2023-10-17 20:55:47.905] [CoACD] [info] preprocess resolution 50
[2023-10-17 20:55:47.905] [CoACD] [info] pca false
[2023-10-17 20:55:47.905] [CoACD] [info] mcts max depth 3
[2023-10-17 20:55:47.905] [CoACD] [info] mcts nodes 20
[2023-10-17 20:55:47.905] [CoACD] [info] mcts iterations 150
[2023-10-17 20:55:47.905] [CoACD] [info] merge true
[2023-10-17 20:55:47.905] [CoACD] [info] seed 0
[2023-10-17 20:55:47.908] [CoACD] [info] - Manifold Check
[2023-10-17 20:55:48.089] [CoACD] [info] [1/3] Edge check finish
python: /project/src/intersection.h:663: static void threeyd::moeller::TriangleIntersects::isect2(const TemplatedVec&, const TemplatedVec&, const TemplatedVec&, threeyd::moeller::TriangleIntersects::declfloat, threeyd::moeller::TriangleIntersects::declfloat, threeyd::moeller::TriangleIntersects::declfloat, threeyd::moeller::TriangleIntersects::declfloat, threeyd::moeller::TriangleIntersects::declfloat, threeyd::moeller::TriangleIntersects::declfloat, threeyd::moeller::TriangleIntersects::declfloat&, threeyd::moeller::TriangleIntersects::declfloat&, TemplatedVec&, TemplatedVec&) [with TemplatedVec = coacd::IntersectVector3; threeyd::moeller::TriangleIntersects::declfloat = float]: Assertion `d0 != d1' failed.

I believe the issue may stem from my mesh being cut from the complete object. Could you kindly provide some guidance on how to resolve this problem? Thank you!

image
model.obj.zip

Triangle.h is not MIT

So, just as an FYI. This library is labeled as being MIT license. However, it uses 'Triangle.h' which is not at all compliant with an MIT license. So anyone who tries to use this library will have license issues due to that. The code will not work without 'Triangle.h' so really the library as a whole cannot be used in any commercial product or is otherwise not compliant with the strict restrictions found in 'Triangle.h'

How to compiling for windows

This project is amazing. Now i have troubles compiling for windows. I hope you can help me.
The whole process I list here:

  1. git clone https://github.com/SarahWeiii/CoACD.git
  2. cd CoACD
  3. mkdir build
  4. cmake ..
    After those i got the CoACD.sln:
    image
    Then I compiled "main" project,but got some errors:
    image
    Please give me some tips, Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.