7878 halfDiameter = T (0.5 * shape. diameter)
7979 if shape. axis == 1
8080 enorm = norm (SVector (e_abs[2 ], e_abs[3 ]))
81- if enorm <= Modia3D. neps
81+ if enorm <= Modia3D. nepsType (T)
8282 return Basics. sign_eps (e_abs[1 ])* SVector (halfLength, 0.0 , 0.0 )
8383 else
8484 return Basics. sign_eps (e_abs[1 ])* SVector (halfLength, 0.0 , 0.0 ) + SVector (0.0 , (halfDiameter)* e_abs[2 ], (halfDiameter)* e_abs[3 ])/ enorm
8585 end
8686 elseif shape. axis == 2
8787 enorm = norm (SVector (e_abs[3 ], e_abs[1 ]))
88- if enorm <= Modia3D. neps
88+ if enorm <= Modia3D. nepsType (T)
8989 return Basics. sign_eps (e_abs[2 ])* SVector (0.0 , halfLength, 0.0 )
9090 else
9191 return Basics. sign_eps (e_abs[2 ])* SVector (0.0 , halfLength, 0.0 ) + SVector ((halfDiameter)* e_abs[1 ], 0.0 , (halfDiameter)* e_abs[3 ])/ enorm
9292 end
9393 else
9494 enorm = norm (SVector (e_abs[1 ], e_abs[2 ]))
95- if enorm <= Modia3D. neps
95+ if enorm <= Modia3D. nepsType (T)
9696 return Basics. sign_eps (e_abs[3 ])* SVector (0.0 , 0.0 , halfLength)
9797 else
9898 return Basics. sign_eps (e_abs[3 ])* SVector (0.0 , 0.0 , halfLength) + SVector ((halfDiameter)* e_abs[1 ], (halfDiameter)* e_abs[2 ], 0.0 )/ enorm
@@ -137,15 +137,15 @@ end
137137 return SVector (shapeLength, 0.0 , 0.0 ) # apex is support point
138138 else # frustum of a cone
139139 enorm = norm (SVector (e_abs[2 ], e_abs[3 ]))
140- if enorm > Modia3D. neps
140+ if enorm > Modia3D. nepsType (T)
141141 return SVector (shapeLength, 0.0 , 0.0 ) + SVector (0.0 , topRadius* e_abs[2 ], topRadius* e_abs[3 ]) / enorm # point on top circle is support point
142142 else
143143 return SVector (shapeLength, 0.0 , 0.0 ) # top circle center is support point
144144 end
145145 end
146146 else
147147 enorm = norm (SVector (e_abs[2 ], e_abs[3 ]))
148- if enorm > Modia3D. neps
148+ if enorm > Modia3D. nepsType (T)
149149 return SVector (0.0 , baseRadius* e_abs[2 ], baseRadius* e_abs[3 ]) / enorm # point on base circle is support point
150150 else
151151 return SVector {3,T} (0.0 , 0.0 , 0.0 ) # base circle center is support point
@@ -158,15 +158,15 @@ end
158158 return SVector (0.0 , shapeLength, 0.0 ) # apex is support point
159159 else # frustum of a cone
160160 enorm = norm (SVector (e_abs[3 ], e_abs[1 ]))
161- if enorm > Modia3D. neps
161+ if enorm > Modia3D. nepsType (T)
162162 return SVector (0.0 , shapeLength, 0.0 ) + SVector (topRadius* e_abs[1 ], 0.0 , topRadius* e_abs[3 ]) / enorm # point on top circle is support point
163163 else
164164 return SVector (0.0 , shapeLength, 0.0 ) # top circle center is support point
165165 end
166166 end
167167 else
168168 enorm = norm (SVector (e_abs[3 ], e_abs[1 ]))
169- if enorm > Modia3D. neps
169+ if enorm > Modia3D. nepsType (T)
170170 return SVector (baseRadius* e_abs[1 ], 0.0 , baseRadius* e_abs[3 ]) / enorm # point on base circle is support point
171171 else
172172 return SVector {3,T} (0.0 , 0.0 , 0.0 ) # base circle center is support point
@@ -179,15 +179,15 @@ end
179179 return SVector (0.0 , 0.0 , shapeLength) # apex is support point
180180 else # frustum of a cone
181181 enorm = norm (SVector (e_abs[1 ], e_abs[2 ]))
182- if enorm > Modia3D. neps
182+ if enorm > Modia3D. nepsType (T)
183183 return SVector (0.0 , 0.0 , shapeLength) + SVector (topRadius* e_abs[1 ], topRadius* e_abs[2 ], 0.0 ) / enorm # point on top circle is support point
184184 else
185185 return SVector (0.0 , 0.0 , shapeLength) # top circle center is support point
186186 end
187187 end
188188 else
189189 enorm = norm (SVector (e_abs[1 ], e_abs[2 ]))
190- if enorm > Modia3D. neps
190+ if enorm > Modia3D. nepsType (T)
191191 return SVector (baseRadius* e_abs[1 ], baseRadius* e_abs[2 ], 0.0 ) / enorm # point on base circle is support point
192192 else
193193 return SVector {3,T} (0.0 , 0.0 , 0.0 ) # base circle center is support point
@@ -205,21 +205,21 @@ end
205205 halfThickness = T (0.5 * shape. thickness)
206206 if shape. axis == 1
207207 enorm = norm (SVector (e_abs[1 ], e_abs[2 ]))
208- if enorm <= Modia3D. neps
208+ if enorm <= Modia3D. nepsType (T)
209209 return SVector (Basics. sign_eps (e_abs[1 ])* halfLength, 0.0 , Basics. sign_eps (e_abs[3 ])* halfThickness)
210210 else
211211 return SVector (Basics. sign_eps (e_abs[1 ])* halfLength, 0.0 , Basics. sign_eps (e_abs[3 ])* halfThickness) + SVector (halfWidth* e_abs[1 ], halfWidth* e_abs[2 ], 0.0 )/ enorm
212212 end
213213 elseif shape. axis == 2
214214 enorm = norm (SVector (e_abs[2 ], e_abs[3 ]))
215- if enorm <= Modia3D. neps
215+ if enorm <= Modia3D. nepsType (T)
216216 return SVector (Basics. sign_eps (e_abs[1 ])* halfThickness, Basics. sign_eps (e_abs[2 ])* halfLength, 0.0 )
217217 else
218218 return SVector (Basics. sign_eps (e_abs[1 ])* halfThickness, Basics. sign_eps (e_abs[2 ])* halfLength, 0.0 ) + SVector (0.0 , halfWidth* e_abs[2 ], halfWidth* e_abs[3 ])/ enorm
219219 end
220220 else
221221 enorm = norm (SVector (e_abs[3 ], e_abs[1 ]))
222- if enorm <= Modia3D. neps
222+ if enorm <= Modia3D. nepsType (T)
223223 return SVector (0.0 , Basics. sign_eps (e_abs[2 ])* halfThickness, Basics. sign_eps (e_abs[3 ])* halfLength)
224224 else
225225 return SVector (0.0 , Basics. sign_eps (e_abs[2 ])* halfThickness, Basics. sign_eps (e_abs[3 ])* halfLength) + SVector (halfWidth* e_abs[1 ], 0.0 , halfWidth* e_abs[3 ])/ enorm
0 commit comments