Skip to content

Commit a21af9f

Browse files
committed
offset_surface accidentally using int instead of double
1 parent 3c3a6ea commit a21af9f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/offset_surface.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Parameters
1717
F #F by 3 list of mesh triangle indices into V
1818
isolevel iso level to extract (signed distance: negative inside)
1919
s number of grid cells along longest side (controls resolution)
20-
signed_distance_type type of signing to use one of SIGNED_DISTANCE_TYPE_PSEUDONORMAL, SIGNED_DISTANCE_TYPE_WINDING_NUMBER, SIGNED_DISTANCE_TYPE_DEFAULT, SIGNED_DISTANCE_TYPE_UNSIGNED
20+
signed_distance_type type of signing to use one of SIGNED_DISTANCE_TYPE_PSEUDONORMAL, SIGNED_DISTANCE_TYPE_WINDING_NUMBER, SIGNED_DISTANCE_TYPE_DEFAULT, SIGNED_DISTANCE_TYPE_UNSIGNED, SIGNED_DISTANCE_TYPE_FAST_WINDING_NUMBER
2121
2222
Returns
2323
-------
@@ -44,20 +44,21 @@ npe_doc(ds_offset_surface)
4444

4545
npe_arg(v, dense_float, dense_double)
4646
npe_arg(f, dense_int, dense_long, dense_longlong)
47-
npe_arg(isolevel, int)
47+
npe_arg(isolevel, double)
4848
npe_arg(s, int)
4949
npe_arg(signed_distance_type, int)
5050
npe_begin_code()
5151
assert_valid_3d_tri_mesh(v, f);
5252

53+
// Alec: I don't understand why all these copies are needed here.
5354
Eigen::MatrixXd v_copy = v.template cast<double>();
5455
Eigen::MatrixXi f_copy = f.template cast<int>();
5556

5657
Eigen::MatrixXd sv_copy;
5758
Eigen::MatrixXi sf_copy;
5859
Eigen::MatrixXd gv_copy;
5960
Eigen::MatrixXi side_copy;
60-
Eigen::MatrixXi so_copy;
61+
Eigen::MatrixXd so_copy;
6162

6263
igl::offset_surface(v_copy, f_copy, isolevel, s, igl::SignedDistanceType(signed_distance_type), sv_copy, sf_copy, gv_copy, side_copy, so_copy);
6364

0 commit comments

Comments
 (0)