Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK-CGAL
VESPA
Commits
3dc496ee
Commit
3dc496ee
authored
May 02, 2022
by
Charles Gueunet
🎸
Browse files
Fix for testing and orientation
parent
26ab5581
Pipeline
#279297
passed with stages
in 15 minutes and 1 second
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
vespa/Delaunay/Testing/execute_Delaunay.py
View file @
3dc496ee
from
vtk
import
vtk
Spher
eSource
,
vtkShrinkPolyData
from
vtk
import
vtk
Plan
eSource
,
vtkShrinkPolyData
from
vespa
import
vtkCGALDelaunay
sp
=
vtkSphereSource
()
ps
=
vtkPlaneSource
()
ps
.
SetXResolution
(
5
)
ps
.
SetYResolution
(
5
)
pd
=
vtkShrinkPolyData
()
pd
.
SetInputConnection
(
s
p
.
GetOutputPort
())
pd
.
SetInputConnection
(
p
s
.
GetOutputPort
())
d2
=
vtkCGALDelaunay
.
vtkCGALDelaunay2
()
d2
.
SetInputConnection
(
pd
.
GetOutputPort
())
...
...
vespa/Delaunay/vtkCGALDelaunay2.cxx
View file @
3dc496ee
...
...
@@ -55,14 +55,14 @@ int vtkCGALDelaunay2::RequestData(
{
vtkErrorMacro
(
"This dataset is 3D"
);
}
int
d1
=
0
,
d2
=
1
,
d3
=
2
;
//
z
null
if
(
!
rangeVal
[
0
])
int
d1
=
0
,
d2
=
1
,
d3
=
2
;
//
assume z is
null
if
(
!
rangeVal
[
0
])
// x is null
{
d1
=
2
;
d2
=
0
;
d3
=
1
;
d1
=
1
;
d2
=
2
;
d3
=
0
;
}
if
(
!
rangeVal
[
1
])
if
(
!
rangeVal
[
1
])
// y is null
{
d1
=
0
;
d2
=
2
;
...
...
@@ -88,7 +88,7 @@ int vtkCGALDelaunay2::RequestData(
// each poly
for
(
polysIt
->
GoToFirstCell
();
!
polysIt
->
IsDoneWithTraversal
();
polysIt
->
GoToNextCell
())
{
vtkIdList
*
p
=
polysIt
->
GetCurrentCell
();
vtkIdList
*
p
=
polysIt
->
GetCurrentCell
();
std
::
list
<
CDT2
::
Point
>
poly
;
// each segment of poly
for
(
vtkIdType
i
=
0
;
i
<
p
->
GetNumberOfIds
();
i
++
)
...
...
@@ -106,13 +106,13 @@ int vtkCGALDelaunay2::RequestData(
for
(
linesIt
->
GoToFirstCell
();
!
linesIt
->
IsDoneWithTraversal
();
linesIt
->
GoToNextCell
())
{
// each segment of line
vtkIdList
*
l
=
linesIt
->
GetCurrentCell
();
vtkIdList
*
l
=
linesIt
->
GetCurrentCell
();
std
::
list
<
CDT2
::
Point
>
line
;
for
(
vtkIdType
i
=
1
;
i
<
l
->
GetNumberOfIds
();
i
++
)
{
if
(
!
std
::
get
<
1
>
(
pts
[
l
->
GetId
(
i
)]))
{
std
::
cerr
<<
"in
valid
line: "
<<
l
->
GetId
(
i
)
<<
std
::
endl
;
std
::
cerr
<<
"in
tersecting
line: "
<<
l
->
GetId
(
i
)
<<
std
::
endl
;
continue
;
}
auto
point
=
std
::
get
<
0
>
(
pts
[
l
->
GetId
(
i
)]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment