Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahWeiii committed Aug 21, 2023
1 parent d264a43 commit 8cc20fc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ int main(int argc, char *argv[])
}
if (strcmp(argv[i], "-k") == 0)
{
sscanf(argv[i + 1], "%lf", &params.rv_k);
sscanf(argv[i + 1], "%le", &params.rv_k);
}
if (strcmp(argv[i], "-t") == 0 || strcmp(argv[i], "--threshold") == 0)
{
sscanf(argv[i + 1], "%lf", &params.threshold);
sscanf(argv[i + 1], "%le", &params.threshold);
}
if (strcmp(argv[i], "-r") == 0 || strcmp(argv[i], "--resolution") == 0)
{
Expand Down Expand Up @@ -80,6 +80,10 @@ int main(int argc, char *argv[])
{
sscanf(argv[i + 1], "%d", &params.mcts_nodes);
}
if (strcmp(argv[i], "-dt") == 0 || strcmp(argv[i], "--dualmc-threshold") == 0)
{
sscanf(argv[i + 1], "%le", &params.dmc_thres);
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace coacd
bool pca;
bool merge;
int max_convex_hull;
double dmc_thres;

/////////////// MCTS Config ///////////////
int mcts_iteration;
Expand All @@ -51,6 +52,7 @@ namespace coacd
prep_resolution = 50;
pca = false;
merge = true;
dmc_thres = 0.55;

mcts_iteration = 150;
mcts_max_depth = 3;
Expand Down
2 changes: 1 addition & 1 deletion src/preprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace coacd
std::vector<Vec3s> newPoints;
std::vector<Vec3I> newTriangles;
std::vector<Vec4I> newQuads;
tools::volumeToMesh(*sgrid, newPoints, newTriangles, newQuads, 0.55);
tools::volumeToMesh(*sgrid, newPoints, newTriangles, newQuads, level_set);

output.Clear();
for (unsigned int i = 0; i < newPoints.size(); ++i)
Expand Down
2 changes: 1 addition & 1 deletion src/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace coacd
{
Model tmp = m;
m.Clear();
SDFManifold(tmp, m, params.prep_resolution);
SDFManifold(tmp, m, params.prep_resolution, params.dmc_thres);
}

void MergeCH(Model &ch1, Model &ch2, Model &ch)
Expand Down

0 comments on commit 8cc20fc

Please sign in to comment.