2 Test case for GDML Cone Segment feature.
5 from GeomAlgoAPI import GeomAlgoAPI_ShapeAPI as shaperpy
6 from GeomAlgoAPI import GeomAlgoAPI_Exception as myExcept
7 from GeomAPI import GeomAPI_Pnt as pnt
9 CS1 = shaperpy.makeConeSegment(7.,11.,5.,8.,12.,0.,270.)
10 CS2 = shaperpy.makeConeSegment(5.,10.,7.,15.,15.,45.,180.)
11 CS3 = shaperpy.makeConeSegment(5.,10.,7.,15.,15.,-45.,180.)
12 CS4 = shaperpy.makeConeSegment(0.,10.,2.,7.,3.,0.,270.)
13 CS5 = shaperpy.makeConeSegment(5.,8.,0.,6.,10.,45.,270.)
14 CS6 = shaperpy.makeConeSegment(0.,6.,0.,4.,17.,0.,270.)
15 CS7 = shaperpy.makeConeSegment(7.,11.,5.,8.,12.,0.,360.)
18 CS8 = shaperpy.makeConeSegment(-5.,11.,5.,8.,12.,0.,270.)
20 assert(ec.what() == "Cone Segment builder :: rmin1 is negative.")
23 CS9 = shaperpy.makeConeSegment(11.,7.,5.,8.,12.,0.,270.)
25 assert(ec.what() == "Cone Segment builder :: rmin1 is larger than rmax1.")
28 CS10 = shaperpy.makeConeSegment(7.,11.,8.,5.,12.,0.,270.)
30 assert(ec.what() == "Cone Segment builder :: rmin2 is larger than rmax2.")
33 CS11 = shaperpy.makeConeSegment(7.,11.,-3.,5.,12.,0.,270.)
35 assert(ec.what() == "Cone Segment builder :: rmin2 is negative.")
38 CS12 = shaperpy.makeConeSegment(7.,11.,5.,8.,0.,0.,270.)
40 assert(ec.what() == "Cone Segment builder :: z is negative or null.")
43 CS13 = shaperpy.makeConeSegment(7.,11.,5.,8.,-10.,0.,270.)
45 assert(ec.what() == "Cone Segment builder :: z is negative or null.")
48 CS14 = shaperpy.makeConeSegment(7.,11.,5.,8.,12.,-45.,-45.)
50 assert(ec.what() == "Cone Segment builder :: deltaphi is negative or null.")
53 CS15 = shaperpy.makeConeSegment(7.,11.,5.,8.,12.,45.,450.)
55 assert(ec.what() == "Cone Segment builder :: deltaphi is larger than 360 degree.")