File tree Expand file tree Collapse file tree 2 files changed +44
-2
lines changed
Aardvark.Geometry.Quadtree Expand file tree Collapse file tree 2 files changed +44
-2
lines changed Original file line number Diff line number Diff line change @@ -680,7 +680,9 @@ module Sample =
680
680
let gs = positions |> Array.groupBy getQuadrant
681
681
for ( qi, ps) in gs do
682
682
if ps.Length > 0 then
683
- yield ! PositionsWithBounds config ps ( Box2d( ps)) ( n.SubNodes.[ qi])
683
+ match n.SubNodes.[ qi] with
684
+ | NoNode -> ()
685
+ | subnode -> yield ! PositionsWithBounds config ps ( Box2d( ps)) subnode
684
686
685
687
| LinkedNode n -> yield ! PositionsWithBounds config positions positionsBounds n.Target
686
688
Original file line number Diff line number Diff line change @@ -1575,10 +1575,50 @@ let cp_20240821_query_quadtreetest () =
1575
1575
1576
1576
()
1577
1577
1578
+ let bug_20241210 () =
1579
+
1580
+ let path = @" W:\Datasets\Vgm\Data\2024-12-10_bugreport\quadtree" ;
1581
+
1582
+ printfn " path = %s " path
1583
+
1584
+ let options = SerializationOptions.NewInMemoryStore( verbose = false )
1585
+
1586
+ let idFile = Guid( File.ReadAllText( @" W:\Datasets\Vgm\Data\2024-12-10_bugreport\quadtree\builder.20241211102935.638695097756085960.key.txt" ))
1587
+ let builderReloadedFile = Builder.Import( path, idFile)
1588
+ match builderReloadedFile with
1589
+ | None -> printfn " reloaded from file = None"
1590
+ | Some x ->
1591
+ printfn " reloaded from file, %d patches" ( x.GetPatches() |> Seq.length)
1592
+
1593
+ let sw = Stopwatch.StartNew()
1594
+ let buildConfig = { BuildConfig.Default with Verbose = false ; SplitLimitPowerOfTwo = 8 }
1595
+ let maybeQuadtree = x.Build2 buildConfig
1596
+ sw.Stop()
1597
+ printfn " [TIMING] build: %A " sw.Elapsed
1598
+
1599
+ match maybeQuadtree with
1600
+ | None -> failwith " build failed"
1601
+ | Some qtree ->
1602
+
1603
+ let maybeResult = qtree |> Sample.Position Query.Config.Default ( V2d( 72461.87 , 266019.70 ))
1604
+
1605
+ match maybeResult with
1606
+ | None -> failwith " query failed"
1607
+ | Some result ->
1608
+
1609
+ printfn " %A " result
1610
+
1611
+ ()
1612
+
1613
+
1614
+ ()
1615
+
1578
1616
[<EntryPoint>]
1579
1617
let main argv =
1580
1618
1581
- cp_ 20240821_ query_ quadtreetest ()
1619
+ bug_ 20241210 ()
1620
+
1621
+ //cp_20240821_query_quadtreetest ()
1582
1622
1583
1623
//cp_20240311_quadtree_exception ()
1584
1624
You can’t perform that action at this time.
0 commit comments