I have an stl file of an interior passage cut into a cube that I'm importing into basilisk and am trying to set the origin at the center of the cube rather than a vertex. When I try:
X0 = Y0 = -0.5*L0;
Z0 = -0.5*L0;
It gives me a segmentation fault error. However, when I modify it like this
X0 = Y0 = -0.5*L0;
Z0 = -0.49999999*L0;
It works just fine, but with a tiny offset in the z direction.
I've confirmed in meshlab that the cube has equal sides and the origin is in the center. Is there a better way to load the stl file so this doesn't happen and the origin is automatically in the center? Alternatively I could load an stl file with the origin in the corner and shift the coordinates instead but I dont see how to do that.
I've mostly been working on what's in the distance.c example.