Skip to content

Commit b7a85e8

Browse files
Merge pull request #149 from LIHPC-Computational-Geometry/issue_220_block_boundingbox
Issue 220 block boundingbox
2 parents a709222 + 4f2585f commit b7a85e8

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/Core/Internal/EntitiesHelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ double EntitiesHelper::angle(const Utils::Entity* cec, const Utils::Entity* ce1,
646646
bool EntitiesHelper::getBounds (const std::vector<Utils::Entity*>& entities, double bounds [6])
647647
{
648648
bounds [0] = bounds [2] = bounds [4] = std::numeric_limits<double>::max();
649-
bounds [1] = bounds [3] = bounds [5] = std::numeric_limits<double>::min();
649+
bounds [1] = bounds [3] = bounds [5] = std::numeric_limits<double>::lowest();
650650
if (true == entities.empty ( ))
651651
return false;
652652

test_link/test_free_bounded_topo.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import pyMagix3D as Mgx3D
2+
import pytest
3+
4+
def test_freeboundedtopo():
5+
ctx = Mgx3D.getStdContext()
6+
ctx.clearSession() # Clean the session after the previous test
7+
gm = ctx.getGeomManager ()
8+
tm = ctx.getTopoManager ()
9+
10+
gm.newVertex(Mgx3D.Point(-1.8, -.7, 1.2))
11+
gm.newVertex(Mgx3D.Point(-.7, .45, -.1))
12+
tm.newFreeBoundedTopoInGroup ("aaa", 3, ["Pt0000","Pt0001"])
13+
c = tm.getCoord("Som0007")
14+
assert c.getX() == -0.6999999
15+
assert c.getY() == 0.4500001
16+
assert c.getZ() == 1.2000001

0 commit comments

Comments
 (0)