Skip to content

Commit

Permalink
[Examples] Fix picking example for Aardvark debug assemblies
Browse files Browse the repository at this point in the history
Resulted in failed assertions due to NaN values.
  • Loading branch information
hyazinthh committed Sep 2, 2024
1 parent 7f6d5c7 commit 636afe5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Examples (netcore)/35 - Picking/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,14 @@ let main argv =
Sg.cylinder' 32 C4b.Red 0.01 1.0
|> Sg.trafo (
line |> AVal.map (fun line ->
let dir = line.P1 - line.P0
let len = Vec.length dir
Trafo3d.Scale(1.0, 1.0, len) *
Trafo3d.RotateInto(V3d.OOI, dir / len) *
Trafo3d.Translation(line.P0)
if line = Line3d() then
Trafo3d.Identity
else
let dir = line.P1 - line.P0
let len = Vec.length dir
Trafo3d.Scale(1.0, 1.0, len) *
Trafo3d.RotateInto(V3d.OOI, dir / len) *
Trafo3d.Translation(line.P0)
)
)
//Sg.lines ~~C4b.Red (line |> AVal.map Array.singleton)
Expand Down

0 comments on commit 636afe5

Please sign in to comment.