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:
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.
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:objectsDependingOnPointis implementedobjectsDependingOnAxisis implementedobjectsDependingOnCircleis implementedobjectsDependingOnCurveis implementedobjectsDependingOnDetailis implementedNote, 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 modulePattern.It might be worth thinking about whether the signatures of the collecting functions, e.g.
collectObjectsDependingOnPointcan be changed toWhere the first
Objectsare the already checked objects and the second ones are the collected depending objects.