Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
eac2b0d7
Commit
eac2b0d7
authored
13 years ago
by
Owen Arnold
Browse files
Options
Downloads
Patches
Plain Diff
Refs #3444. Fix coordinate -> hexahedron mapping.
parent
c92d366f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/Vates/VatesAPI/src/vtkMDEWHexahedronFactory.cpp
+18
-3
18 additions, 3 deletions
Code/Mantid/Vates/VatesAPI/src/vtkMDEWHexahedronFactory.cpp
with
18 additions
and
3 deletions
Code/Mantid/Vates/VatesAPI/src/vtkMDEWHexahedronFactory.cpp
+
18
−
3
View file @
eac2b0d7
...
@@ -61,7 +61,7 @@ namespace Mantid
...
@@ -61,7 +61,7 @@ namespace Mantid
std
::
vector
<
Mantid
::
Geometry
::
Coordinate
>
coords
;
std
::
vector
<
Mantid
::
Geometry
::
Coordinate
>
coords
;
Mantid
::
signal_t
signal_normalized
;
Mantid
::
signal_t
signal_normalized
;
vtkIdType
pointId
;
vtkIdType
pointId
s
[
8
]
;
while
(
true
)
while
(
true
)
{
{
box
=
it
.
getBox
();
box
=
it
.
getBox
();
...
@@ -81,10 +81,25 @@ namespace Mantid
...
@@ -81,10 +81,25 @@ namespace Mantid
{
{
Mantid
::
Geometry
::
Coordinate
&
coord
=
coords
[
i
];
Mantid
::
Geometry
::
Coordinate
&
coord
=
coords
[
i
];
//Add points
//Add points
pointId
=
points
->
InsertNextPoint
(
coord
.
getX
(),
coord
.
getY
(),
coord
.
getZ
());
pointIds
[
i
]
=
points
->
InsertNextPoint
(
coord
.
getX
(),
coord
.
getY
(),
coord
.
getZ
());
theHex
->
GetPointIds
()
->
SetId
(
i
,
pointId
);
}
}
/*
VTK needs cell points to be specified in a particular anti-clockwise ordering.
The coordinates gernated by IBox do not fit this format, so have to manually reorder them before setting the
hexahedron vertexes.
*/
theHex
->
GetPointIds
()
->
SetId
(
0
,
pointIds
[
0
]);
//xyx
theHex
->
GetPointIds
()
->
SetId
(
1
,
pointIds
[
1
]);
//dxyz
theHex
->
GetPointIds
()
->
SetId
(
2
,
pointIds
[
3
]);
//dxdyz
theHex
->
GetPointIds
()
->
SetId
(
3
,
pointIds
[
2
]);
//xdyz
theHex
->
GetPointIds
()
->
SetId
(
4
,
pointIds
[
4
]);
//xydz
theHex
->
GetPointIds
()
->
SetId
(
5
,
pointIds
[
5
]);
//dxydz
theHex
->
GetPointIds
()
->
SetId
(
6
,
pointIds
[
7
]);
//dxdydz
theHex
->
GetPointIds
()
->
SetId
(
7
,
pointIds
[
6
]);
//xdydz
//Add cells
//Add cells
visualDataSet
->
InsertNextCell
(
VTK_HEXAHEDRON
,
theHex
->
GetPointIds
());
visualDataSet
->
InsertNextCell
(
VTK_HEXAHEDRON
,
theHex
->
GetPointIds
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment