Skip to content

Commit

Permalink
reorient final model
Browse files Browse the repository at this point in the history
  • Loading branch information
LiangliangNan committed Oct 13, 2023
1 parent 9c2f18b commit 3699047
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions code/PolyFit/paint_canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,18 +699,18 @@ void PaintCanvas::optimization() {
main_window_->disableActions(true);
Map* mesh = Geom::duplicate(hypothesis_mesh_);

const HypothesisGenerator::Adjacency& adjacency = hypothesis_->extract_adjacency(mesh);
HypothesisGenerator::Adjacency adjacency = hypothesis_->extract_adjacency(mesh);
FaceSelection selector(point_set_, mesh);
selector.optimize(adjacency, main_window_->active_solver());

#if 0 // not stable!!!
{ // to have consistent orientation for the final model
const HypothesisGenerator::Adjacency& adjacency = hypothesis_->extract_adjacency(mesh);
selector.re_orient(adjacency, main_window_->active_solver());
}

{ // stitching
const HypothesisGenerator::Adjacency& adjacency = hypothesis_->extract_adjacency(mesh);
// to have consistent orientation for the final model
adjacency = hypothesis_->extract_adjacency(mesh);
selector.re_orient(adjacency, main_window_->active_solver());

#if 0 // not stable!!!
{ // to stitch the coincident edges and related vertices
const HypothesisGenerator::Adjacency& adjacency = hypothesis_->extract_adjacency(mesh);
MapEditor editor(mesh);
for (auto pair : adjacency) {
if (pair.size() != 2) {
Expand Down

0 comments on commit 3699047

Please sign in to comment.