Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify DCEL label management #469

Merged
merged 2 commits into from
Nov 12, 2022
Merged

Commits on Nov 8, 2022

  1. Simplify DCEL label management

    In the DCEL data structure, there are labels on the vertex records,
    (half) edge records, and face records. These labels keep track
    information such as which input geometry the record originates from and
    whether it will appear in the output geometry.
    
    The original approach to labelling was to use the same data structure
    for all record types. The label had two booleans per operand.  The first
    boolean determined whether the record would appear in the final output,
    and the second boolean would show whether the first boolean was
    populated or not. This was essentially tri-state logic. The trouble with
    this approach was that the DCEL algorithm doesn't know whether each
    record should appear in the output geometry right up until the last
    stage. The labels are used in the earlier stages of the algorithm to
    record other facts, such as whether or not the records appear in the
    input geometry. The semantics of the fields subtly change over the
    course of the algorithm, making the code hard to understand and
    maintain.
    
    The new approach (implemented by this PR) changes how label management
    is performed. Instead of having a single labels data structure, the
    fields are slightly different for vertex, edge, and face records. This
    is to account for the differences in information available when
    processing vertexes vs. edges vs. faces. The number of fields is also
    expanded, so that concepts like "is this record explicitly present in
    the input geometry's control points" are separate from concepts like "is
    this record present in the input geometry but not explicitly in its
    control points". The populated fields are also removed, and tracked
    separately in each algorithm that modifies the labels.
    peterstace committed Nov 8, 2022
    Configuration menu
    Copy the full SHA
    45ccc4b View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2022

  1. Configuration menu
    Copy the full SHA
    7f2fcc7 View commit details
    Browse the repository at this point in the history