| 137 | } |
| 138 | |
| 139 | void createGroundShape(TopoDS_Shape& shape) { |
| 140 | TColgp_Array2OfPnt cv (0, 4, 0, 4); |
| 141 | cv.SetValue(0, 0, gp_Pnt(-10000, -10000, -4130)); |
| 142 | cv.SetValue(0, 1, gp_Pnt(-10000, -4330, -4130)); |
| 143 | cv.SetValue(0, 2, gp_Pnt(-10000, 0, -5130)); |
| 144 | cv.SetValue(0, 3, gp_Pnt(-10000, 4330, -7130)); |
| 145 | cv.SetValue(0, 4, gp_Pnt(-10000, 10000, -7130)); |
| 146 | cv.SetValue(1, 0, gp_Pnt( -3330, -10000, -5130)); |
| 147 | cv.SetValue(1, 1, gp_Pnt( -7670, -3670, 5000)); |
| 148 | cv.SetValue(1, 2, gp_Pnt( -9000, 0, 1000)); |
| 149 | cv.SetValue(1, 3, gp_Pnt( -7670, 7670, 6000)); |
| 150 | cv.SetValue(1, 4, gp_Pnt( -3330, 10000, -4130)); |
| 151 | cv.SetValue(2, 0, gp_Pnt( 0, -10000, -5530)); |
| 152 | cv.SetValue(2, 1, gp_Pnt( 0, -3670, 3000)); |
| 153 | cv.SetValue(2, 2, gp_Pnt( 0, 0, -12000)); |
| 154 | cv.SetValue(2, 3, gp_Pnt( 0, 7670, 1500)); |
| 155 | cv.SetValue(2, 4, gp_Pnt( 0, 10000, -4130)); |
| 156 | cv.SetValue(3, 0, gp_Pnt( 3330, -10000, -6130)); |
| 157 | cv.SetValue(3, 1, gp_Pnt( 7670, -3670, 6000)); |
| 158 | cv.SetValue(3, 2, gp_Pnt( 9000, 0, 5000)); |
| 159 | cv.SetValue(3, 3, gp_Pnt( 7670, 9000, 7000)); |
| 160 | cv.SetValue(3, 4, gp_Pnt( 3330, 10000, -4130)); |
| 161 | cv.SetValue(4, 0, gp_Pnt( 10000, -10000, -6130)); |
| 162 | cv.SetValue(4, 1, gp_Pnt( 10000, -4330, -5130)); |
| 163 | cv.SetValue(4, 2, gp_Pnt( 10000, 0, -4130)); |
| 164 | cv.SetValue(4, 3, gp_Pnt( 10000, 4330, -4130)); |
| 165 | cv.SetValue(4, 4, gp_Pnt( 10000, 10000, -8130)); |
| 166 | TColStd_Array1OfReal knots(0, 1); |
| 167 | knots(0) = 0; |
| 168 | knots(1) = 1; |
| 169 | TColStd_Array1OfInteger mult(0, 1); |
| 170 | mult(0) = 5; |
| 171 | mult(1) = 5; |
| 172 | Handle(Geom_BSplineSurface) surf = new Geom_BSplineSurface(cv, knots, knots, mult, mult, 4, 4); |
| 173 | #if OCC_VERSION_HEX < 0x60502 |
| 174 | shape = BRepBuilderAPI_MakeFace(surf); |
| 175 | #else |
| 176 | shape = BRepBuilderAPI_MakeFace(surf, Precision::Confusion()); |
| 177 | #endif |
| 178 | } |