compas-dev / compas-dev/compas

unify_cycles / face_adjaccency

Open
#1,411 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
386
Forks
122
Avg merge
11d 46m
Merged PRs (30d)
1

Description

**Describe the bug**

I have a set of [vertices and faces](https://gist.githubusercontent.com/romanarust/58e5dfea928ecd2207dd21d5b512ba4e/raw/7c0cad520963c2d2fa013e0b9d48285934de23d7/vertices_faces.json) from a correct, closed mesh, but the function `unify_cycles` fails. The reason for this is that when there are more than [100 faces](https://github.com/compas-dev/compas/blob/46b286311ccf0212f65fa202684c978a1d6bf560/src/compas/topology/orientation.py#L122), a different function (`_face_vertices`) is used for face adjacency. However, in my case, this function produces a different, and wrong result than `face_adjacency`, because the parameters of this function aren’t dependent on the input.

How would it be best to proceed: I could propose a fix, but should the parameters be determined based on the input (i.e determine the radius on the longest edge?), or should the user be allowed to select which function to use (`unify_cycles(fast=True)`)? My understanding is that the `_face_adjacency` function was intended to increase performance. Wouldn’t it make sense for this to be user-controlled?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.