FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
MeshLib/test_python/test_boolean.py at master · MeshInspector/MeshLib · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
MeshInspector
/
MeshLib
Public
Notifications
You must be signed in to change notification settings
Fork
111
Star
811
Code
Issues
43
Pull requests
18
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
MeshLib
/
test_python
/
test_boolean.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
36 lines (25 loc) · 1003 Bytes
Breadcrumbs
MeshLib
/
test_python
/
test_boolean.py
Copy path
File metadata and controls
36 lines (25 loc) · 1003 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import
pytest
from
helper
import
*
def
test_boolean
():
torusIntersected
=
mrmesh
.
makeTorusWithSelfIntersections
(
2
,
1
,
10
,
10
,
None
)
mrmesh
.
fixSelfIntersections
(
torusIntersected
,
0.1
)
torus
=
mrmesh
.
makeTorus
(
2
,
1
,
10
,
10
,
None
)
transVector
=
mrmesh
.
Vector3f
()
transVector
.
x
=
0.5
transVector
.
y
=
1
transVector
.
z
=
1
diffXf
=
mrmesh
.
AffineXf3f
.
translation
(
transVector
)
torus2
=
mrmesh
.
makeTorus
(
2
,
1
,
10
,
10
,
None
)
torus2
.
transform
(
diffXf
)
p
=
torus
.
points
.
vec
.
size
()
torusS
=
mrmesh
.
voxelBooleanSubtract
(
torus
,
torus2
,
0.05
)
p_sub
=
torusS
.
points
.
vec
.
size
()
torusU
=
mrmesh
.
voxelBooleanUnite
(
torus
,
torus2
,
0.05
)
p_union
=
torusU
.
points
.
vec
.
size
()
torusI
=
mrmesh
.
voxelBooleanIntersect
(
torus
,
torus2
,
0.05
)
p_intersect
=
torusI
.
points
.
vec
.
size
()
assert
p
==
100
assert
p_sub
==
43132
assert
p_union
==
63114
\
or
p_union
==
63112
# on some macOS Arm runners in Debug mode
assert
p_intersect
==
23006
Back
|
FazBrowse Home
|
New Git URL