Skip to content

Commit 5bdafa9

Browse files
Merge pull request #229 from imadhammani/main
XCore intersectMesh: update
2 parents ac620e4 + ab7a5d6 commit 5bdafa9

37 files changed

+822
-1324
lines changed

Cassiopee/XCore/XCore/PyTree.py

+24-1
Original file line numberDiff line numberDiff line change
@@ -587,4 +587,27 @@ def _triangulateSkin(m):
587587
ptlist = I.getNodeFromName(bc, 'PointList')
588588
ptlist[1] = ptlists_out[j]
589589

590-
return None
590+
return None
591+
592+
def writeIm(t, fname):
593+
I._adaptNGon32NGon4(t)
594+
zones = I.getNodesFromType(t, 'Zone_t')
595+
assert(len(zones) == 1)
596+
arr = C.getFields(I.__GridCoordinates__, zones[0], api=3)[0]
597+
xcore.write_im(arr, fname)
598+
return None
599+
600+
def writeBim(t, fname):
601+
I._adaptNGon32NGon4(t)
602+
zones = I.getNodesFromType(t, 'Zone_t')
603+
assert(len(zones) == 1)
604+
arr = C.getFields(I.__GridCoordinates__, zones[0], api=3)[0]
605+
xcore.write_bim(arr, fname)
606+
return None
607+
608+
def writeBimS(t, fname):
609+
zones = I.getNodesFromType(t, 'Zone_t')
610+
assert(len(zones) == 1)
611+
arr = C.getFields(I.__GridCoordinates__, zones[0], api=3)[0]
612+
xcore.write_bim_s(arr, fname)
613+
return None

Cassiopee/XCore/XCore/intersectMesh/AABB.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2013-2024 Onera.
3+
4+
This file is part of Cassiopee.
5+
6+
Cassiopee is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
Cassiopee is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with Cassiopee. If not, see <http://www.gnu.org/licenses/>.
18+
*/
119
#include "AABB.h"
220

321
void AABB_clamp(AABB &box, const AABB &parent)

Cassiopee/XCore/XCore/intersectMesh/AABB.h

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2013-2024 Onera.
3+
4+
This file is part of Cassiopee.
5+
6+
Cassiopee is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
Cassiopee is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with Cassiopee. If not, see <http://www.gnu.org/licenses/>.
18+
*/
119
#pragma once
220

321
#include "xcore.h"

Cassiopee/XCore/XCore/intersectMesh/BVH.h

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2013-2024 Onera.
3+
4+
This file is part of Cassiopee.
5+
6+
Cassiopee is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
Cassiopee is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with Cassiopee. If not, see <http://www.gnu.org/licenses/>.
18+
*/
119
#pragma once
220

321
#include "AABB.h"

Cassiopee/XCore/XCore/intersectMesh/DDA.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2013-2024 Onera.
3+
4+
This file is part of Cassiopee.
5+
6+
Cassiopee is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
Cassiopee is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with Cassiopee. If not, see <http://www.gnu.org/licenses/>.
18+
*/
119
#include "mesh.h"
220
#include "primitives.h"
321

Cassiopee/XCore/XCore/intersectMesh/IntersectMesh_Exit.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2013-2024 Onera.
3+
4+
This file is part of Cassiopee.
5+
6+
Cassiopee is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
Cassiopee is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with Cassiopee. If not, see <http://www.gnu.org/licenses/>.
18+
*/
119
#include "mesh.h"
220

321
PyObject *K_XCORE::IntersectMesh_Exit(PyObject *self, PyObject *args)

Cassiopee/XCore/XCore/intersectMesh/IntersectMesh_ExtractFaceSet.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2013-2024 Onera.
3+
4+
This file is part of Cassiopee.
5+
6+
Cassiopee is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
Cassiopee is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with Cassiopee. If not, see <http://www.gnu.org/licenses/>.
18+
*/
119
#include "mesh.h"
220

321
PyObject *K_XCORE::IntersectMesh_ExtractFaceSet(PyObject *self, PyObject *args)

Cassiopee/XCore/XCore/intersectMesh/IntersectMesh_ExtractMesh.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
Copyright 2013-2024 Onera.
3+
4+
This file is part of Cassiopee.
5+
6+
Cassiopee is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
Cassiopee is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with Cassiopee. If not, see <http://www.gnu.org/licenses/>.
18+
*/
119
#include "mesh.h"
220

321
PyObject *K_XCORE::IntersectMesh_ExtractMesh(PyObject *self, PyObject *args)

Cassiopee/XCore/XCore/intersectMesh/IntersectMesh_Init.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919
#include "mesh.h"
2020
#include "common/Karray.h"
21-
//#include "BVH.h"
2221

2322
PyObject *K_XCORE::IntersectMesh_Init(PyObject *self, PyObject *args)
2423
{
@@ -40,13 +39,6 @@ PyObject *K_XCORE::IntersectMesh_Init(PyObject *self, PyObject *args)
4039
// Init mesh
4140

4241
IMesh *M = new IMesh(karray);
43-
/*
44-
M->make_skin();
45-
puts("Making BVH");
46-
BVH bvh(*M);
47-
puts("Done");
48-
bvh.arena.drop();
49-
*/
5042

5143
if (TAGS != Py_None) {
5244
E_Int size, nfld;

0 commit comments

Comments
 (0)