Skip to content

Reply To: STL File position shifting

#7745
IboralalpI
Participant

I am testing it on the examples/laminar/cylinder3d example. So, the base unit of the cylinder3d.stl is set to 0.001. The same error is still there even if I increase the resolution so that the dx is smaller than 0.001.

After I use the IndicatorTranslate3D<T>, I use the getMin() and getMax() functions in order to check if the Translation worked properly. The print-out of those are both [0,0,0] causing it to give a 0 length error.

Here it is:
-> STLreader<T> stlReader(“cylinder3d.stl”, converter.getConversionFactorLength(), 0.001);
IndicatorLater3D<T> stlReaderShifted(shift, stlReader);

clout << “stlReaderMin: ” << stlReader.getMin() << std::endl;
clout << “stlReaderMax: ” << stlReader.getMax() << std::endl;
clout << “stlReaderShiftedMin: ” << stlReaderShifted.getMin() << std::endl;
clout << “stlReaderShiftedMax: ” << stlReaderShifted.getMax() << std::endl;

Console:

[0.00025 0.00025 0.00025]
[2.49925 0.40925 0.40925]
[0 0 0]
[0 0 0]