Skip to content

Commit 4e2373a

Browse files
committed
added curves fuse test on step model S39 that exhibits the composite curve issue.
It requires the env variable MAGIX3D_TEST_DATA_DIR to be set
1 parent 176663c commit 4e2373a

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

test_link/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ enable_testing()
77
find_program(PYTEST_LOCATION pytest)
88
message("PYTEST_LOCATION= ${PYTEST_LOCATION}")
99
message("ENVIRONMENT PYTHONPATH ${PYTHONPATH}")
10+
message("ENVIRONMENT MAGIX3D_TEST_DATA_DIR ${MAGIX3D_TEST_DATA_DIR}")
1011
#message("ENVIRONMENT PYTHONPATH ${CMAKE_PREFIX_PATH}/lib/python3.10/site-packages:$PYTHONPATH")
1112

1213
add_test(NAME test_link

test_link/test_curves_fuse.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import os
2+
import pyMagix3D as Mgx3D
3+
4+
step_file_name = "mambo/Simple/S39.step"
5+
6+
def test_curves_fuse_s45():
7+
ctx = Mgx3D.getStdContext()
8+
ctx.clearSession() # Clean the session after the previous test
9+
gm = ctx.getGeomManager ()
10+
tm = ctx.getTopoManager ()
11+
12+
magix3d_test_data_dir = os.environ['MAGIX3D_TEST_DATA_DIR']
13+
full_path = os.path.join(magix3d_test_data_dir, step_file_name)
14+
15+
ctx.setLengthUnit(Mgx3D.Unit.meter)
16+
gm.importSTEP(full_path)
17+
assert gm.getNbVolumes()==1
18+
19+
gm.joinSurfaces(["Surf0000","Surf0006"])
20+
gm.joinCurves (["Crb0000","Crb0001","Crb0023"])
21+
gm.joinCurves (["Crb0022","Crb0003"])
22+
tm.newFreeBoundedTopoInGroup ("aaa", 3, ["Crb0047","Crb0048"])
23+
tm.setGeomAssociation (["Som0003","Som0007"], "Crb0047", True)
24+
tm.setGeomAssociation (["Ar0011"], "Crb0047", True)
25+
26+
# This command fails with
27+
# [Erreur interne] La courbe Crb0047 est une courbe composée ce qui ne permet pas de trouver les points en fonction d'une paramétrisation
28+
#ctx.getMeshManager().newAllBlocksMesh()

0 commit comments

Comments
 (0)