Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a @check #6

Merged
merged 3 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/workflows/.ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: CI
on:
push:
branches: main
pull_request:
branches: main
on: [push, pull_request]
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
Expand Down
2 changes: 1 addition & 1 deletion src/STLs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ end
function max_num_facets_per_bgcell(stlmodel,bgmodel)
stl = STL(stlmodel)
grid = get_grid(bgmodel)
c_to_stlf =compute_cell_to_facets(grid,stl)
c_to_stlf = compute_cell_to_facets(grid,stl)
maximum(length,c_to_stlf)
end

Expand Down
6 changes: 3 additions & 3 deletions src/SimplexFaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -467,12 +467,12 @@ function voxel_intersection(f::Face{2,3},pmin::Point,pmax::Point,p::Polytope)
end

function voxel_intersection(p::Point,pmin::Point,pmax::Point)
all( Tuple(p) .> Tuple(pmin) ) || return false
all( Tuple(p) .< Tuple(pmax) ) || return false
true
@check all( pmin .≤ pmax ) "pmin > pmax"
all( p .> pmin ) && all( p .< pmax )
end

function voxel_intersection(e::Face{1,D},pmin::Point{D},pmax::Point{D}) where D
@check all( pmin .≤ pmax ) "pmin > pmax"
t_min,t_max = 0.0,1.0
for d in 1:D
p_d = e[1][d]
Expand Down