Clean SoDatumLabel.cpp (#23217)

* Clean SoDatumLabel.cpp

removed unused variables

* Update SoDatumLabel.cpp
This commit is contained in:
mosfet80
2025-08-25 06:00:29 +02:00
committed by GitHub
parent b4974a6c32
commit fbfe3a59bf

View File

@@ -317,21 +317,6 @@ private:
std::vector<SbVec3f> computeRadiusDiameterBBox() const
{
SbVec2s imgsize;
int nc {};
int srcw = 1;
int srch = 1;
const unsigned char * dataptr = label->image.getValue(imgsize, nc);
if (dataptr) {
srcw = imgsize[0];
srch = imgsize[1];
}
float aspectRatio = (float) srcw / (float) srch;
float imgHeight = scale * (float) (srch);
float imgWidth = aspectRatio * imgHeight;
// get the points stored in the pnt field
const SbVec3f *points = label->pnts.getValues(0);
if (label->pnts.getNum() < 2) {
@@ -342,7 +327,6 @@ private:
SoDatumLabel::DiameterGeometry geom = label->calculateDiameterGeometry(points);
std::vector<SbVec3f> corners;
float margin = imgHeight / 4.0F;
// include main points and line segment points around text
corners.push_back(geom.p1);