Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.20774 | 7.49332 |
max | 0.374336 | 0.166944 | 12.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
Solved! Go to Solution.