[Done] Center of Bbox

To post any request/idea for new functionalities
Post Reply
maximeseguin
Posts: 7
Joined: Thu Apr 28, 2011 4:05 pm
Location: Nimes, France

[Done] Center of Bbox

Post by maximeseguin »

I've had this code in : "ccPropertiesTreeDelegate.cpp", at the end of : "void ccPropertiesTreeDelegate::fillWithHObject(ccHObject* _obj)"

Code: Select all

    model->setRowCount(++curRow+1);
    item = new QStandardItem("Box Center");
    item->setFlags(Qt::ItemIsEnabled);
    model->setItem(curRow,0,item);

    CCVector3 bboxCenter = box.getCenter();
    item = new QStandardItem(QString("(%1; %2; %3)").arg(bbosCenter.x,0,'f',3).arg(bbosCenter.y,0,'f',3).arg(bbosCenter.z,0,'f',3));
    item->setFlags(Qt::ItemIsEnabled);
    model->setItem(curRow,1,item);
The aim is to show on the Properties, the center of the bounding box.

Is it possible to add this functionality to the next release of CloudCompare?

--
Maxime SEGUIN
Ecole Nationale des Sciences Géographiques
--
Maxime SEGUIN
Inrap
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Center of Bbox

Post by daniel »

Yeah, no problem. It's already in the trunk version. It will appear in the next release.

I just had to strip the ",0,'f',3" arguments of the QString 'arg' methods, as it depends too much on your cloud dimensions/units. I prefer let QString choose automatically (it does this well generally).

Anyway thanks for the contribution!
Daniel, CloudCompare admin
maximeseguin
Posts: 7
Joined: Thu Apr 28, 2011 4:05 pm
Location: Nimes, France

Re: Center of Bbox

Post by maximeseguin »

Ok, but I'm working with Lambert coordinates and I need millimeter precision...
So, is it possible to show the coordinates of the center of the bounding box with three digits? (Perhaps show this information in the console?)

--
Maxime SEGUIN
École Nationale des Sciences Géographiques
--
Maxime SEGUIN
Inrap
Post Reply