TopoSimplifier icon indicating copy to clipboard operation
TopoSimplifier copied to clipboard

Is there anyway to prefer fill over cut

Open yyuezhi opened this issue 1 year ago • 1 comments

Dear authors, Thanks for impressive work. I wonder is there anyway to make the algorithm to majorly prefer fill over cut? I still wish the algorithm to perform both cut and fill, but I wish it to only perform cut when fill operation is too expensive. Is there anyway to modify the geometric cost to achieve this? If so, which part of the code, e.g. which line I should change to adjust the weighting between cut and fill? Thanks in advance.

yyuezhi avatar Aug 19 '24 06:08 yyuezhi

https://github.com/danzeng8/TopoSimplifier/blob/10753151afac5bd35f574f834a029788ecd1e25e/TopoSimplifier/TopoSimplifier.cpp#L11787

The labelling costs of cuts and fills are set here. Cuts are index 2, while fills are index 3. Currently the code prioritizes topological change (eulerSum); if you want the algorithm to prefer fills you can create separate if conditions for cuts and fills, and weight or multiply the costs for fills to your specifications.

danzeng8 avatar Sep 02 '24 22:09 danzeng8