Skip to content

Pattern.objectsDependingOn... functions are implemented #1

@kirchner

Description

@kirchner

When deleting objects, we need to check which other objects depend on the one to be deleted. There already is a (partially implemented) function objectsDependingOnPoint : Pattern -> A Point -> Objects. The goal is to complete all cases in this function and implement the other ones:

  • objectsDependingOnPoint is implemented
  • objectsDependingOnAxis is implemented
  • objectsDependingOnCircle is implemented
  • objectsDependingOnCurve is implemented
  • objectsDependingOnDetail is implemented

Note, that also in expressions, there can be dependencies on other objects, for example via things like "distance(PointA, PointB)". All functions (with trivial implementation) can be found in the module Pattern.

It might be worth thinking about whether the signatures of the collecting functions, e.g. collectObjectsDependingOnPoint can be changed to

collectObjectsDependingOnPoint : PatternData -> String -> Chains -> A Point -> State Objects Objects

type alias Objects =
  { points : Set String
  , axes : Set String
  ...
  }

Where the first Objects are the already checked objects and the second ones are the collected depending objects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions