@@ -173,8 +173,8 @@ function fill_cpp_data_raw(phi,partition,xmin,xmax,degree,::Val{3})
173173 coords
174174end
175175
176- fill_cpp_data (phi:: AlgoimCallLevelSetFunction ,partition:: D ,xmin:: V ,xmax:: V ,degree:: Int = 2 ,limitstol:: Float64 = 1.0e-8 ) where {D,V} =
177- fill_cpp_data (phi,partition,xmin,xmax,degree,limitstol,Val {length(xmin)} ())
176+ fill_cpp_data (phi:: AlgoimCallLevelSetFunction ,partition:: D ,xmin:: V ,xmax:: V ,degree:: Int = 2 ,trim :: Bool = false , limitstol:: Float64 = 1.0e-8 ) where {D,V} =
177+ fill_cpp_data (phi,partition,xmin,xmax,degree,trim, limitstol,Val {length(xmin)} ())
178178
179179function trim_to_limits! (coords:: Matrix{T} ,xmin,xmax,limitstol) where {T<: Number }
180180 map (eachcol (coords)) do cd
@@ -188,19 +188,19 @@ function trim_to_limits!(coords::Matrix{T},xmin,xmax,limitstol) where {T<:Number
188188 end
189189end
190190
191- function fill_cpp_data (phi,partition,xmin,xmax,degree,limitstol,:: Val{2} )
191+ function fill_cpp_data (phi,partition,xmin,xmax,degree,trim, limitstol,:: Val{2} )
192192 coords = fill_cpp_data_raw (phi,partition,xmin,xmax,degree,Val {2} ())
193193 np = (partition[1 ]+ 1 )* (partition[2 ]+ 1 )
194194 coords = reshape (coords,(2 ,np))
195- trim_to_limits! (coords,xmin,xmax,limitstol)
195+ trim && trim_to_limits! (coords,xmin,xmax,limitstol)
196196 typeof (xmin)[eachcol (coords)... ]
197197end
198198
199- function fill_cpp_data (phi,partition,xmin,xmax,degree,limitstol,:: Val{3} )
199+ function fill_cpp_data (phi,partition,xmin,xmax,degree,trim, limitstol,:: Val{3} )
200200 coords = fill_cpp_data_raw (phi,partition,xmin,xmax,degree,Val {3} ())
201201 np = (partition[1 ]+ 1 )* (partition[2 ]+ 1 )* (partition[3 ]+ 1 )
202202 coords = reshape (coords,(3 ,np))
203- trim_to_limits! (coords,xmin,xmax,limitstol)
203+ trim && trim_to_limits! (coords,xmin,xmax,limitstol)
204204 typeof (xmin)[eachcol (coords)... ]
205205end
206206
0 commit comments