diff Framework/Toolbox/Slice.cpp @ 101:af312ce4fe59 wasm

support of 3D swapping of the normal
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 31 May 2017 10:35:20 +0200
parents f244018a4e4b
children fcec0ab44054
line wrap: on
line diff
--- a/Framework/Toolbox/Slice.cpp	Tue May 30 22:22:04 2017 +0200
+++ b/Framework/Toolbox/Slice.cpp	Wed May 31 10:35:20 2017 +0200
@@ -178,8 +178,11 @@
     {
       throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
     }
-        
-    return (GeometryToolbox::IsParallel(GetGeometry().GetNormal(), plane.GetNormal()) &&
+
+    bool opposite;
+    return (GeometryToolbox::IsParallelOrOpposite(opposite,
+                                                  GetGeometry().GetNormal(),
+                                                  plane.GetNormal()) &&
             GeometryToolbox::IsNear(GetGeometry().ProjectAlongNormal(GetGeometry().GetOrigin()),
                                     GetGeometry().ProjectAlongNormal(plane.GetOrigin()),
                                     thickness_ / 2.0));