Polyline 2D display problem
Posted: Fri Dec 07, 2018 11:28 am
Hello,
When I load a Shape file that contains 2D polylines and that I set the 2DMode to true, CloudCompare cannot zoom to the loaded polylines.
Here what is looks like.
On the left I set the 2DMode to false (loading the 2D polyline as 3D) and it shows properly.
On the right I set the 2DMode to true and the viewer cannot zoom to it so the polylines are there but extremely tiny.
It seems that what is causing the problem is the ccPolyline::getOwnBB which sets the bBox as being invalid.
The validity is set to false because (is2DMode == true) => (!i2DMode == false) and !withGLFeatures == false
Is there something that can be done or should I force loading 2D polylines as 3D ?
When I load a Shape file that contains 2D polylines and that I set the 2DMode to true, CloudCompare cannot zoom to the loaded polylines.
Here what is looks like.
On the left I set the 2DMode to false (loading the 2D polyline as 3D) and it shows properly.
On the right I set the 2DMode to true and the viewer cannot zoom to it so the polylines are there but extremely tiny.
It seems that what is causing the problem is the ccPolyline::getOwnBB which sets the bBox as being invalid.
Code: Select all
ccBBox ccPolyline::getOwnBB(bool withGLFeatures/*=false*/)
{
ccBBox emptyBox;
getBoundingBox(emptyBox.minCorner(), emptyBox.maxCorner());
ccLog::Print(QString("3D: %1 GL: %2").arg(!is2DMode()).arg(!withGLFeatures));
emptyBox.setValidity((!is2DMode() || !withGLFeatures) && size() != 0); //a 2D polyline is considered as a purely 'GL' fature
return emptyBox;
}
Is there something that can be done or should I force loading 2D polylines as 3D ?