RasmusRPaulsen/Deep-MVLM

failed detect due to orthogonal projection paramter

2226415223 opened this issue · 1 comments

image
I found my test obj model is vary small in offscreen rendering image, and you hardcode the SetParallelScale(150),so can I modify this magic number to adjust my model size.
image

Hello,
I solved this issue by adjusting the model size to the whole window and consequent model centering.
Centering ensures that the model fits always into the exported image.

xmin = trans.GetOutput().GetBounds()[0]
xmax = trans.GetOutput().GetBounds()[1]
ymin = trans.GetOutput().GetBounds()[2]
ymax = trans.GetOutput().GetBounds()[3]
zmin = trans.GetOutput().GetBounds()[4]
zmax = trans.GetOutput().GetBounds()[5]
xlen = xmax - xmin
ylen = ymax - ymin

cx = trans.GetOutput().GetCenter()[0]
cy = trans.GetOutput().GetCenter()[1]