Allow for more complex placement positioning
This commit is contained in:
@@ -12,6 +12,7 @@ import Geometry.ConvexPoly
|
||||
import Geometry.Data
|
||||
import Padding
|
||||
|
||||
import qualified Data.Set as S
|
||||
import Data.Tree
|
||||
import Data.Sequence hiding (zipWith)
|
||||
import Data.List (delete)
|
||||
@@ -34,8 +35,12 @@ posRms bounds (parent,_) [] st = case st of
|
||||
Node childi ts :<| tseq -> fmap (parent:) <$> posRms bounds childi (zipCount ts) tseq
|
||||
posRms bounds parenti@(parent,_) ( (numChild,t@(Node childi _) ):its) tseq = do
|
||||
printInfoCheckNum parenti numChild childi
|
||||
tryParentLinks $ zipCount $ rmOutLinks parent
|
||||
tryParentLinks outlinks
|
||||
where
|
||||
child = fst childi
|
||||
outlinks = zipCount
|
||||
. Prelude.filter (not . S.null . S.intersection (_rmConnectsTo child) . _rlType)
|
||||
$ _rmLinks parent
|
||||
tryParentLinks [] = putStrLn "no viable link pairs, backtrack" >> return Nothing
|
||||
tryParentLinks ((j,outlnk):ls) = tryChildLinks $ zipCount (rmInLinks $ fst childi)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user