Created
February 16, 2013 10:12
-
-
Save tpaviot/4966329 to your computer and use it in GitHub Desktop.
Fuse toruses patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/BRepAlgoAPI_test/boolean_ops.cpp b/test/BRepAlgoAPI_test/boolean_ops.cpp | |
index 3d03ac2..84acb16 100644 | |
--- a/test/BRepAlgoAPI_test/boolean_ops.cpp | |
+++ b/test/BRepAlgoAPI_test/boolean_ops.cpp | |
@@ -1,7 +1,9 @@ | |
#include <BRepPrimAPI_MakeBox.hxx> | |
#include <BRepPrimAPI_MakeCylinder.hxx> | |
#include <BRepPrimAPI_MakeSphere.hxx> | |
+#include <BRepPrimAPI_MakeTorus.hxx> | |
#include <BRepAlgoAPI_Cut.hxx> | |
+#include <BRepAlgoAPI_Fuse.hxx> | |
#include <gtest/gtest.h> | |
@@ -33,6 +35,19 @@ TEST(BRepAlgoAPITestSuite, testCutCylSphere) | |
ASSERT_FALSE(shp_result.IsNull()); | |
} | |
+TEST(BRepAlgoAPITestSuite, testFuseToruses) | |
+{ | |
+ // create the first shape: a sphere, centered at the origin | |
+ TopoDS_Solid torus_1 = BRepPrimAPI_MakeTorus(5.,10.); | |
+ ASSERT_FALSE(torus_1.IsNull()); | |
+ // the second shape: a cylinder cube, a corner at the origin | |
+ TopoDS_Solid torus_2 = BRepPrimAPI_MakeTorus(6.,11.); | |
+ ASSERT_FALSE(torus_2.IsNull()); | |
+ // boolean cut | |
+ TopoDS_Shape shp_result = BRepAlgoAPI_Fuse(torus_1,torus_2); | |
+ ASSERT_FALSE(shp_result.IsNull()); | |
+} | |
+ | |
int main(int argc, char **argv){ | |
testing::InitGoogleTest(&argc, argv); | |
return RUN_ALL_TESTS(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment