BRepSurface Coordinate System

BRepSurface Coordinate System

capuanbm
Explorer Explorer
506 Views
1 Reply
Message 1 of 2

BRepSurface Coordinate System

capuanbm
Explorer
Explorer

Hi all,

 

I'm working on a program and i'm trying to get the surface normals for a set of points. I know the points have a Z range of 80mm  - 116mm. When I do a bounding box on on my selected faces, i get the following range:

Min/Max   X Y Z

min-1.84881-1.207747.49332
max0.3743360.16694412.0113

 

Here's my code:

 

 

std::vector<Ptr<BRepFace>> faces;
faces.push_back(ui->selectEntity("Select face", "SolidFaces")->entity());
faces.push_back(ui->selectEntity("Select face", "SolidFaces")->entity());

std::ofstream boudingBox("D:\\temp\\boundingbox.txt");
for (int k = 0; k < 2; k++)
{
	boudingBox << faces[k]->boundingBox()->minPoint()->x() << "," << faces[k]->boundingBox()->minPoint()->y() << "," << faces[k]->boundingBox()->minPoint()->z() << std::endl;
	boudingBox << faces[k]->boundingBox()->maxPoint()->x() << "," << faces[k]->boundingBox()->maxPoint()->y() << "," << faces[k]->boundingBox()->maxPoint()->z() << std::endl;

}
boudingBox.flush();
boudingBox.close();

 

 

 

I must be missing something, like how do i get the wcs for the face, so that i can change my input points to the correct wcs

 

note:

i'm using WCS (work coordinate system) as an abbreviation for the coordinate system of the face.

 

Thanks in advance for any help.

 

-Ben

0 Likes
Accepted solutions (1)
507 Views
1 Reply
Reply (1)
Message 2 of 2

capuanbm
Explorer
Explorer
Accepted solution

Figured it out, the api units are CM, i need to divide the coordinates of my points by 10...

0 Likes