ModuleSupport
Provides classes for different shapes of a support for optics.
A support fixes the spatial extent and outer shape of optics - think of it as a substrate. Technically, the support is a section of the x-y-plane in the element coordinate frame.
The support will become an attribute of Mirror or Mask objects.
Created in Sept 2020
@author: Anthony Guillaume and Stefan Haessler
1""" 2Provides classes for different shapes of a support for optics. 3 4A support fixes the spatial extent and outer shape of optics - think of it as a substrate. 5Technically, the support is a section of the x-y-plane in the element coordinate frame. 6 7The support will become an attribute of Mirror or Mask objects. 8 9 10 11 12 13Created in Sept 2020 14 15@author: Anthony Guillaume and Stefan Haessler 16""" 17 18# %% 19 20import numpy as np 21import math 22import ARTcore.ModuleGeometry as mgeo 23from abc import ABC, abstractmethod 24import logging 25 26logger = logging.getLogger(__name__) 27 28 29# %% Abstract Support Class 30class Support(ABC): 31 """ 32 Abstract base class for optics supports. 33 Supports the `in` operator to test points. 34 """ 35 @abstractmethod 36 def _sdf(self, Point): 37 """ 38 Signed distance function for the support. 39 """ 40 pass 41 42 def __contains__(self, Point): 43 """ 44 Interface allowing the use of the `in` operator to check if a point is within the support. 45 """ 46 return self._sdf(Point) <= 0 47 48 def _estimate_size(self, initial_distance=1000): 49 """ 50 Estimate the size of the support using the signed distance function. 51 """ 52 directions = np.array([[1, 0], [-1, 0], [0, 1], [0, -1]]) # Simple axis-aligned directions 53 points = directions * initial_distance # Generate points on a circle of the current radius 54 distances = np.array([self._sdf(p) for p in points]) 55 avg_distance = np.mean(distances) 56 57 return initial_distance - avg_distance 58 59 60 61 62 63# %% Round Support 64class SupportRound(Support): 65 """ 66 A round support for optics. 67 68 Attributes 69 ---------- 70 radius : float 71 The radius of the support in mm. 72 """ 73 74 def __init__(self, Radius: float): 75 """ 76 Create a round support. 77 78 Parameters 79 ---------- 80 Radius : float 81 The radius of the support in mm. 82 83 """ 84 self.radius = Radius 85 86 def __repr__(self): 87 return f"{type(self).__name__}({self.radius})" 88 89 def _sdf(self, Point): 90 """ 91 Return signed distance from the support. 92 """ 93 return mgeo.SDF_Circle(Point, self.radius) 94 95 def _get_grid(self, NbPoint: int, **kwargs): 96 """ 97 Return a Point array with the coordinates of a number NbPoints of points. 98 The points are distributed as a Vogel-spiral on the support, with the origin in the center of the support. 99 """ 100 MatrixXY = mgeo.SpiralVogel(NbPoint, self.radius) 101 return mgeo.Point(np.hstack((MatrixXY, np.zeros((MatrixXY.shape[0], 1))))) 102 103 104# %% Round Support with Hole 105class SupportRoundHole(Support): 106 """ 107 A round support for optics with a round hole. 108 109 Attributes 110 ---------- 111 radius : float 112 The radius of the support in mm. 113 114 radiushole : float 115 The radius of the hole in mm. 116 117 centerholeX : float 118 The x-cordinate of the hole's centre, in mm. 119 120 centerholeY : float 121 The y-cordinate of the hole's centre, in mm. 122 123 """ 124 125 def __init__(self, Radius: float, RadiusHole: float, CenterHoleX: float, CenterHoleY: float): 126 """ 127 Parameters 128 ---------- 129 Radius : float 130 The radius of the support in mm. 131 132 RadiusHole : float 133 The radius of the hole in mm. 134 135 CenterHoleX : float 136 The x-cordinate of the hole's centre, in mm. 137 138 CenterHoleY : float 139 The y-cordinate of the hole's centre, in mm. 140 141 """ 142 self.radius = Radius 143 self.radiushole = RadiusHole 144 self.centerholeX = CenterHoleX 145 self.centerholeY = CenterHoleY 146 147 def __repr__(self): 148 return f"{type(self).__name__}(Radius={self.radius}, RadiusHole={self.radiushole}, CenterHoleX={self.centerholeX}, CenterHoleY={self.centerholeY})" 149 150 def _sdf(self, Point): 151 """Return signed distance from the support.""" 152 support = mgeo.SDF_Circle(Point, self.radius) 153 hole = mgeo.SDF_Circle(Point[:2] - np.array([self.centerholeX, self.centerholeY]), self.radiushole) 154 return mgeo.Difference_SDF(support, hole) 155 156 def _get_grid(self, NbPoint, **kwargs): 157 """ 158 Returns a list of 2D-numpy-arrays with the coordinates a number NbPoints of points, 159 distributed as a Vogel-spiral on the support, with the origin in the center of the support. 160 """ 161 MatrixXY = mgeo.SpiralVogel(NbPoint, self.radius) 162 return MatrixXY 163 164# %% Rectangular Support 165class SupportRectangle(Support): 166 """ 167 A rectangular support for optics. 168 169 Attributes 170 ---------- 171 dimX : float 172 The dimension in mm along x. 173 174 dimY : float 175 The dimension in mm along y. 176 177 """ 178 179 def __init__(self, DimensionX: float, DimensionY: float): 180 """ 181 Parameters 182 ---------- 183 DimensionX : float 184 The dimension in mm along x. 185 186 DimensionY : float 187 The dimension in mm along y. 188 189 """ 190 self.dimX = DimensionX 191 self.dimY = DimensionY 192 193 def __repr__(self): 194 return f"{type(self).__name__}(DimensionX={self.dimX}, DimensionY={self.dimY})" 195 196 def _sdf(self, Point): 197 """Return signed distance from the support.""" 198 return mgeo.SDF_Rectangle(Point, self.dimX, self.dimY) 199 200 def _get_grid(self, NbPoints: int, **kwargs) -> list[np.ndarray]: 201 """ 202 Returns a list of 2D-numpy-arrays with the coordinates a number NbPoints of points, 203 distributed as a regular grid on the support, with the origin in the center of the support. 204 """ 205 nbx = int( 206 np.sqrt(self.dimX / self.dimY * NbPoints + 0.25 * (self.dimX - self.dimY) ** 2 / self.dimY**2) 207 - 0.5 * (self.dimX - self.dimY) / self.dimY 208 ) 209 nby = int(NbPoints / nbx) 210 x = np.linspace(-self.dimX / 2, self.dimX / 2, nbx) 211 y = np.linspace(-self.dimY / 2, self.dimY / 2, nby) 212 ListCoordXY = [] 213 for i in x: 214 for j in y: 215 ListCoordXY.append(np.array([i, j])) 216 return ListCoordXY 217 218 219# %% Rectangular Support with Hole 220class SupportRectangleHole(Support): 221 """ 222 A rectangular support for optics with a round hole. 223 224 Attributes 225 ---------- 226 dimX : float 227 The dimension in mm along x. 228 229 dimY : float 230 The dimension in mm along y. 231 232 radiushole : float 233 The radius of the hole in mm. 234 235 centerholeX : float 236 The x-cordinate of the hole's centre, in mm. 237 238 centerholeY : float 239 The y-cordinate of the hole's centre, in mm. 240 241 """ 242 243 def __init__(self, DimensionX: float, DimensionY: float, RadiusHole: float, CenterHoleX: float, CenterHoleY: float): 244 """ 245 Parameters 246 ---------- 247 DimensionX : float 248 The dimension in mm along x. 249 250 DimensionY : float 251 The dimension in mm along y. 252 253 RadiusHole : float 254 The radius of the hole in mm. 255 256 CenterHoleX : float 257 The x-cordinate of the hole's centre, in mm. 258 259 CenterHoleY : float 260 The y-cordinate of the hole's centre, in mm. 261 262 """ 263 self.dimX = DimensionX 264 self.dimY = DimensionY 265 self.radiushole = RadiusHole 266 self.centerholeX = CenterHoleX 267 self.centerholeY = CenterHoleY 268 269 def __repr__(self): 270 return f"{type(self).__name__}(DimensionX={self.dimX}, DimensionY={self.dimY}, RadiusHole={self.radiushole}, CenterHoleX={self.centerholeX}, CenterHoleY={self.centerholeY})" 271 272 def _sdf(self, Point): 273 """Return signed distance from the support.""" 274 support = mgeo.SDF_Rectangle(Point, self.dimX, self.dimY) 275 hole = mgeo.SDF_Circle(Point[:2] - np.array([self.centerholeX, self.centerholeY]), self.radiushole) 276 return mgeo.Difference_SDF(support, hole) 277 278 279 280# %% Rectangular Support with Rectangular Hole 281class SupportRectangleRectHole(Support): 282 """ 283 A rectangular support for optics, with a rectangular hole. 284 285 Attributes 286 ---------- 287 dimX : float 288 The dimension in mm along x. 289 290 dimY : float 291 The dimension in mm along y. 292 293 holeX : float 294 The dimension of the hole in mm along x. 295 296 holeY : float 297 The dimension of the hole in mm along y. 298 299 centerholeX : float 300 The x-cordinate of the hole's centre, in mm. 301 302 centerholeY : float 303 The y-cordinate of the hole's centre, in mm. 304 305 """ 306 307 def __init__( 308 self, DimensionX: float, DimensionY: float, HoleX: float, HoleY: float, CenterHoleX: float, CenterHoleY: float 309 ): 310 """ 311 Parameters 312 ---------- 313 DimensionX : float 314 The dimension in mm along x. 315 316 DimensionY : float 317 The dimension in mm along y. 318 319 HoleX : float 320 The dimension of the hole in mm along x. 321 322 HoleY : float 323 The dimension of the hole in mm along y. 324 325 CenterHoleX : float 326 The x-cordinate of the hole's centre, in mm. 327 328 CenterHoleY : float 329 The y-cordinate of the hole's centre, in mm. 330 331 """ 332 self.dimX = DimensionX 333 self.dimY = DimensionY 334 self.holeX = HoleX 335 self.holeY = HoleY 336 self.centerholeX = CenterHoleX 337 self.centerholeY = CenterHoleY 338 339 def __repr__(self): 340 return f"{type(self).__name__}(DimensionX={self.dimX}, DimensionY={self.dimY}, HoleX={self.holeX}, HoleY={self.holeY}, CenterHoleX={self.centerholeX}, CenterHoleY={self.centerholeY})" 341 342 def _sdf(self, Point): 343 """Return signed distance from the support.""" 344 support = mgeo.SDF_Rectangle(Point, self.dimX, self.dimY) 345 hole = mgeo.SDF_Rectangle(Point[:2] - np.array([self.centerholeX, self.centerholeY]), self.holeX, self.holeY) 346 return mgeo.Difference_SDF(support, hole)
31class Support(ABC): 32 """ 33 Abstract base class for optics supports. 34 Supports the `in` operator to test points. 35 """ 36 @abstractmethod 37 def _sdf(self, Point): 38 """ 39 Signed distance function for the support. 40 """ 41 pass 42 43 def __contains__(self, Point): 44 """ 45 Interface allowing the use of the `in` operator to check if a point is within the support. 46 """ 47 return self._sdf(Point) <= 0 48 49 def _estimate_size(self, initial_distance=1000): 50 """ 51 Estimate the size of the support using the signed distance function. 52 """ 53 directions = np.array([[1, 0], [-1, 0], [0, 1], [0, -1]]) # Simple axis-aligned directions 54 points = directions * initial_distance # Generate points on a circle of the current radius 55 distances = np.array([self._sdf(p) for p in points]) 56 avg_distance = np.mean(distances) 57 58 return initial_distance - avg_distance
Abstract base class for optics supports.
Supports the in operator to test points.
65class SupportRound(Support): 66 """ 67 A round support for optics. 68 69 Attributes 70 ---------- 71 radius : float 72 The radius of the support in mm. 73 """ 74 75 def __init__(self, Radius: float): 76 """ 77 Create a round support. 78 79 Parameters 80 ---------- 81 Radius : float 82 The radius of the support in mm. 83 84 """ 85 self.radius = Radius 86 87 def __repr__(self): 88 return f"{type(self).__name__}({self.radius})" 89 90 def _sdf(self, Point): 91 """ 92 Return signed distance from the support. 93 """ 94 return mgeo.SDF_Circle(Point, self.radius) 95 96 def _get_grid(self, NbPoint: int, **kwargs): 97 """ 98 Return a Point array with the coordinates of a number NbPoints of points. 99 The points are distributed as a Vogel-spiral on the support, with the origin in the center of the support. 100 """ 101 MatrixXY = mgeo.SpiralVogel(NbPoint, self.radius) 102 return mgeo.Point(np.hstack((MatrixXY, np.zeros((MatrixXY.shape[0], 1)))))
A round support for optics.
Attributes
radius : float
The radius of the support in mm.
106class SupportRoundHole(Support): 107 """ 108 A round support for optics with a round hole. 109 110 Attributes 111 ---------- 112 radius : float 113 The radius of the support in mm. 114 115 radiushole : float 116 The radius of the hole in mm. 117 118 centerholeX : float 119 The x-cordinate of the hole's centre, in mm. 120 121 centerholeY : float 122 The y-cordinate of the hole's centre, in mm. 123 124 """ 125 126 def __init__(self, Radius: float, RadiusHole: float, CenterHoleX: float, CenterHoleY: float): 127 """ 128 Parameters 129 ---------- 130 Radius : float 131 The radius of the support in mm. 132 133 RadiusHole : float 134 The radius of the hole in mm. 135 136 CenterHoleX : float 137 The x-cordinate of the hole's centre, in mm. 138 139 CenterHoleY : float 140 The y-cordinate of the hole's centre, in mm. 141 142 """ 143 self.radius = Radius 144 self.radiushole = RadiusHole 145 self.centerholeX = CenterHoleX 146 self.centerholeY = CenterHoleY 147 148 def __repr__(self): 149 return f"{type(self).__name__}(Radius={self.radius}, RadiusHole={self.radiushole}, CenterHoleX={self.centerholeX}, CenterHoleY={self.centerholeY})" 150 151 def _sdf(self, Point): 152 """Return signed distance from the support.""" 153 support = mgeo.SDF_Circle(Point, self.radius) 154 hole = mgeo.SDF_Circle(Point[:2] - np.array([self.centerholeX, self.centerholeY]), self.radiushole) 155 return mgeo.Difference_SDF(support, hole) 156 157 def _get_grid(self, NbPoint, **kwargs): 158 """ 159 Returns a list of 2D-numpy-arrays with the coordinates a number NbPoints of points, 160 distributed as a Vogel-spiral on the support, with the origin in the center of the support. 161 """ 162 MatrixXY = mgeo.SpiralVogel(NbPoint, self.radius) 163 return MatrixXY
A round support for optics with a round hole.
Attributes
radius : float
The radius of the support in mm.
radiushole : float
The radius of the hole in mm.
centerholeX : float
The x-cordinate of the hole's centre, in mm.
centerholeY : float
The y-cordinate of the hole's centre, in mm.
126 def __init__(self, Radius: float, RadiusHole: float, CenterHoleX: float, CenterHoleY: float): 127 """ 128 Parameters 129 ---------- 130 Radius : float 131 The radius of the support in mm. 132 133 RadiusHole : float 134 The radius of the hole in mm. 135 136 CenterHoleX : float 137 The x-cordinate of the hole's centre, in mm. 138 139 CenterHoleY : float 140 The y-cordinate of the hole's centre, in mm. 141 142 """ 143 self.radius = Radius 144 self.radiushole = RadiusHole 145 self.centerholeX = CenterHoleX 146 self.centerholeY = CenterHoleY
Parameters
Radius : float The radius of the support in mm.
RadiusHole : float The radius of the hole in mm.
CenterHoleX : float The x-cordinate of the hole's centre, in mm.
CenterHoleY : float The y-cordinate of the hole's centre, in mm.
166class SupportRectangle(Support): 167 """ 168 A rectangular support for optics. 169 170 Attributes 171 ---------- 172 dimX : float 173 The dimension in mm along x. 174 175 dimY : float 176 The dimension in mm along y. 177 178 """ 179 180 def __init__(self, DimensionX: float, DimensionY: float): 181 """ 182 Parameters 183 ---------- 184 DimensionX : float 185 The dimension in mm along x. 186 187 DimensionY : float 188 The dimension in mm along y. 189 190 """ 191 self.dimX = DimensionX 192 self.dimY = DimensionY 193 194 def __repr__(self): 195 return f"{type(self).__name__}(DimensionX={self.dimX}, DimensionY={self.dimY})" 196 197 def _sdf(self, Point): 198 """Return signed distance from the support.""" 199 return mgeo.SDF_Rectangle(Point, self.dimX, self.dimY) 200 201 def _get_grid(self, NbPoints: int, **kwargs) -> list[np.ndarray]: 202 """ 203 Returns a list of 2D-numpy-arrays with the coordinates a number NbPoints of points, 204 distributed as a regular grid on the support, with the origin in the center of the support. 205 """ 206 nbx = int( 207 np.sqrt(self.dimX / self.dimY * NbPoints + 0.25 * (self.dimX - self.dimY) ** 2 / self.dimY**2) 208 - 0.5 * (self.dimX - self.dimY) / self.dimY 209 ) 210 nby = int(NbPoints / nbx) 211 x = np.linspace(-self.dimX / 2, self.dimX / 2, nbx) 212 y = np.linspace(-self.dimY / 2, self.dimY / 2, nby) 213 ListCoordXY = [] 214 for i in x: 215 for j in y: 216 ListCoordXY.append(np.array([i, j])) 217 return ListCoordXY
A rectangular support for optics.
Attributes
dimX : float
The dimension in mm along x.
dimY : float
The dimension in mm along y.
180 def __init__(self, DimensionX: float, DimensionY: float): 181 """ 182 Parameters 183 ---------- 184 DimensionX : float 185 The dimension in mm along x. 186 187 DimensionY : float 188 The dimension in mm along y. 189 190 """ 191 self.dimX = DimensionX 192 self.dimY = DimensionY
Parameters
DimensionX : float The dimension in mm along x.
DimensionY : float The dimension in mm along y.
221class SupportRectangleHole(Support): 222 """ 223 A rectangular support for optics with a round hole. 224 225 Attributes 226 ---------- 227 dimX : float 228 The dimension in mm along x. 229 230 dimY : float 231 The dimension in mm along y. 232 233 radiushole : float 234 The radius of the hole in mm. 235 236 centerholeX : float 237 The x-cordinate of the hole's centre, in mm. 238 239 centerholeY : float 240 The y-cordinate of the hole's centre, in mm. 241 242 """ 243 244 def __init__(self, DimensionX: float, DimensionY: float, RadiusHole: float, CenterHoleX: float, CenterHoleY: float): 245 """ 246 Parameters 247 ---------- 248 DimensionX : float 249 The dimension in mm along x. 250 251 DimensionY : float 252 The dimension in mm along y. 253 254 RadiusHole : float 255 The radius of the hole in mm. 256 257 CenterHoleX : float 258 The x-cordinate of the hole's centre, in mm. 259 260 CenterHoleY : float 261 The y-cordinate of the hole's centre, in mm. 262 263 """ 264 self.dimX = DimensionX 265 self.dimY = DimensionY 266 self.radiushole = RadiusHole 267 self.centerholeX = CenterHoleX 268 self.centerholeY = CenterHoleY 269 270 def __repr__(self): 271 return f"{type(self).__name__}(DimensionX={self.dimX}, DimensionY={self.dimY}, RadiusHole={self.radiushole}, CenterHoleX={self.centerholeX}, CenterHoleY={self.centerholeY})" 272 273 def _sdf(self, Point): 274 """Return signed distance from the support.""" 275 support = mgeo.SDF_Rectangle(Point, self.dimX, self.dimY) 276 hole = mgeo.SDF_Circle(Point[:2] - np.array([self.centerholeX, self.centerholeY]), self.radiushole) 277 return mgeo.Difference_SDF(support, hole)
A rectangular support for optics with a round hole.
Attributes
dimX : float
The dimension in mm along x.
dimY : float
The dimension in mm along y.
radiushole : float
The radius of the hole in mm.
centerholeX : float
The x-cordinate of the hole's centre, in mm.
centerholeY : float
The y-cordinate of the hole's centre, in mm.
244 def __init__(self, DimensionX: float, DimensionY: float, RadiusHole: float, CenterHoleX: float, CenterHoleY: float): 245 """ 246 Parameters 247 ---------- 248 DimensionX : float 249 The dimension in mm along x. 250 251 DimensionY : float 252 The dimension in mm along y. 253 254 RadiusHole : float 255 The radius of the hole in mm. 256 257 CenterHoleX : float 258 The x-cordinate of the hole's centre, in mm. 259 260 CenterHoleY : float 261 The y-cordinate of the hole's centre, in mm. 262 263 """ 264 self.dimX = DimensionX 265 self.dimY = DimensionY 266 self.radiushole = RadiusHole 267 self.centerholeX = CenterHoleX 268 self.centerholeY = CenterHoleY
Parameters
DimensionX : float The dimension in mm along x.
DimensionY : float The dimension in mm along y.
RadiusHole : float The radius of the hole in mm.
CenterHoleX : float The x-cordinate of the hole's centre, in mm.
CenterHoleY : float The y-cordinate of the hole's centre, in mm.
282class SupportRectangleRectHole(Support): 283 """ 284 A rectangular support for optics, with a rectangular hole. 285 286 Attributes 287 ---------- 288 dimX : float 289 The dimension in mm along x. 290 291 dimY : float 292 The dimension in mm along y. 293 294 holeX : float 295 The dimension of the hole in mm along x. 296 297 holeY : float 298 The dimension of the hole in mm along y. 299 300 centerholeX : float 301 The x-cordinate of the hole's centre, in mm. 302 303 centerholeY : float 304 The y-cordinate of the hole's centre, in mm. 305 306 """ 307 308 def __init__( 309 self, DimensionX: float, DimensionY: float, HoleX: float, HoleY: float, CenterHoleX: float, CenterHoleY: float 310 ): 311 """ 312 Parameters 313 ---------- 314 DimensionX : float 315 The dimension in mm along x. 316 317 DimensionY : float 318 The dimension in mm along y. 319 320 HoleX : float 321 The dimension of the hole in mm along x. 322 323 HoleY : float 324 The dimension of the hole in mm along y. 325 326 CenterHoleX : float 327 The x-cordinate of the hole's centre, in mm. 328 329 CenterHoleY : float 330 The y-cordinate of the hole's centre, in mm. 331 332 """ 333 self.dimX = DimensionX 334 self.dimY = DimensionY 335 self.holeX = HoleX 336 self.holeY = HoleY 337 self.centerholeX = CenterHoleX 338 self.centerholeY = CenterHoleY 339 340 def __repr__(self): 341 return f"{type(self).__name__}(DimensionX={self.dimX}, DimensionY={self.dimY}, HoleX={self.holeX}, HoleY={self.holeY}, CenterHoleX={self.centerholeX}, CenterHoleY={self.centerholeY})" 342 343 def _sdf(self, Point): 344 """Return signed distance from the support.""" 345 support = mgeo.SDF_Rectangle(Point, self.dimX, self.dimY) 346 hole = mgeo.SDF_Rectangle(Point[:2] - np.array([self.centerholeX, self.centerholeY]), self.holeX, self.holeY) 347 return mgeo.Difference_SDF(support, hole)
A rectangular support for optics, with a rectangular hole.
Attributes
dimX : float
The dimension in mm along x.
dimY : float
The dimension in mm along y.
holeX : float
The dimension of the hole in mm along x.
holeY : float
The dimension of the hole in mm along y.
centerholeX : float
The x-cordinate of the hole's centre, in mm.
centerholeY : float
The y-cordinate of the hole's centre, in mm.
308 def __init__( 309 self, DimensionX: float, DimensionY: float, HoleX: float, HoleY: float, CenterHoleX: float, CenterHoleY: float 310 ): 311 """ 312 Parameters 313 ---------- 314 DimensionX : float 315 The dimension in mm along x. 316 317 DimensionY : float 318 The dimension in mm along y. 319 320 HoleX : float 321 The dimension of the hole in mm along x. 322 323 HoleY : float 324 The dimension of the hole in mm along y. 325 326 CenterHoleX : float 327 The x-cordinate of the hole's centre, in mm. 328 329 CenterHoleY : float 330 The y-cordinate of the hole's centre, in mm. 331 332 """ 333 self.dimX = DimensionX 334 self.dimY = DimensionY 335 self.holeX = HoleX 336 self.holeY = HoleY 337 self.centerholeX = CenterHoleX 338 self.centerholeY = CenterHoleY
Parameters
DimensionX : float The dimension in mm along x.
DimensionY : float The dimension in mm along y.
HoleX : float The dimension of the hole in mm along x.
HoleY : float The dimension of the hole in mm along y.
CenterHoleX : float The x-cordinate of the hole's centre, in mm.
CenterHoleY : float The y-cordinate of the hole's centre, in mm.