glTF exporter: keep backward compatibility for export options
[blender-addons.git] / archimesh / achm_venetian_maker.py
bloba7468820669db2e5201746b1db35e5656c5619be
1 # SPDX-License-Identifier: GPL-2.0-or-later
3 # ----------------------------------------------------------
4 # Author: Antonio Vazquez (antonioya)
6 # ----------------------------------------------------------
7 # noinspection PyUnresolvedReferences
8 import bpy
9 from math import atan, sin, cos, radians
10 # noinspection PyUnresolvedReferences
11 from bpy.types import Operator, PropertyGroup, Object, Panel
12 from bpy.props import FloatProperty, BoolProperty, IntProperty, FloatVectorProperty, CollectionProperty
13 from .achm_tools import *
16 # ------------------------------------------------------------------
17 # Define operator class to create object
18 # ------------------------------------------------------------------
19 class ARCHIMESH_OT_Venetian(Operator):
20 bl_idname = "mesh.archimesh_venetian"
21 bl_label = "Venetian blind"
22 bl_description = "Venetian"
23 bl_category = 'View'
24 bl_options = {'REGISTER', 'UNDO'}
26 # -----------------------------------------------------
27 # Draw (create UI interface)
28 # -----------------------------------------------------
29 # noinspection PyUnusedLocal
30 def draw(self, context):
31 layout = self.layout
32 row = layout.row()
33 row.label(text="Use Properties panel (N) to define parms", icon='INFO')
35 # -----------------------------------------------------
36 # Execute
37 # -----------------------------------------------------
38 def execute(self, context):
39 if bpy.context.mode == "OBJECT":
40 create_object(self, context)
41 return {'FINISHED'}
42 else:
43 self.report({'WARNING'}, "Archimesh: Option only valid in Object mode")
44 return {'CANCELLED'}
47 # ------------------------------------------------------------------------------
49 # Create main object. The other objects will be children of this.
51 # ------------------------------------------------------------------------------
52 # noinspection PyUnusedLocal
53 def create_object(self, context):
54 # deselect all objects
55 for o in bpy.data.objects:
56 o.select_set(False)
58 # we create main object and mesh
59 mainmesh = bpy.data.meshes.new("VenetianFrane")
60 mainobject = bpy.data.objects.new("VenetianFrame", mainmesh)
61 mainobject.location = bpy.context.scene.cursor.location
62 bpy.context.collection.objects.link(mainobject)
63 mainobject.VenetianObjectGenerator.add()
65 # we shape the main object and create other objects as children
66 shape_mesh_and_create_children(mainobject, mainmesh)
68 # we select, and activate, main object
69 mainobject.select_set(True)
70 bpy.context.view_layer.objects.active = mainobject
73 # ------------------------------------------------------------------------------
75 # Update main mesh and children objects
77 # ------------------------------------------------------------------------------
78 # noinspection PyUnusedLocal
79 def update_object(self, context):
80 # When we update, the active object is the main object
81 o = bpy.context.active_object
82 oldmesh = o.data
83 oldname = o.data.name
84 # Now we deselect that object to not delete it.
85 o.select_set(False)
86 # and we create a new mesh
87 tmp_mesh = bpy.data.meshes.new("temp")
88 # deselect all objects
89 for obj in bpy.data.objects:
90 obj.select_set(False)
92 # -----------------------
93 # remove all children
94 # -----------------------
95 # first granchild
96 for child in o.children:
97 remove_children(child)
98 # now children of main object
99 remove_children(o)
101 # Finally we create all that again (except main object),
102 shape_mesh_and_create_children(o, tmp_mesh, True)
103 o.data = tmp_mesh
104 # Remove data (mesh of active object),
105 bpy.data.meshes.remove(oldmesh)
106 tmp_mesh.name = oldname
107 # and select, and activate, the main object
108 o.select_set(True)
109 bpy.context.view_layer.objects.active = o
112 # ------------------------------------------------------------------------------
113 # Generate all objects
114 # For main, it only shapes mesh and creates modifiers (the modifier, only the first time).
115 # And, for the others, it creates object and mesh.
116 # ------------------------------------------------------------------------------
117 # noinspection PyUnusedLocal
118 def shape_mesh_and_create_children(mainobject, tmp_mesh, update=False):
119 mp = mainobject.VenetianObjectGenerator[0]
120 mat = None
121 plastic = None
123 if mp.crt_mat and bpy.context.scene.render.engine in {'CYCLES', 'BLENDER_EEVEE'}:
124 rgb = mp.objcol
125 plastic = create_diffuse_material("Plastic_venetian_material", True, rgb[0], rgb[1], rgb[2], rgb[0], rgb[1],
126 rgb[2], 0.2)
128 # ------------------
129 # Top
130 # ------------------
131 create_venetian_top(tmp_mesh, mp.width + 0.002, mp.depth + 0.002, -0.06)
133 # materials
134 if mp.crt_mat and bpy.context.scene.render.engine in {'CYCLES', 'BLENDER_EEVEE'}:
135 set_material(mainobject, plastic)
136 # --------------------------------------------------------------------------------
137 # segments
138 # --------------------------------------------------------------------------------
139 margin = mp.depth
140 mydata = create_slat_mesh("Venetian_slats", mp.width, mp.depth, mp.height - 0.06, mp.angle, mp.ratio)
141 myslats = mydata[0]
142 myslats.parent = mainobject
143 myslats.location.x = 0
144 myslats.location.y = 0
145 myslats.location.z = -margin - 0.04
147 mypoints = mydata[1]
148 angleused = mydata[2]
149 # refine
150 remove_doubles(myslats)
151 set_normals(myslats)
152 set_smooth(myslats)
154 if mp.crt_mat and bpy.context.scene.render.engine in {'CYCLES', 'BLENDER_EEVEE'}:
155 set_material(myslats, plastic)
156 # ------------------------
157 # Strings (Middle)
158 # ------------------------
159 myp = [((0, 0, mypoints[0] + margin), (0, 0, 0), (0, 0, 0)),
160 ((0, 0, mypoints[len(mypoints) - 1]), (0, 0, 0), (0, 0, 0))]
162 mycurvel = create_bezier("String.L", myp, (0, 0, 0))
163 mycurvel.parent = myslats
164 mycurvec = create_bezier("String.C", myp, (0, 0, 0))
165 mycurvec.parent = myslats
166 mycurver = create_bezier("String.R", myp, (0, 0, 0))
167 mycurver.parent = myslats
169 if mp.width < 0.60:
170 sep = 0.058
171 else:
172 sep = 0.148
174 mycurvel.location.x = (mp.width / 2) - sep
175 mycurvel.location.y = 0
176 mycurvel.location.z = 0
178 mycurvec.location.x = 0
179 mycurvec.location.y = 0
180 mycurvec.location.z = 0
182 mycurver.location.x = -(mp.width / 2) + sep
183 mycurver.location.y = 0
184 mycurver.location.z = 0
186 if mp.crt_mat and bpy.context.scene.render.engine in {'CYCLES', 'BLENDER_EEVEE'}:
187 mat = create_diffuse_material("String_material", False, 0.674, 0.617, 0.496, 0.1, 0.1, 0.1, 0.01)
188 set_material(mycurvel, mat)
189 set_material(mycurvec, mat)
190 set_material(mycurver, mat)
191 # ------------------------
192 # Strings (Front)
193 # ------------------------
194 myp = [((0, 0, margin), (0, 0, 0), (0, 0, 0)),
195 ((0, 0, mypoints[len(mypoints) - 1] - 0.003 - sin(radians(angleused)) * mp.depth / 2), (0, 0, 0),
196 (0, 0, 0))]
198 mycurvelf = create_bezier("String.f.L", myp, (0, 0, 0), 0.001, 'FRONT')
199 mycurvelf.parent = myslats
200 mycurvecf = create_bezier("String.f.C", myp, (0, 0, 0), 0.001, 'FRONT')
201 mycurvecf.parent = myslats
202 mycurverf = create_bezier("String.f.R", myp, (0, 0, 0), 0.001, 'FRONT')
203 mycurverf.parent = myslats
205 if mp.width < 0.60:
206 sep = 0.058
207 else:
208 sep = 0.148
210 mycurvelf.location.x = (mp.width / 2) - sep
211 mycurvelf.location.y = ((-mp.depth / 2) * cos(radians(mp.angle))) - 0.001
212 mycurvelf.location.z = 0
214 mycurvecf.location.x = 0
215 mycurvecf.location.y = ((-mp.depth / 2) * cos(radians(mp.angle))) - 0.001
216 mycurvecf.location.z = 0
218 mycurverf.location.x = -(mp.width / 2) + sep
219 mycurverf.location.y = ((-mp.depth / 2) * cos(radians(mp.angle))) - 0.001
220 mycurverf.location.z = 0
222 if mp.crt_mat and bpy.context.scene.render.engine in {'CYCLES', 'BLENDER_EEVEE'}:
223 set_material(mycurvelf, mat)
224 set_material(mycurvecf, mat)
225 set_material(mycurverf, mat)
227 # ------------------------
228 # Strings (Back)
229 # ------------------------
230 myp = [((0, 0, margin), (0, 0, 0), (0, 0, 0)),
231 ((0, 0, mypoints[len(mypoints) - 1] - 0.003 + sin(radians(angleused)) * mp.depth / 2),
232 (0, 0, 0),
233 (0, 0, 0))]
235 mycurvelb = create_bezier("String.b.L", myp, (0, 0, 0), 0.001, 'BACK')
236 mycurvelb.parent = myslats
237 mycurvecb = create_bezier("String.b.C", myp, (0, 0, 0), 0.001, 'BACK')
238 mycurvecb.parent = myslats
239 mycurverb = create_bezier("String.b.R", myp, (0, 0, 0), 0.001, 'BACK')
240 mycurverb.parent = myslats
242 if mp.width < 0.60:
243 sep = 0.058
244 else:
245 sep = 0.148
247 mycurvelb.location.x = (mp.width / 2) - sep
248 mycurvelb.location.y = ((mp.depth / 2) * cos(radians(mp.angle))) + 0.001
249 mycurvelb.location.z = 0
251 mycurvecb.location.x = 0
252 mycurvecb.location.y = ((mp.depth / 2) * cos(radians(mp.angle))) + 0.001
253 mycurvecb.location.z = 0
255 mycurverb.location.x = -(mp.width / 2) + sep
256 mycurverb.location.y = ((mp.depth / 2) * cos(radians(mp.angle))) + 0.001
257 mycurverb.location.z = 0
259 if mp.crt_mat and bpy.context.scene.render.engine in {'CYCLES', 'BLENDER_EEVEE'}:
260 set_material(mycurvelb, mat)
261 set_material(mycurvecb, mat)
262 set_material(mycurverb, mat)
264 # ------------------
265 # Bottom
266 # ------------------
267 mybase = create_venetian_base("Venetian_base", mp.width + 0.002, mp.depth + 0.002, -0.006)
268 mybase.parent = myslats
269 mybase.location.x = 0
270 mybase.location.y = 0
271 mybase.location.z = mypoints[len(mypoints) - 1]
272 mybase.rotation_euler = (radians(angleused), 0, 0)
274 # materials
275 if mp.crt_mat and bpy.context.scene.render.engine in {'CYCLES', 'BLENDER_EEVEE'}:
276 set_material(mybase, plastic)
277 # ------------------
278 # Stick
279 # ------------------
280 mystick = get_venetian_stick("Venetian_stick", mp.height * 0.6)
281 mystick.parent = mainobject
282 mystick.location.x = -mp.width / 2 + 0.03
283 mystick.location.y = -mp.depth / 2 - 0.003
284 mystick.location.z = -0.03
285 # materials
286 if mp.crt_mat and bpy.context.scene.render.engine in {'CYCLES', 'BLENDER_EEVEE'}:
287 matstick = create_diffuse_material("Stick_material", False, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.04)
288 set_material(mybase, matstick)
290 # ------------------
291 # Strings up/down
292 # ------------------
293 mystring = get_venetian_strings("Venetian_updown", mp.height * 0.75)
294 mystring.parent = mainobject
295 mystring.location.x = mp.width / 2 - 0.03
296 mystring.location.y = -mp.depth / 2 - 0.003
297 mystring.location.z = -0.03
299 if mp.crt_mat and bpy.context.scene.render.engine in {'CYCLES', 'BLENDER_EEVEE'}:
300 set_material(mystring, mat)
301 # deactivate others
302 for o in bpy.data.objects:
303 if o.select_get() is True and o.name != mainobject.name:
304 o.select_set(False)
306 return
309 # ------------------------------------------------------------------
310 # Define property group class to create or modify
311 # ------------------------------------------------------------------
312 class ObjectProperties(PropertyGroup):
313 width: FloatProperty(
314 name='Width',
315 min=0.30, max=4, default=1, precision=3,
316 description='Total width', update=update_object,
318 height: FloatProperty(
319 name='Height',
320 min=0.20, max=10, default=1.7, precision=3,
321 description='Total height',
322 update=update_object,
324 depth: FloatProperty(
325 name='Slat depth', min=0.02, max=0.30, default=0.04,
326 precision=3,
327 description='Slat depth', update=update_object,
329 angle: FloatProperty(
330 name='Angle', min=0, max=85, default=0, precision=1,
331 description='Angle of the slats', update=update_object,
333 ratio: IntProperty(
334 name='Extend', min=0, max=100, default=100,
335 description='% of extension (100 full extend)', update=update_object,
338 # Materials
339 crt_mat: BoolProperty(
340 name="Create default Cycles materials",
341 description="Create default materials for Cycles render",
342 default=True, update=update_object,
344 objcol: FloatVectorProperty(
345 name="Color",
346 description="Color for material",
347 default=(0.616, 0.435, 1.0, 1.0),
348 min=0.1, max=1,
349 subtype='COLOR',
350 size=4, update=update_object,
353 # Register
354 bpy.utils.register_class(ObjectProperties)
355 Object.VenetianObjectGenerator = CollectionProperty(type=ObjectProperties)
358 # ------------------------------------------------------------------
359 # Define panel class to modify object
360 # ------------------------------------------------------------------
361 class ARCHIMESH_PT_VenetianObjectgenerator(Panel):
362 bl_idname = "OBJECT_PT_venetian_generator"
363 bl_label = "Venetian"
364 bl_space_type = 'VIEW_3D'
365 bl_region_type = 'UI'
366 bl_category = 'Create'
368 # -----------------------------------------------------
369 # Verify if visible
370 # -----------------------------------------------------
371 @classmethod
372 def poll(cls, context):
373 o = context.object
374 if o is None:
375 return False
376 if 'VenetianObjectGenerator' not in o:
377 return False
378 else:
379 return True
381 # -----------------------------------------------------
382 # Draw (create UI interface)
383 # -----------------------------------------------------
384 def draw(self, context):
385 o = context.object
386 # noinspection PyBroadException
387 try:
388 if 'VenetianObjectGenerator' not in o:
389 return
390 except:
391 return
393 layout = self.layout
394 if bpy.context.mode == 'EDIT_MESH':
395 layout.label(text='Warning: Operator does not work in edit mode.', icon='ERROR')
396 else:
397 myobjdat = o.VenetianObjectGenerator[0]
398 space = bpy.context.space_data
399 if not space.local_view:
400 # Imperial units warning
401 if bpy.context.scene.unit_settings.system == "IMPERIAL":
402 row = layout.row()
403 row.label(text="Warning: Imperial units not supported", icon='COLOR_RED')
405 box = layout.box()
406 row = box.row()
407 row.prop(myobjdat, 'width')
408 row.prop(myobjdat, 'height')
409 row.prop(myobjdat, 'depth')
410 row = box.row()
411 row.prop(myobjdat, 'angle', slider=True)
412 row.prop(myobjdat, 'ratio', slider=True)
414 box = layout.box()
415 if not context.scene.render.engine in {'CYCLES', 'BLENDER_EEVEE'}:
416 box.enabled = False
417 box.prop(myobjdat, 'crt_mat')
418 if myobjdat.crt_mat:
419 row = box.row()
420 row.prop(myobjdat, 'objcol')
421 else:
422 row = layout.row()
423 row.label(text="Warning: Operator does not work in local view mode", icon='ERROR')
426 # ------------------------------------------------------------------------------
427 # Create rectangular base
429 # x: size x axis
430 # y: size y axis
431 # z: size z axis
432 # ------------------------------------------------------------------------------
433 def create_venetian_top(mymesh, x, y, z):
434 myvertex = [(-x / 2, -y / 2, 0.0),
435 (-x / 2, y / 2, 0.0),
436 (x / 2, y / 2, 0.0),
437 (x / 2, -y / 2, 0.0),
438 (-x / 2, -y / 2, z),
439 (-x / 2, y / 2, z),
440 (x / 2, y / 2, z),
441 (x / 2, -y / 2, z)]
443 myfaces = [(0, 1, 2, 3), (0, 1, 5, 4), (1, 2, 6, 5), (2, 6, 7, 3), (5, 6, 7, 4), (0, 4, 7, 3)]
445 mymesh.from_pydata(myvertex, [], myfaces)
446 mymesh.update(calc_edges=True)
448 return
451 # ------------------------------------------------------------
452 # Create venetian slats
454 # width: total width of the slat
455 # depth: depth of the slat
456 # height: Total height (extended)
457 # ratio: factor of extension 0-collapsed 100-extended
458 # angle: angle
459 # ------------------------------------------------------------
460 def create_slat_mesh(objname, width, depth, height, angle, ratio):
461 # Vertex
462 v = 0
463 gap = 0.001
464 angleused = 0
465 myvertex = []
466 myfaces = []
467 mypoints = []
468 # Calculate total slats
469 separation = (depth * 0.75) # posZ is % of depth
470 numslats = int(height / separation)
471 collapsedslats = numslats - int((height * ((100 - ratio) / 100)) / separation)
472 # --------------------------------
473 # Generate slats
474 # --------------------------------
475 posz = 0
476 for x in range(numslats):
477 if x < collapsedslats:
478 angleused = angle
479 elif x == collapsedslats:
480 angleused = angle / 2
481 else:
482 angleused = 0
483 # if the slat is collapsed, the angle is 0
485 mydata = get_slat_data(v, angleused, width, depth, posz)
486 mypoints.extend([posz]) # saves all Z points
487 myvertex.extend(mydata[0])
488 myfaces.extend(mydata[1])
489 v = mydata[2]
490 if x < collapsedslats:
491 posz -= separation
492 else:
493 posz -= gap
494 # Transition to horizontal
495 if angleused == angle / 2:
496 sinheight = sin(radians(angle / 2)) * depth / 2
497 posz -= sinheight
499 mesh = bpy.data.meshes.new(objname)
500 myobject = bpy.data.objects.new(objname, mesh)
502 myobject.location = bpy.context.scene.cursor.location
503 bpy.context.collection.objects.link(myobject)
505 mesh.from_pydata(myvertex, [], myfaces)
506 mesh.update(calc_edges=True)
508 return myobject, mypoints, angleused
511 # ------------------------------------------------------------
512 # Generate slat data for venetian slat mesh
514 # v: last vertex index
515 # angle: angle
516 # width: total width of the slat
517 # depth: depth of the slat
518 # posZ: position in Z axis
519 # ------------------------------------------------------------
520 def get_slat_data(v, angle, width, depth, posz):
521 # ------------------------------------
522 # Mesh data
523 # ------------------------------------
524 maxx = width / 2
525 miny = -depth / 2
526 maxy = depth / 2
527 maxz = 0.0028
528 gap = 0.0025
529 radio = 0.00195
530 sinv = sin(atan(maxz / (maxy - gap)))
531 cos_value = cos(radians(angle))
532 sin_value = sin(radians(angle))
534 if width < 0.60:
535 sep = 0.06
536 else:
537 sep = 0.15
539 sep2 = sep - 0.005
541 # Vertex
542 myvertex = []
544 myvertex.extend(
545 [(maxx - 0.0017, (miny + 0.00195) * cos_value, posz + (-maxz + (radio * sinv)) + ((miny + 0.00195) * sin_value)),
546 (maxx - 0.0017, (maxy - 0.00195) * cos_value, posz + (-maxz + (radio * sinv)) + ((maxy - 0.00195) * sin_value)),
547 (maxx - 0.0045, miny * cos_value, posz + -maxz + (miny * sin_value)),
548 (maxx - 0.0045, maxy * cos_value, posz + -maxz + (maxy * sin_value)),
549 (maxx, -gap * cos_value, posz + (-gap * sin_value)),
550 (maxx, gap * cos_value, posz + (gap * sin_value)),
551 (maxx - 0.0045, -gap * cos_value, posz + (-gap * sin_value)),
552 (maxx - 0.0045, gap * cos_value, posz + (gap * sin_value)),
553 (0.001172, miny * cos_value, posz + -maxz + (miny * sin_value)),
554 (0.001172, maxy * cos_value, posz + -maxz + (maxy * sin_value)),
555 (0.001172, -gap * cos_value, posz + (-gap * sin_value)),
556 (0.001172, gap * cos_value, posz + (gap * sin_value)),
557 (maxx - sep, miny * cos_value, posz + -maxz + (miny * sin_value)),
558 (maxx - sep, maxy * cos_value, posz + -maxz + (maxy * sin_value)),
559 (maxx - sep, -gap * cos_value, posz + (-gap * sin_value)),
560 (maxx - sep, gap * cos_value, posz + (gap * sin_value)),
561 (maxx - sep2, miny * cos_value, posz + -maxz + (miny * sin_value)),
562 (maxx - sep2, maxy * cos_value, posz + -maxz + (maxy * sin_value)),
563 (maxx - sep2, -gap * cos_value, posz + (-gap * sin_value)),
564 (maxx - sep2, gap * cos_value, posz + (gap * sin_value))])
566 myvertex.extend(
567 [(-maxx + 0.0017, (miny + 0.00195) * cos_value, posz + (-maxz + (radio * sinv)) + ((miny + 0.00195) * sin_value)),
568 (-maxx + 0.0017, (maxy - 0.00195) * cos_value, posz + (-maxz + (radio * sinv)) + ((maxy - 0.00195) * sin_value)),
569 (-maxx + 0.0045, miny * cos_value, posz + -maxz + (miny * sin_value)),
570 (-maxx + 0.0045, maxy * cos_value, posz + -maxz + (maxy * sin_value)),
571 (-maxx, -gap * cos_value, posz + (-gap * sin_value)),
572 (-maxx, gap * cos_value, posz + (gap * sin_value)),
573 (-maxx + 0.0045, -gap * cos_value, posz + (-gap * sin_value)),
574 (-maxx + 0.0045, gap * cos_value, posz + (gap * sin_value)),
575 (-0.001172, miny * cos_value, posz + -maxz + (miny * sin_value)),
576 (-0.001172, maxy * cos_value, posz + -maxz + (maxy * sin_value)),
577 (-0.001172, -gap * cos_value, posz + (-gap * sin_value)),
578 (-0.001172, gap * cos_value, posz + (gap * sin_value)),
579 (-maxx + sep, miny * cos_value, posz + -maxz + (miny * sin_value)),
580 (-maxx + sep, maxy * cos_value, posz + -maxz + (maxy * sin_value)),
581 (-maxx + sep, -gap * cos_value, posz + (-gap * sin_value)),
582 (-maxx + sep, gap * cos_value, posz + (gap * sin_value)),
583 (-maxx + sep2, miny * cos_value, posz + -maxz + (miny * sin_value)),
584 (-maxx + sep2, maxy * cos_value, posz + -maxz + (maxy * sin_value)),
585 (-maxx + sep2, -gap * cos_value, posz + (-gap * sin_value)),
586 (-maxx + sep2, gap * cos_value, posz + (gap * sin_value))])
588 # Faces
589 myfaces = [(v + 7, v + 5, v + 1, v + 3), (v + 19, v + 7, v + 3, v + 17), (v + 2, v + 0, v + 4, v + 6),
590 (v + 6, v + 4, v + 5, v + 7), (v + 16, v + 2, v + 6, v + 18),
591 (v + 18, v + 6, v + 7, v + 19), (v + 11, v + 15, v + 13, v + 9), (v + 8, v + 12, v + 14, v + 10),
592 (v + 10, v + 14, v + 15, v + 11), (v + 15, v + 19, v + 17, v + 13),
593 (v + 12, v + 16, v + 18, v + 14), (v + 39, v + 35, v + 33, v + 37), (v + 34, v + 38, v + 36, v + 32),
594 (v + 27, v + 25, v + 21, v + 23), (v + 27, v + 26, v + 24, v + 25),
595 (v + 24, v + 26, v + 22, v + 20), (v + 39, v + 37, v + 23, v + 27), (v + 39, v + 27, v + 26, v + 38),
596 (v + 38, v + 26, v + 22, v + 36), (v + 30, v + 34, v + 32, v + 28),
597 (v + 34, v + 30, v + 31, v + 35), (v + 35, v + 31, v + 29, v + 33), (v + 11, v + 9, v + 29, v + 31),
598 (v + 8, v + 10, v + 30, v + 28)]
600 v += len(myvertex)
602 return myvertex, myfaces, v
605 # ------------------------------------------------------------------------------
606 # Create rectangular base
608 # objName: Object name
609 # x: size x axis
610 # y: size y axis
611 # z: size z axis
612 # ------------------------------------------------------------------------------
613 def create_venetian_base(objname, x, y, z):
614 myvertex = [(-x / 2, -y / 2, 0.0),
615 (-x / 2, y / 2, 0.0),
616 (x / 2, y / 2, 0.0),
617 (x / 2, -y / 2, 0.0),
618 (-x / 2, -y / 2, z),
619 (-x / 2, y / 2, z),
620 (x / 2, y / 2, z),
621 (x / 2, -y / 2, z)]
623 myfaces = [(0, 1, 2, 3), (0, 1, 5, 4), (1, 2, 6, 5), (2, 6, 7, 3), (5, 6, 7, 4), (0, 4, 7, 3)]
625 mesh = bpy.data.meshes.new(objname)
626 myobject = bpy.data.objects.new(objname, mesh)
628 myobject.location = bpy.context.scene.cursor.location
629 bpy.context.collection.objects.link(myobject)
631 mesh.from_pydata(myvertex, [], myfaces)
632 mesh.update(calc_edges=True)
634 return myobject
637 # ------------------------------------------------------------
638 # Generate stick for venetian
640 # objName: Object name
641 # height: height
642 # ------------------------------------------------------------
643 def get_venetian_stick(objname, height):
644 # ------------------------------------
645 # Mesh data
646 # ------------------------------------
647 minx = -0.005686083808541298
648 maxx = 0.005686083808541298
649 # minZ = -0.2236524224281311
650 minz = -height
651 maxz = 0
653 # Vertex
654 myvertex = [(minx + 0.0031912513077259064, -0.012805024161934853, maxz - 0.02722930908203125),
655 (minx + 0.0030460257548838854, -0.007894348353147507, maxz - 0.008386015892028809),
656 (minx + 0.003936204360798001, -0.014603500254452229, maxz - 0.02722930908203125),
657 (minx + 0.003812092007137835, -0.006685533560812473, maxz - 0.009785711765289307),
658 (maxx - 0.005637487949570641, -0.01534845307469368, maxz - 0.02722930908203125),
659 (minx + 0.005661540681103361, -0.006184821017086506, maxz - 0.010365545749664307),
660 (maxx - 0.0038390127010643482, -0.014603500254452229, maxz - 0.02722930908203125),
661 (maxx - 0.0038611787604168057, -0.006685533560812473, maxz - 0.009785711765289307),
662 (maxx - 0.0030940594151616096, -0.012805024161934853, maxz - 0.02722930908203125),
663 (maxx - 0.0030951115768402815, -0.007894348353147507, maxz - 0.008386015892028809),
664 (maxx - 0.0038390120025724173, -0.011006549000740051, maxz - 0.02722930908203125),
665 (maxx - 0.0038611781783401966, -0.009103144519031048, maxz - 0.0069863200187683105),
666 (maxx - 0.005637487425701693, -0.010261595249176025, maxz - 0.02722930908203125),
667 (minx + 0.005661541004883475, -0.00960385799407959, maxz - 0.0064064860343933105),
668 (minx + 0.003936204593628645, -0.011006549000740051, maxz - 0.02722930908203125),
669 (minx + 0.003812092822045088, -0.009103145450353622, maxz - 0.0069863200187683105),
670 (minx + 0.004708557506091893, -0.0009992714039981365, maxz - 0.002431390807032585),
671 (minx + 0.004987679829355329, -0.0009992715204134583, maxz - 0.0031052385456860065),
672 (minx + 0.005661541195877362, -0.0009992715204134583, maxz - 0.0033843691926449537),
673 (maxx - 0.00503676530206576, -0.0009992715204134583, maxz - 0.0031052385456860065),
674 (maxx - 0.004757642629556358, -0.0009992716368287802, maxz - 0.002431390807032585),
675 (maxx - 0.005036764952819794, -0.0009992715204134583, maxz - 0.0017575474921613932),
676 (minx + 0.005661541457811836, -0.0009992715204134583, maxz - 0.0014784171944484115),
677 (minx + 0.004987680295016617, -0.0009992715204134583, maxz - 0.0017575474921613932),
678 (minx + 0.0038341645849868655, -0.010904508642852306, maxz - 0.015928268432617188),
679 (maxx - 0.005637487367494032, -0.01011728961020708, maxz - 0.015928268432617188),
680 (maxx - 0.003736971877515316, -0.010904508642852306, maxz - 0.015928268432617188),
681 (maxx - 0.002949752612039447, -0.012805024161934853, maxz - 0.015928268432617188),
682 (maxx - 0.0037369721103459597, -0.014705540612339973, maxz - 0.015928268432617188),
683 (maxx - 0.00563748789136298, -0.015492759644985199, maxz - 0.015928268432617188),
684 (minx + 0.0038341644685715437, -0.014705540612339973, maxz - 0.015928268432617188),
685 (minx + 0.003046944970265031, -0.012805024161934853, maxz - 0.015928268432617188),
686 (minx + 0.0043586865067481995, -0.012638782151043415, maxz - 0.013130486011505127),
687 (minx + 0.004740283475257456, -0.0120366420596838, maxz - 0.013827741146087646),
688 (minx + 0.0056615397916175425, -0.011787224560976028, maxz - 0.014116525650024414),
689 (maxx - 0.004789371509104967, -0.0120366420596838, maxz - 0.013827741146087646),
690 (maxx - 0.0044077744241803885, -0.012638782151043415, maxz - 0.013130486011505127),
691 (maxx - 0.0047893712762743235, -0.013240913860499859, maxz - 0.012433230876922607),
692 (minx + 0.005661539897118928, -0.01349033135920763, maxz - 0.01214444637298584),
693 (minx + 0.004740283824503422, -0.013240914791822433, maxz - 0.012433230876922607),
694 (minx + 0.005661537383275572, -0.012638770043849945, maxz - 0.017504926770925522),
695 (maxx - 0.0039202586049214005, -0.010174507275223732, maxz - 0.015622403472661972),
696 (maxx - 0.0028137227054685354, -0.013580016791820526, maxz - 0.015622403472661972),
697 (minx + 0.005661537154082907, -0.015684761106967926, maxz - 0.015622403472661972),
698 (minx + 0.0027646280359476805, -0.013580016791820526, maxz - 0.015622403472661972),
699 (minx + 0.003871166962198913, -0.010174507275223732, maxz - 0.015622403472661972),
700 (maxx - 0.0028137224726378918, -0.011697524227201939, maxz - 0.01257637981325388),
701 (maxx - 0.003920258954167366, -0.015103034675121307, maxz - 0.01257637981325388),
702 (minx + 0.0038711666129529476, -0.015103034675121307, maxz - 0.01257637981325388),
703 (minx + 0.002764628268778324, -0.011697524227201939, maxz - 0.01257637981325388),
704 (minx + 0.0056615376142872265, -0.00959277804940939, maxz - 0.01257637981325388),
705 (minx + 0.005661537383275572, -0.012638770043849945, maxz - 0.010693902149796486),
706 (maxx - 0.004007883137091994, -0.013192017562687397, maxz - 0.016996320337057114),
707 (maxx - 0.004658283665776253, -0.011190323159098625, maxz - 0.016996320337057114),
708 (maxx - 0.002955520059913397, -0.011743564158678055, maxz - 0.015889829024672508),
709 (minx + 0.00566153760337329, -0.009741866029798985, maxz - 0.015889829024672508),
710 (minx + 0.0046091912081465125, -0.011190323159098625, maxz - 0.016996320337057114),
711 (minx + 0.005661537248670356, -0.014429156668484211, maxz - 0.016996320337057114),
712 (maxx - 0.004007878364063799, -0.014982416294515133, maxz - 0.015889829024672508),
713 (minx + 0.003958789980970323, -0.013192017562687397, maxz - 0.016996320337057114),
714 (minx + 0.00395878404378891, -0.014982416294515133, maxz - 0.015889829024672508),
715 (minx + 0.002906427951529622, -0.011743564158678055, maxz - 0.015889829024672508),
716 (maxx - 0.004658278776332736, -0.009399918839335442, maxz - 0.014099414460361004),
717 (minx + 0.004609186435118318, -0.009399918839335442, maxz - 0.014099414460361004),
718 (maxx - 0.0023051041644066572, -0.012638770043849945, maxz - 0.014099414460361004),
719 (maxx - 0.0029555035289376974, -0.010637051425874233, maxz - 0.014099414460361004),
720 (maxx - 0.004658279241994023, -0.015877623111009598, maxz - 0.014099414460361004),
721 (maxx - 0.0029555039945989847, -0.014640489593148232, maxz - 0.014099414460361004),
722 (minx + 0.0029064100235700607, -0.014640489593148232, maxz - 0.014099414460361004),
723 (minx + 0.00460918596945703, -0.015877623111009598, maxz - 0.014099414460361004),
724 (minx + 0.002906410489231348, -0.010637051425874233, maxz - 0.014099414460361004),
725 (minx + 0.0022560113575309515, -0.012638770043849945, maxz - 0.014099414460361004),
726 (maxx - 0.004007878014817834, -0.010295123793184757, maxz - 0.012308954261243343),
727 (maxx - 0.002955520059913397, -0.013533977791666985, maxz - 0.012308954261243343),
728 (minx + 0.005661537164996844, -0.015535674057900906, maxz - 0.012308954261243343),
729 (minx + 0.0029064277186989784, -0.013533977791666985, maxz - 0.012308954261243343),
730 (minx + 0.003958784393034875, -0.010295123793184757, maxz - 0.012308954261243343),
731 (maxx - 0.004007883137091994, -0.012085524387657642, maxz - 0.011202462017536163),
732 (minx + 0.0056615375196997775, -0.01084838341921568, maxz - 0.011202462017536163),
733 (maxx - 0.004658283898606896, -0.01408721785992384, maxz - 0.011202462017536163),
734 (minx + 0.004609190975315869, -0.01408721785992384, maxz - 0.011202462017536163),
735 (minx + 0.003958789980970323, -0.012085524387657642, maxz - 0.011202462017536163),
736 (minx + 0.003936204593628645, -0.011006549000740051, minz),
737 (maxx - 0.005637487425701693, -0.010261595249176025, minz),
738 (maxx - 0.0038390120025724173, -0.011006549000740051, minz),
739 (maxx - 0.0030940594151616096, -0.012805024161934853, minz),
740 (maxx - 0.0038390127010643482, -0.014603500254452229, minz),
741 (maxx - 0.005637487949570641, -0.01534845307469368, minz),
742 (minx + 0.003936204360798001, -0.014603500254452229, minz),
743 (minx + 0.0031912513077259064, -0.012805024161934853, minz),
744 (minx, -0.001379312016069889, maxz - 0.005334946792572737),
745 (minx, -4.6566128730773926e-09, maxz - 0.005334946792572737),
746 (maxx, -4.6566128730773926e-09, maxz - 0.005334946792572737),
747 (maxx, -0.001379312016069889, maxz - 0.005334946792572737),
748 (minx, -0.001379312016069889, maxz - 1.5133991837501526e-08),
749 (minx, -4.6566128730773926e-09, maxz - 1.5133991837501526e-08),
750 (maxx, -4.6566128730773926e-09, maxz - 1.5133991837501526e-08),
751 (maxx, -0.001379312016069889, maxz - 1.5133991837501526e-08),
752 (minx + 0.0009754756465554237, -0.001379312016069889, maxz - 0.00447732862085104),
753 (minx + 0.0009754756465554237, -0.001379312016069889, maxz - 0.0008576327236369252),
754 (maxx - 0.0009754756465554237, -0.001379312016069889, maxz - 0.0008576327236369252),
755 (maxx - 0.0009754756465554237, -0.001379312016069889, maxz - 0.00447732862085104),
756 (minx + 0.0009754756465554237, -0.0007799165323376656, maxz - 0.00447732862085104),
757 (minx + 0.0009754756465554237, -0.0007799165323376656, maxz - 0.0008576327236369252),
758 (maxx - 0.0009754756465554237, -0.0007799165323376656, maxz - 0.0008576327236369252),
759 (maxx - 0.0009754756465554237, -0.0007799165323376656, maxz - 0.00447732862085104)]
761 # Faces
762 myfaces = [(1, 15, 23, 16), (17, 16, 23, 22, 21, 20, 19, 18),
763 (15, 13, 22, 23), (13, 11, 21, 22), (11, 9, 20, 21),
764 (9, 7, 19, 20), (7, 5, 18, 19), (5, 3, 17, 18), (3, 1, 16, 17), (0, 31, 24, 14),
765 (14, 24, 25, 12), (12, 25, 26, 10), (10, 26, 27, 8), (8, 27, 28, 6), (6, 28, 29, 4),
766 (2, 30, 31, 0), (4, 29, 30, 2), (15, 1, 32, 39), (13, 15, 39, 38), (11, 13, 38, 37),
767 (9, 11, 37, 36), (7, 9, 36, 35), (5, 7, 35, 34), (3, 5, 34, 33), (1, 3, 33, 32),
768 (40, 53, 52), (41, 53, 55), (40, 52, 57), (40, 57, 59), (40, 59, 56),
769 (41, 55, 62), (42, 54, 64), (43, 58, 66), (44, 60, 68), (45, 61, 70),
770 (41, 62, 65), (42, 64, 67), (43, 66, 69), (44, 68, 71), (45, 70, 63),
771 (46, 72, 77), (47, 73, 79), (48, 74, 80), (49, 75, 81), (50, 76, 78),
772 (52, 54, 42), (52, 53, 54), (53, 41, 54), (55, 56, 45), (55, 53, 56),
773 (53, 40, 56), (57, 58, 43), (57, 52, 58), (52, 42, 58), (59, 60, 44),
774 (59, 57, 60), (57, 43, 60), (56, 61, 45), (56, 59, 61), (59, 44, 61),
775 (62, 63, 50), (62, 55, 63), (55, 45, 63), (64, 65, 46), (64, 54, 65),
776 (54, 41, 65), (66, 67, 47), (66, 58, 67), (58, 42, 67), (68, 69, 48),
777 (68, 60, 69), (60, 43, 69), (70, 71, 49), (70, 61, 71), (61, 44, 71),
778 (65, 72, 46), (65, 62, 72), (62, 50, 72), (67, 73, 47), (67, 64, 73),
779 (64, 46, 73), (69, 74, 48), (69, 66, 74), (66, 47, 74), (71, 75, 49),
780 (71, 68, 75), (68, 48, 75), (63, 76, 50), (63, 70, 76), (70, 49, 76),
781 (77, 78, 51), (77, 72, 78), (72, 50, 78), (79, 77, 51), (79, 73, 77),
782 (73, 46, 77), (80, 79, 51), (80, 74, 79), (74, 47, 79), (81, 80, 51),
783 (81, 75, 80), (75, 48, 80), (78, 81, 51), (78, 76, 81), (76, 49, 81),
784 (87, 4, 2, 88), (88, 2, 0, 89), (86, 6, 4, 87), (85, 8, 6, 86), (84, 10, 8, 85),
785 (83, 12, 10, 84), (82, 14, 12, 83), (89, 0, 14, 82), (94, 95, 91, 90), (95, 96, 92, 91),
786 (96, 97, 93, 92), (98, 101, 105, 102), (90, 91, 92, 93), (97, 96, 95, 94), (98, 99, 94, 90),
787 (100, 101, 93, 97), (99, 100, 97, 94), (101, 98, 90, 93), (104, 103, 102, 105), (100, 99, 103, 104),
788 (101, 100, 104, 105), (99, 98, 102, 103)]
790 mesh = bpy.data.meshes.new(objname)
791 myobject = bpy.data.objects.new(objname, mesh)
793 myobject.location = bpy.context.scene.cursor.location
794 bpy.context.collection.objects.link(myobject)
796 mesh.from_pydata(myvertex, [], myfaces)
797 mesh.update(calc_edges=True)
799 return myobject
802 # ------------------------------------------------------------
803 # Generate strings for venetian
805 # objName: Object name
806 # height: height
807 # ------------------------------------------------------------
808 def get_venetian_strings(objname, height):
809 # ------------------------------------
810 # Mesh data
811 # ------------------------------------
812 minx = -0.006897219456732273
813 maxx = 0.006897197104990482
814 maxy = 1.57160684466362e-08
815 minz = -height
816 maxz = 0
818 # Vertex
819 myvertex = [(maxx - 0.004941887455061078, -0.005041633266955614, minz + 3.1925737857818604e-05),
820 (maxx - 0.005070153623819351, -0.004731120076030493, minz + 4.9524009227752686e-05),
821 (maxx - 0.005380495102144778, -0.004602177534252405, minz + 5.389750003814697e-05),
822 (maxx - 0.005691118887625635, -0.00473033869639039, minz + 4.2498111724853516e-05),
823 (maxx - 0.005820065038278699, -0.005040528252720833, minz + 2.1979212760925293e-05),
824 (maxx - 0.005691798985935748, -0.005351040977984667, minz + 4.380941390991211e-06),
825 (maxx - 0.005381457391194999, -0.0054799835197627544, minz),
826 (maxx - 0.005070833722129464, -0.005351822357624769, minz + 1.1406838893890381e-05),
827 (maxx - 0.005004765349440277, -0.005394590552896261, minz + 0.029493853449821472),
828 (maxx - 0.005133012658916414, -0.005083992145955563, minz + 0.02950144186615944),
829 (maxx - 0.005443348782137036, -0.004955026786774397, minz + 0.029502809047698975),
830 (maxx - 0.005753983394242823, -0.005083239171653986, minz + 0.02949715033173561),
831 (maxx - 0.0058829509653151035, -0.005393524654209614, minz + 0.02948778122663498),
832 (maxx - 0.005754703655838966, -0.005704122595489025, minz + 0.029480192810297012),
833 (maxx - 0.005444367183372378, -0.005833088420331478, minz + 0.029478825628757477),
834 (maxx - 0.005133732687681913, -0.005704876501113176, minz + 0.02948448434472084),
835 (maxx - 0.005029367166571319, -0.005440863780677319, maxz - 0.029401594772934914),
836 (maxx - 0.005157589330337942, -0.005130413919687271, maxz - 0.029417745769023895),
837 (maxx - 0.005467916373163462, -0.005001509562134743, maxz - 0.029425399377942085),
838 (maxx - 0.005778562976047397, -0.0051296609453856945, maxz - 0.029420070350170135),
839 (maxx - 0.005907556158490479, -0.00543979974463582, maxz - 0.029404880478978157),
840 (maxx - 0.005779333529062569, -0.005750249605625868, maxz - 0.029388729482889175),
841 (maxx - 0.005469006602652371, -0.005879154894500971, maxz - 0.029381075873970985),
842 (maxx - 0.005158359999768436, -0.0057510025799274445, maxz - 0.029386404901742935),
843 (maxx - 0.00503770902287215, -0.005161902867257595, maxz - 0.015295670367777348),
844 (maxx - 0.00516585458535701, -0.004854197148233652, maxz - 0.015373632311820984),
845 (maxx - 0.005476148682646453, -0.00472648162394762, maxz - 0.01540757529437542),
846 (maxx - 0.0057868254370987415, -0.004853568039834499, maxz - 0.015377615578472614),
847 (maxx - 0.005915894289501011, -0.005161012522876263, maxz - 0.015301303938031197),
848 (maxx - 0.0057877483777701855, -0.005468717776238918, maxz - 0.015223342925310135),
849 (maxx - 0.005477453931234777, -0.005596434231847525, maxz - 0.01518939808011055),
850 (maxx - 0.005166777293197811, -0.005469346884638071, maxz - 0.01521935872733593),
851 (maxx - 0.0050518905045464635, -0.004537198692560196, maxz - 0.007016266230493784),
852 (maxx - 0.0051788275595754385, -0.004260011948645115, maxz - 0.007274628151208162),
853 (maxx - 0.005488568218424916, -0.004146246705204248, maxz - 0.007390326354652643),
854 (maxx - 0.005799670936539769, -0.004262544680386782, maxz - 0.007295588497072458),
855 (maxx - 0.005929895443841815, -0.004540780559182167, maxz - 0.007045908365398645),
856 (maxx - 0.0058029580395668745, -0.004817967768758535, maxz - 0.006787544582039118),
857 (maxx - 0.005493217264302075, -0.004931733012199402, maxz - 0.006671848241239786),
858 (maxx - 0.005182114546187222, -0.004815434105694294, maxz - 0.006766586098819971),
859 (maxx - 0.005094519350677729, -0.0035386907402426004, maxz - 0.003334574867039919),
860 (maxx - 0.005213141208514571, -0.0034136706963181496, maxz - 0.0038649537600576878),
861 (maxx - 0.005518985213711858, -0.003371135564520955, maxz - 0.004107045475393534),
862 (maxx - 0.0058328923769295216, -0.0034360019490122795, maxz - 0.003919033799320459),
863 (maxx - 0.005970980157144368, -0.003570271423086524, maxz - 0.003411055076867342),
864 (maxx - 0.005852358415722847, -0.003695291467010975, maxz - 0.002880676183849573),
865 (maxx - 0.005546514177694917, -0.0037378265988081694, maxz - 0.002638584468513727),
866 (maxx - 0.005232607247307897, -0.003672960214316845, maxz - 0.0028265961445868015),
867 (maxx - 0.005944175529293716, -0.0036394987255334854, maxz - 0.003126396331936121),
868 (maxx - 0.005875613423995674, -0.00560829509049654, maxz - 0.02939625270664692),
869 (maxx - 0.005034194211475551, -0.005343204364180565, maxz - 0.021542727947235107),
870 (maxx - 0.005612890352495015, -0.00580073706805706, minz + 0.029478538781404495),
871 (maxx - 0.0052128632087260485, -0.005448057781904936, minz + 3.8817524909973145e-06),
872 (maxx - 0.005320212687365711, -0.004174317233264446, maxz - 0.007358333561569452),
873 (maxx - 0.005857669049873948, -0.005254213232547045, minz + 0.01586836576461792),
874 (maxx - 0.005270682042464614, -0.002958775730803609, maxz - 0.0018540903693065047),
875 (maxx - 0.004973854636773467, -0.004873105324804783, minz + 4.190206527709961e-05),
876 (maxx - 0.005896858056075871, -0.0043898820877075195, maxz - 0.007182727102190256),
877 (maxx - 0.005644757067784667, -0.004758160561323166, maxz - 0.015400669537484646),
878 (maxx - 0.0050204748986288905, -0.0054572150111198425, maxz - 0.03902619704604149),
879 (maxx - 0.005107744364067912, -0.004944739863276482, minz + 0.01588994264602661),
880 (maxx - 0.005821454804390669, -0.004324669484049082, maxz - 0.004334418568760157),
881 (maxx - 0.0058509946102276444, -0.00556210009381175, minz + 0.029483404010534286),
882 (maxx - 0.004974223440513015, -0.005210080184042454, minz + 2.121180295944214e-05),
883 (maxx - 0.005512951058335602, -0.004414208233356476, maxz - 0.004156060982495546),
884 (maxx - 0.005657264497131109, -0.004175691865384579, maxz - 0.007369710598140955),
885 (maxx - 0.005083143012598157, -0.004386562388390303, maxz - 0.007155258674174547),
886 (maxx - 0.005898642586544156, -0.004691417329013348, maxz - 0.006906915921717882),
887 (maxx - 0.005482866894453764, -0.005316956900060177, maxz - 0.010308705270290375),
888 (maxx - 0.005200946354307234, -0.004315671045333147, maxz - 0.004297847393900156),
889 (maxx - 0.005883492063730955, -0.004994065500795841, maxz - 0.015342974103987217),
890 (maxx - 0.0055490892846137285, -0.004634103272110224, minz + 5.002319812774658e-05),
891 (maxx - 0.005586991785094142, -0.002982017118483782, maxz - 0.0016202632104977965),
892 (maxx - 0.005500998347997665, -0.0037720794789493084, maxz - 0.005249096546322107),
893 (maxx - 0.0056365174241364, -0.005033436696976423, maxz - 0.029424406588077545),
894 (maxx - 0.0051623902982100844, -0.0050335354171693325, maxz - 0.021582692861557007),
895 (maxx - 0.005850603571161628, -0.005225026980042458, minz + 0.029492609202861786),
896 (maxx - 0.005787728703580797, -0.0048720804043114185, minz + 3.269314765930176e-05),
897 (maxx - 0.005192494718357921, -0.003861617762595415, maxz - 0.005070738960057497),
898 (maxx - 0.005163213470950723, -0.005652572028338909, maxz - 0.021503763273358345),
899 (maxx - 0.005460095009766519, -0.005895696114748716, maxz - 0.039026711136102676),
900 (maxx - 0.005661572678945959, -0.004903662484139204, maxz - 0.006703841034322977),
901 (maxx - 0.005856060888618231, -0.002980045508593321, maxz - 0.003230756614357233),
902 (maxx - 0.005036721588112414, -0.005226014647632837, minz + 0.029498230665922165),
903 (maxx - 0.005933607462793589, -0.0034987321123480797, maxz - 0.0036901147104799747),
904 (maxx - 0.005068209487944841, -0.0040867808274924755, maxz - 0.004676718730479479),
905 (maxx - 0.005645966622978449, -0.005564413033425808, maxz - 0.015198467299342155),
906 (maxx - 0.005149454576894641, -0.005767486989498138, maxz - 0.03902563825249672),
907 (maxx - 0.0050617282977327704, -0.005609281826764345, maxz - 0.029393207281827927),
908 (maxx - 0.005539751029573381, -0.0029568036552518606, maxz - 0.0034645837731659412),
909 (maxx - 0.005688222707249224, -0.003390622790902853, maxz - 0.00406796345487237),
910 (maxx - 0.005419071996584535, -0.005693721119314432, minz + 0.0158514603972435),
911 (maxx - 0.005788097972981632, -0.005209055729210377, minz + 1.1995434761047363e-05),
912 (maxx - 0.005069609847851098, -0.004994889721274376, maxz - 0.015337754040956497),
913 (maxx - 0.005299395183101296, -0.0050338455475866795, maxz - 0.029423145577311516),
914 (maxx - 0.005729411728680134, -0.005564768332988024, minz + 0.015854761004447937),
915 (maxx - 0.005889465333893895, -0.002997873816639185, maxz - 0.0019266236340627074),
916 (maxx - 0.00523727759718895, -0.002940947189927101, maxz - 0.0031582233496010303),
917 (maxx - 0.005883992882445455, -0.0053280252031981945, maxz - 0.015259221196174622),
918 (maxx - 0.005637527909129858, -0.0058468179777264595, maxz - 0.029383329674601555),
919 (maxx - 0.0060009173466823995, -0.002997057046741247, maxz - 0.0025937133468687534),
920 (maxx - 0.00581300281919539, -0.0038706157356500626, maxz - 0.005107311997562647),
921 (maxx - 0.005784186767414212, -0.005651846993714571, maxz - 0.02150617726147175),
922 (maxx - 0.005061309668235481, -0.005272367969155312, maxz - 0.02941022254526615),
923 (maxx - 0.00535176380071789, -0.0033784990664571524, maxz - 0.004038602579385042),
924 (maxx - 0.005131891928613186, -0.0036102300509810448, maxz - 0.0030555170960724354),
925 (maxx - 0.0059457405004650354, -0.004099506419152021, maxz - 0.004728438798338175),
926 (maxx - 0.005791432806290686, -0.004595593549311161, maxz - 0.010660232976078987),
927 (maxx - 0.005473870667628944, -0.005780417006462812, maxz - 0.021488623693585396),
928 (maxx - 0.005108443321660161, -0.005565532948821783, minz + 0.01586039364337921),
929 (maxx - 0.005042683565989137, -0.00489416578784585, maxz - 0.01050524227321148),
930 (maxx - 0.0053004054352641106, -0.005847226828336716, maxz - 0.029382066801190376),
931 (maxx - 0.005324521102011204, -0.004902287386357784, maxz - 0.006692463997751474),
932 (maxx - 0.0053076359909027815, -0.00475850235670805, maxz - 0.015398506075143814),
933 (maxx - 0.005770427291281521, -0.005766738206148148, maxz - 0.03902877867221832),
934 (maxx - 0.005377276800572872, -0.0037183398380875587, maxz - 0.0026776683516800404),
935 (maxx - 0.005898662726394832, -0.005456155631691217, maxz - 0.03903063386678696),
936 (maxx - 0.005084927543066442, -0.004688097629696131, maxz - 0.006879445631057024),
937 (maxx - 0.005037112743593752, -0.0055630882270634174, minz + 0.029489029198884964),
938 (maxx - 0.0050701110158115625, -0.0053288498893380165, maxz - 0.015254000201821327),
939 (maxx - 0.005418083746917546, -0.004815786611288786, minz + 0.01589323580265045),
940 (maxx - 0.005308845662511885, -0.0055647543631494045, maxz - 0.015196305699646473),
941 (maxx - 0.0054806380067020655, -0.0044716945849359035, maxz - 0.010715048760175705),
942 (maxx - 0.005459042498841882, -0.005017674993723631, maxz - 0.03903011977672577),
943 (maxx - 0.00571373593993485, -0.0037304633297026157, maxz - 0.0027070273645222187),
944 (maxx - 0.005125825526192784, -0.0029417641926556826, maxz - 0.002491133753210306),
945 (maxx - 0.005783363711088896, -0.005032809916883707, maxz - 0.02158510498702526),
946 (maxx - 0.005121324211359024, -0.003469463437795639, maxz - 0.00361923361197114),
947 (maxx - 0.005170495598576963, -0.0045953672379255295, maxz - 0.010650848969817162),
948 (maxx - 0.005611946457065642, -0.004986968822777271, minz + 0.02950076386332512),
949 (maxx - 0.005769683048129082, -0.005145883187651634, maxz - 0.03903118893504143),
950 (maxx - 0.004979487042874098, -0.005255294498056173, minz + 0.01587633788585663),
951 (maxx - 0.005172071512788534, -0.005193057470023632, maxz - 0.010363521054387093),
952 (maxx - 0.005793009069748223, -0.005193284247070551, maxz - 0.010372905060648918),
953 (maxx - 0.005875195027329028, -0.005271381698548794, maxz - 0.029413267970085144),
954 (maxx - 0.005472706281580031, -0.004904965870082378, maxz - 0.02160024456679821),
955 (maxx - 0.0052757697412744164, -0.0058011459186673164, minz + 0.029480870813131332),
956 (maxx - 0.0057287130039185286, -0.004943975247442722, minz + 0.01588430255651474),
957 (maxx - 0.0051487102173268795, -0.0051466329023242, maxz - 0.03902805224061012),
958 (maxx - 0.005920821567997336, -0.004894486162811518, maxz - 0.0105185117572546),
959 (maxx - 0.005912382970564067, -0.005342178046703339, maxz - 0.021546142175793648),
960 (maxx - 0.005211971350945532, -0.004634527489542961, minz + 5.383789539337158e-05),
961 (maxx - 0.005274825729429722, -0.004987378139048815, minz + 0.029503092169761658),
962 (maxx - 0.005549981025978923, -0.0054476335644721985, minz + 6.705522537231445e-08),
963 (maxx - 0.005011449102312326, -0.005086742807179689, minz + 0.01588405668735504),
964 (maxx - 0.005249560461379588, -0.004848137032240629, minz + 0.01589324325323105),
965 (maxx - 0.005586679908446968, -0.004847722128033638, minz + 0.015890181064605713),
966 (maxx - 0.005825327709317207, -0.005085740704089403, minz + 0.01587667316198349),
967 (maxx - 0.005825707106851041, -0.005422765389084816, minz + 0.015860632061958313),
968 (maxx - 0.005587595398537815, -0.005661370232701302, minz + 0.0158514603972435),
969 (maxx - 0.005250476184301078, -0.005661786068230867, minz + 0.015854522585868835),
970 (maxx - 0.005011828150600195, -0.005423767026513815, minz + 0.01586802303791046),
971 (maxx - 0.0050524246180430055, -0.00528864748775959, maxz - 0.03902701288461685),
972 (maxx - 0.005290519911795855, -0.005050024017691612, maxz - 0.03902914375066757),
973 (maxx - 0.005627641920000315, -0.005049617029726505, maxz - 0.03903084620833397),
974 (maxx - 0.005866308696568012, -0.005287665408104658, maxz - 0.03903112933039665),
975 (maxx - 0.005866712890565395, -0.005624723620712757, maxz - 0.039029818028211594),
976 (maxx - 0.005628617363981903, -0.005863346625119448, maxz - 0.03902768716216087),
977 (maxx - 0.0052914953557774425, -0.005863754078745842, maxz - 0.03902598097920418),
978 (maxx - 0.005052828579209745, -0.005625705700367689, maxz - 0.03902570158243179),
979 (maxx - 0.005066122743301094, -0.005175130441784859, maxz - 0.02156427875161171),
980 (maxx - 0.005304188118316233, -0.004937214311212301, maxz - 0.021595504134893417),
981 (maxx - 0.0056413100101053715, -0.004936820361763239, maxz - 0.021596813574433327),
982 (maxx - 0.005880007753148675, -0.005174180027097464, maxz - 0.021567441523075104),
983 (maxx - 0.005880454205907881, -0.005510250572115183, maxz - 0.021524591371417046),
984 (maxx - 0.0056423889473080635, -0.005748167168349028, maxz - 0.021493365988135338),
985 (maxx - 0.005305267055518925, -0.005748561583459377, maxz - 0.02149205468595028),
986 (maxx - 0.005066569661721587, -0.005511201918125153, maxz - 0.02152142859995365),
987 (maxx - 0.005074405577033758, -0.004731936380267143, maxz - 0.010583722963929176),
988 (maxx - 0.005312168272212148, -0.004502579569816589, maxz - 0.01069762371480465),
989 (maxx - 0.005649270839057863, -0.004502702970057726, maxz - 0.010702718049287796),
990 (maxx - 0.0058882435550913215, -0.004732233472168446, maxz - 0.010596020147204399),
991 (maxx - 0.005889098974876106, -0.0050567155703902245, maxz - 0.010440031066536903),
992 (maxx - 0.005651336396113038, -0.005286071915179491, maxz - 0.010326128453016281),
993 (maxx - 0.005314233829267323, -0.005285948980599642, maxz - 0.010321034118533134),
994 (maxx - 0.0050752609968185425, -0.005056418012827635, maxz - 0.01042773388326168),
995 (maxx - 0.005098042776808143, -0.003963995724916458, maxz - 0.004888410214334726),
996 (maxx - 0.005333001143299043, -0.0037931459955871105, maxz - 0.005199151579290628),
997 (maxx - 0.005669870879501104, -0.003798031248152256, maxz - 0.0052190073765814304),
998 (maxx - 0.005911318236030638, -0.003975789062678814, maxz - 0.004936345387250185),
999 (maxx - 0.005915906862355769, -0.004222291521728039, maxz - 0.004516747314482927),
1000 (maxx - 0.0056809482630342245, -0.004393140785396099, maxz - 0.004206005949527025),
1001 (maxx - 0.0053440784104168415, -0.004388255998492241, maxz - 0.0041861520148813725),
1002 (maxx - 0.005102631403133273, -0.004210498183965683, maxz - 0.004468812141567469),
1003 (maxx - 0.005148796364665031, -0.0029389490373432636, maxz - 0.002848892007023096),
1004 (maxx - 0.005373513558879495, -0.0029471139423549175, maxz - 0.0033773710019886494),
1005 (maxx - 0.005709447083063424, -0.0029683399479836226, maxz - 0.003416749183088541),
1006 (maxx - 0.005959811387583613, -0.002990193199366331, maxz - 0.002943959552794695),
1007 (maxx - 0.0059779464500024915, -0.002999872202053666, maxz - 0.0022359550930559635),
1008 (maxx - 0.005753229022957385, -0.0029917070642113686, maxz - 0.0017074759816750884),
1009 (maxx - 0.005417295498773456, -0.0029704810585826635, maxz - 0.0016680978005751967),
1010 (maxx - 0.0051669314270839095, -0.002948627807199955, maxz - 0.0021408875472843647),
1011 (minx + 0.006793352426029742, -0.005108049139380455, minz + 0.00023909658193588257),
1012 (minx + 0.0066346460953354836, -0.004723844584077597, minz + 0.00025669485330581665),
1013 (minx + 0.006250653299503028, -0.004564301110804081, minz + 0.00026106834411621094),
1014 (minx + 0.00586631172336638, -0.0047228774055838585, minz + 0.0002496689558029175),
1015 (minx + 0.005706763477064669, -0.005106681492179632, minz + 0.00022915005683898926),
1016 (minx + 0.005865469924174249, -0.005490886978805065, minz + 0.00021155178546905518),
1017 (minx + 0.006249462720006704, -0.005650430452078581, minz + 0.00020717084407806396),
1018 (minx + 0.006633804412558675, -0.005491853225976229, minz + 0.00021857768297195435),
1019 (minx + 0.006715552299283445, -0.005544771905988455, minz + 0.029701028019189835),
1020 (minx + 0.00655686913523823, -0.005160461645573378, minz + 0.0297086164355278),
1021 (minx + 0.006172882916871458, -0.005000889301300049, minz + 0.029709983617067337),
1022 (minx + 0.005788527661934495, -0.0051595289260149, minz + 0.029704324901103973),
1023 (minx + 0.005628953338600695, -0.005543452687561512, minz + 0.02969495579600334),
1024 (minx + 0.005787636619061232, -0.005927762482315302, minz + 0.029687367379665375),
1025 (minx + 0.0061716228374280035, -0.006087335292249918, minz + 0.02968600019812584),
1026 (minx + 0.006555978092364967, -0.005928694736212492, minz + 0.029691658914089203),
1027 (minx + 0.006685112020932138, -0.005602027289569378, maxz - 0.0291944220662117),
1028 (minx + 0.006526459823362529, -0.005217899568378925, maxz - 0.029210573062300682),
1029 (minx + 0.0061424848972819746, -0.005058403126895428, maxz - 0.029218226671218872),
1030 (minx + 0.005758114974014461, -0.00521696824580431, maxz - 0.029212897643446922),
1031 (minx + 0.005598508752882481, -0.005600709468126297, maxz - 0.029197707772254944),
1032 (minx + 0.005757161183282733, -0.005984836723655462, maxz - 0.029181556776165962),
1033 (minx + 0.006141135876532644, -0.0061443340964615345, maxz - 0.029173903167247772),
1034 (minx + 0.006525505916215479, -0.005985768511891365, maxz - 0.029179232195019722),
1035 (minx + 0.00667479052208364, -0.005256861448287964, maxz - 0.015088497661054134),
1036 (minx + 0.006516232970170677, -0.0048761311918497086, maxz - 0.01516645960509777),
1037 (minx + 0.006132298905868083, -0.0047181048430502415, maxz - 0.015200402587652206),
1038 (minx + 0.005747891729697585, -0.004875352140516043, maxz - 0.015170442871749401),
1039 (minx + 0.005588191794231534, -0.005255760159343481, maxz - 0.015094131231307983),
1040 (minx + 0.005746749578975141, -0.005636490881443024, maxz - 0.015016170218586922),
1041 (minx + 0.006130683759693056, -0.005794517230242491, maxz - 0.014982225373387337),
1042 (minx + 0.006515091052278876, -0.005637269467115402, maxz - 0.015012186020612717),
1043 (minx + 0.006657243531662971, -0.004483901429921389, maxz - 0.0068090930581092834),
1044 (minx + 0.0065001812763512135, -0.004140931181609631, maxz - 0.007067454978823662),
1045 (minx + 0.006116931792348623, -0.004000166896730661, maxz - 0.007183153182268143),
1046 (minx + 0.005731997545808554, -0.004144065547734499, maxz - 0.007088415324687958),
1047 (minx + 0.005570868030190468, -0.004488333128392696, maxz - 0.006838735193014145),
1048 (minx + 0.005727930460125208, -0.004831302911043167, maxz - 0.006580371409654617),
1049 (minx + 0.006111179769504815, -0.004972067661583424, maxz - 0.006464675068855286),
1050 (minx + 0.006496114016044885, -0.004828169010579586, maxz - 0.006559412926435471),
1051 (minx + 0.006604497611988336, -0.0032484245020896196, maxz - 0.0031274016946554184),
1052 (minx + 0.006457724317442626, -0.003093734150752425, maxz - 0.0036577805876731873),
1053 (minx + 0.006079296523239464, -0.003041104646399617, maxz - 0.003899872303009033),
1054 (minx + 0.005690891877748072, -0.003121365327388048, maxz - 0.003711860626935959),
1055 (minx + 0.0055200329516083, -0.003287500236183405, maxz - 0.0032038819044828415),
1056 (minx + 0.005666806362569332, -0.003442190121859312, maxz - 0.0026735030114650726),
1057 (minx + 0.006045234156772494, -0.0034948198590427637, maxz - 0.0024314112961292267),
1058 (minx + 0.006433638744056225, -0.0034145594108849764, maxz - 0.002619422972202301),
1059 (minx + 0.005553199094720185, -0.003373156301677227, maxz - 0.0029192231595516205),
1060 (minx + 0.005638031987473369, -0.005809193942695856, maxz - 0.029189079999923706),
1061 (minx + 0.006679139332845807, -0.005481190048158169, maxz - 0.021335555240511894),
1062 (minx + 0.005963105417322367, -0.0060473051853477955, minz + 0.029685713350772858),
1063 (minx + 0.0064580682083033025, -0.005610927473753691, minz + 0.00021105259656906128),
1064 (minx + 0.006325242109596729, -0.004034899175167084, maxz - 0.007151160389184952),
1065 (minx + 0.005660235299728811, -0.0053710793145000935, minz + 0.016075536608695984),
1066 (minx + 0.00638652773341164, -0.002530882600694895, maxz - 0.001646917313337326),
1067 (minx + 0.006753799156285822, -0.004899526014924049, minz + 0.0002490729093551636),
1068 (minx + 0.005611745989881456, -0.004301622975617647, maxz - 0.006975553929805756),
1069 (minx + 0.005923676071688533, -0.004757302813231945, maxz - 0.015193496830761433),
1070 (minx + 0.006696114782243967, -0.00562225840985775, maxz - 0.038819022476673126),
1071 (minx + 0.006588134099729359, -0.004988160915672779, minz + 0.016097113490104675),
1072 (minx + 0.0057050439063459635, -0.004220933653414249, maxz - 0.004127245396375656),
1073 (minx + 0.005668493686243892, -0.005752034951001406, minz + 0.02969057857990265),
1074 (minx + 0.006753342226147652, -0.005316472612321377, minz + 0.0002283826470375061),
1075 (minx + 0.00608676258707419, -0.0043317219242453575, maxz - 0.003948887810111046),
1076 (minx + 0.005908200400881469, -0.004036600701510906, maxz - 0.0071625374257564545),
1077 (minx + 0.006618573679588735, -0.004297514911741018, maxz - 0.006948085501790047),
1078 (minx + 0.005609537824057043, -0.004674719180911779, maxz - 0.006699742749333382),
1079 (minx + 0.0061239866190589964, -0.005448713432997465, maxz - 0.010101532563567162),
1080 (minx + 0.006472813023719937, -0.004209799692034721, maxz - 0.0040906742215156555),
1081 (minx + 0.00562828395050019, -0.005049192346632481, maxz - 0.015135801397264004),
1082 (minx + 0.006042047869414091, -0.004603803623467684, minz + 0.00025719404220581055),
1083 (minx + 0.005995150306262076, -0.002559639746323228, maxz - 0.0014130901545286179),
1084 (minx + 0.006101552047766745, -0.0035372015554457903, maxz - 0.005041923373937607),
1085 (minx + 0.005933871027082205, -0.005097907967865467, maxz - 0.029217233881354332),
1086 (minx + 0.006520519149489701, -0.005098029971122742, maxz - 0.021375520154833794),
1087 (minx + 0.005668977275490761, -0.005334966816008091, minz + 0.02969978377223015),
1088 (minx + 0.005746773676946759, -0.004898258484899998, minz + 0.00023986399173736572),
1089 (minx + 0.006483270728494972, -0.0036479895934462547, maxz - 0.0048635657876729965),
1090 (minx + 0.006519501097500324, -0.005863978061825037, maxz - 0.021296590566635132),
1091 (minx + 0.00615216267760843, -0.006164800841361284, maxz - 0.038819536566734314),
1092 (minx + 0.00590286951046437, -0.004937335848808289, maxz - 0.0064966678619384766),
1093 (minx + 0.005662225186824799, -0.0025571994483470917, maxz - 0.0030235834419727325),
1094 (minx + 0.00667601206805557, -0.0053361887112259865, minz + 0.029705405235290527),
1095 (minx + 0.005566274747252464, -0.0031989826820790768, maxz - 0.0034829415380954742),
1096 (minx + 0.006637051934376359, -0.0039265891537070274, maxz - 0.004469545558094978),
1097 (minx + 0.005922179203480482, -0.005754896439611912, maxz - 0.014991294592618942),
1098 (minx + 0.006536525208503008, -0.006006165407598019, maxz - 0.03881846368312836),
1099 (minx + 0.006645070854574442, -0.005810413975268602, maxz - 0.029186034575104713),
1100 (minx + 0.006053602788597345, -0.0025284423027187586, maxz - 0.0032574106007814407),
1101 (minx + 0.005869895336218178, -0.0030652163550257683, maxz - 0.0038607902824878693),
1102 (minx + 0.0062029213877394795, -0.005914892535656691, minz + 0.016058631241321564),
1103 (minx + 0.005746316979639232, -0.005315205082297325, minz + 0.00021916627883911133),
1104 (minx + 0.006635318568442017, -0.005050212610512972, maxz - 0.015130581334233284),
1105 (minx + 0.006350999989081174, -0.005098414141684771, maxz - 0.029215972870588303),
1106 (minx + 0.005818931153044105, -0.00575533602386713, minz + 0.016061931848526),
1107 (minx + 0.005620893090963364, -0.002579259453341365, maxz - 0.0017194505780935287),
1108 (minx + 0.0064278600621037185, -0.0025088228285312653, maxz - 0.00295105017721653),
1109 (minx + 0.005627664038911462, -0.00546240946277976, maxz - 0.015052048489451408),
1110 (minx + 0.005932620842941105, -0.006104323081672192, maxz - 0.02917615696787834),
1111 (minx + 0.0054829909931868315, -0.0025782485026866198, maxz - 0.002386540174484253),
1112 (minx + 0.005715501611120999, -0.003659122856333852, maxz - 0.004900138825178146),
1113 (minx + 0.005751156946644187, -0.005863080266863108, maxz - 0.021299004554748535),
1114 (minx + 0.006645588902756572, -0.005393543280661106, maxz - 0.029203049838542938),
1115 (minx + 0.006286203453782946, -0.0030502157751470804, maxz - 0.0038314294070005417),
1116 (minx + 0.00655825569992885, -0.0033369415905326605, maxz - 0.002848343923687935),
1117 (minx + 0.005551262525841594, -0.003942334558814764, maxz - 0.004521265625953674),
1118 (minx + 0.0057421906385570765, -0.004556154832243919, maxz - 0.010453060269355774),
1119 (minx + 0.00613511772826314, -0.006022163201123476, maxz - 0.021281450986862183),
1120 (minx + 0.0065872694831341505, -0.005756282713264227, minz + 0.016067564487457275),
1121 (minx + 0.006668635527603328, -0.0049255844205617905, maxz - 0.010298069566488266),
1122 (minx + 0.006349750037770718, -0.006104828789830208, maxz - 0.029174894094467163),
1123 (minx + 0.006319911277387291, -0.0049356333911418915, maxz - 0.006485290825366974),
1124 (minx + 0.0063408034620806575, -0.004757725168019533, maxz - 0.015191333368420601),
1125 (minx + 0.00576818163972348, -0.006005238275974989, maxz - 0.03882160410284996),
1126 (minx + 0.0062546354020014405, -0.0034707081504166126, maxz - 0.00247049517929554),
1127 (minx + 0.00560951279476285, -0.005620947107672691, maxz - 0.038823459297418594),
1128 (minx + 0.006616365630179644, -0.004670611582696438, maxz - 0.0066722724586725235),
1129 (minx + 0.0066755281295627356, -0.005753257777541876, minz + 0.029696203768253326),
1130 (minx + 0.006634698482230306, -0.005463429726660252, maxz - 0.015046827495098114),
1131 (minx + 0.006204143981449306, -0.004828604869544506, minz + 0.016100406646728516),
1132 (minx + 0.006339306535664946, -0.005755319260060787, maxz - 0.01498913299292326),
1133 (minx + 0.006126744614448398, -0.004402851220220327, maxz - 0.010507876053452492),
1134 (minx + 0.006153465015813708, -0.005078405141830444, maxz - 0.03882294520735741),
1135 (minx + 0.005838327226229012, -0.003485708963125944, maxz - 0.002499854192137718),
1136 (minx + 0.00656576210167259, -0.0025098335463553667, maxz - 0.0022839605808258057),
1137 (minx + 0.005752174882218242, -0.005097132176160812, maxz - 0.021377932280302048),
1138 (minx + 0.006571331556187943, -0.003162768203765154, maxz - 0.0034120604395866394),
1139 (minx + 0.006510490493383259, -0.00455587450414896, maxz - 0.010443676263093948),
1140 (minx + 0.005964273179415613, -0.005040412303060293, minz + 0.02970793843269348),
1141 (minx + 0.005769102484919131, -0.005237040109932423, maxz - 0.038824014365673065),
1142 (minx + 0.006746829953044653, -0.005372417625039816, minz + 0.016083508729934692),
1143 (minx + 0.0065085404785349965, -0.0052954102866351604, maxz - 0.01015634834766388),
1144 (minx + 0.005740240449085832, -0.005295691080391407, maxz - 0.010165732353925705),
1145 (minx + 0.0056385500356554985, -0.005392322316765785, maxz - 0.02920609526336193),
1146 (minx + 0.006136558135040104, -0.004938947968184948, maxz - 0.021393071860074997),
1147 (minx + 0.006380232633091509, -0.006047811824828386, minz + 0.029688045382499695),
1148 (minx + 0.005819795769639313, -0.0049872142262756824, minz + 0.016091473400592804),
1149 (minx + 0.006537446053698659, -0.00523796770721674, maxz - 0.03882087767124176),
1150 (minx + 0.005582095473073423, -0.004925980698317289, maxz - 0.010311339050531387),
1151 (minx + 0.005592536414042115, -0.005479920189827681, maxz - 0.021338969469070435),
1152 (minx + 0.0064591713598929346, -0.00460432842373848, minz + 0.00026100873947143555),
1153 (minx + 0.006381400395184755, -0.005040918942540884, minz + 0.02971026673913002),
1154 (minx + 0.006040944659616798, -0.005610402673482895, minz + 0.00020723789930343628),
1155 (minx + 0.006707282620482147, -0.005163864698261023, minz + 0.016091227531433105),
1156 (minx + 0.006412662158254534, -0.004868632182478905, minz + 0.016100414097309113),
1157 (minx + 0.005995536455884576, -0.004868118558079004, minz + 0.016097351908683777),
1158 (minx + 0.0057002517860382795, -0.005162625107914209, minz + 0.016083844006061554),
1159 (minx + 0.005699782632291317, -0.005579632706940174, minz + 0.016067802906036377),
1160 (minx + 0.0059944032109342515, -0.005874865222722292, minz + 0.016058631241321564),
1161 (minx + 0.00641152891330421, -0.005875378847122192, minz + 0.0160616934299469),
1162 (minx + 0.0067068132339045405, -0.005580872762948275, minz + 0.016075193881988525),
1163 (minx + 0.006656582350842655, -0.00541368592530489, maxz - 0.03881983831524849),
1164 (minx + 0.00636198150459677, -0.005118431523442268, maxz - 0.03882196918129921),
1165 (minx + 0.005944853066466749, -0.005117928143590689, maxz - 0.03882367163896561),
1166 (minx + 0.005649544997140765, -0.005412471015006304, maxz - 0.03882395476102829),
1167 (minx + 0.005649045226164162, -0.005829520057886839, maxz - 0.03882264345884323),
1168 (minx + 0.005943646072410047, -0.006124773994088173, maxz - 0.03882051259279251),
1169 (minx + 0.00636077462695539, -0.00612527783960104, maxz - 0.038818806409835815),
1170 (minx + 0.00665608246345073, -0.005830735433846712, maxz - 0.03881852701306343),
1171 (minx + 0.006639633560553193, -0.005273229442536831, maxz - 0.021357106044888496),
1172 (minx + 0.006345069617964327, -0.004978850018233061, maxz - 0.021388331428170204),
1173 (minx + 0.00592794077238068, -0.00497836247086525, maxz - 0.021389640867710114),
1174 (minx + 0.005632595275528729, -0.005272052250802517, maxz - 0.02136026881635189),
1175 (minx + 0.005632042535580695, -0.0056878807954490185, maxz - 0.021317418664693832),
1176 (minx + 0.005926606128923595, -0.005982260685414076, maxz - 0.021286193281412125),
1177 (minx + 0.0063437349162995815, -0.005982748232781887, maxz - 0.021284881979227066),
1178 (minx + 0.006639080471359193, -0.0056890579871833324, maxz - 0.021314255893230438),
1179 (minx + 0.006629384937696159, -0.004724854603409767, maxz - 0.010376550257205963),
1180 (minx + 0.006335195794235915, -0.004441066179424524, maxz - 0.010490451008081436),
1181 (minx + 0.0059180911630392075, -0.004441218450665474, maxz - 0.010495545342564583),
1182 (minx + 0.005622404860332608, -0.004725221544504166, maxz - 0.010388847440481186),
1183 (minx + 0.005621346062980592, -0.005126711446791887, maxz - 0.01023285835981369),
1184 (minx + 0.0059155350318178535, -0.005410499405115843, maxz - 0.010118955746293068),
1185 (minx + 0.0063326399540528655, -0.005410346668213606, maxz - 0.010113861411809921),
1186 (minx + 0.006628326023928821, -0.005126343574374914, maxz - 0.010220561176538467),
1187 (minx + 0.006600138149224222, -0.0037746636662632227, maxz - 0.004681237041950226),
1188 (minx + 0.006309418939054012, -0.0035632678773254156, maxz - 0.004991978406906128),
1189 (minx + 0.005892602261155844, -0.0035693119280040264, maxz - 0.00501183420419693),
1190 (minx + 0.005593853886239231, -0.0037892560940235853, maxz - 0.0047291722148656845),
1191 (minx + 0.005588176427409053, -0.004094259347766638, maxz - 0.004309574142098427),
1192 (minx + 0.005878895753994584, -0.004305655136704445, maxz - 0.003998832777142525),
1193 (minx + 0.006295712431892753, -0.00429961085319519, maxz - 0.003978978842496872),
1194 (minx + 0.006594460690394044, -0.004079666920006275, maxz - 0.004261638969182968),
1195 (minx + 0.006537339504575357, -0.002506350167095661, maxz - 0.0026417188346385956),
1196 (minx + 0.006259291782043874, -0.0025164526887238026, maxz - 0.003170197829604149),
1197 (minx + 0.005843633785843849, -0.0025427164509892464, maxz - 0.0032095760107040405),
1198 (minx + 0.005533852614462376, -0.0025697555392980576, maxz - 0.0027367863804101944),
1199 (minx + 0.005511413444764912, -0.0025817318819463253, maxz - 0.002028781920671463),
1200 (minx + 0.005789461429230869, -0.0025716288946568966, maxz - 0.0015003029257059097),
1201 (minx + 0.006205119309015572, -0.0025453658308833838, maxz - 0.001460924744606018),
1202 (minx + 0.0065149005386047065, -0.0025183262769132853, maxz - 0.0019337143748998642),
1203 (minx, -0.0013792915269732475, maxz - 0.005334946792572737),
1204 (minx + 4.656612873077393e-10, maxy, maxz - 0.005334946792572737),
1205 (maxx, maxy - 4.423782229423523e-09, maxz - 0.005334946792572737),
1206 (maxx, -0.0013792961835861206, maxz - 0.005334946792572737),
1207 (minx, -0.0013792915269732475, maxz - 1.5133991837501526e-08),
1208 (minx + 4.656612873077393e-10, maxy, maxz - 1.5133991837501526e-08),
1209 (maxx, maxy - 4.423782229423523e-09, maxz - 1.5133991837501526e-08),
1210 (maxx, -0.0013792961835861206, maxz - 1.5133991837501526e-08),
1211 (minx + 0.0011832499876618385, -0.0013792921090498567, maxz - 0.00447732862085104),
1212 (minx + 0.0011832499876618385, -0.0013792921090498567, maxz - 0.0008576327236369252),
1213 (maxx - 0.0011832499876618385, -0.0013792957179248333, maxz - 0.0008576327236369252),
1214 (maxx - 0.0011832499876618385, -0.0013792957179248333, maxz - 0.00447732862085104),
1215 (minx + 0.0011832504533231258, -0.0007798965089023113, maxz - 0.00447732862085104),
1216 (minx + 0.0011832504533231258, -0.0007798965089023113, maxz - 0.0008576327236369252),
1217 (maxx - 0.0011832495220005512, -0.0007799001759849489, maxz - 0.0008576327236369252),
1218 (maxx - 0.0011832495220005512, -0.0007799001759849489, maxz - 0.00447732862085104),
1219 (minx + 0.004529597237706184, -0.0007973873289301991, maxz - 0.0044512152671813965),
1220 (minx + 0.004529597237706184, -0.0007973873289301991, maxz - 0.0008894965285435319),
1221 (minx + 0.004144799197092652, -0.001563245547004044, maxz - 0.0044512152671813965),
1222 (minx + 0.004144799197092652, -0.001563245547004044, maxz - 0.0008894965285435319),
1223 (minx + 0.0032158144749701023, -0.0018804739229381084, maxz - 0.0044512152671813965),
1224 (minx + 0.0032158144749701023, -0.0018804739229381084, maxz - 0.0008894965285435319),
1225 (minx + 0.0022868295200169086, -0.0015632447320967913, maxz - 0.0044512152671813965),
1226 (minx + 0.0022868295200169086, -0.0015632447320967913, maxz - 0.0008894965285435319),
1227 (minx + 0.0019020326435565948, -0.0007973865140229464, maxz - 0.0044512152671813965),
1228 (minx + 0.0019020326435565948, -0.0007973865140229464, maxz - 0.0008894965285435319),
1229 (maxx - 0.001917288638651371, -0.0007973890169523656, maxz - 0.0044512152671813965),
1230 (maxx - 0.001917288638651371, -0.0007973890169523656, maxz - 0.0008894965285435319),
1231 (maxx - 0.0023020864464342594, -0.0015632474096491933, maxz - 0.0044512152671813965),
1232 (maxx - 0.0023020864464342594, -0.0015632474096491933, maxz - 0.0008894965285435319),
1233 (maxx - 0.0032310718670487404, -0.0018804756691679358, maxz - 0.0044512152671813965),
1234 (maxx - 0.0032310718670487404, -0.0018804756691679358, maxz - 0.0008894965285435319),
1235 (maxx - 0.00416005658917129, -0.0015632465947419405, maxz - 0.0044512152671813965),
1236 (maxx - 0.00416005658917129, -0.0015632465947419405, maxz - 0.0008894965285435319),
1237 (maxx - 0.0045448546297848225, -0.0007973880274221301, maxz - 0.0044512152671813965),
1238 (maxx - 0.0045448546297848225, -0.0007973880274221301, maxz - 0.0008894965285435319)]
1240 # Faces
1241 myfaces = [(0, 56, 144, 131), (0, 131, 151, 63), (1, 141, 145, 60), (1, 60, 144, 56), (2, 71, 146, 120),
1242 (2, 120, 145, 141), (3, 77, 147, 137), (3, 137, 146, 71), (4, 92, 148, 54), (4, 54, 147, 77),
1243 (5, 143, 149, 95), (5, 95, 148, 92), (6, 52, 150, 91), (6, 91, 149, 143), (7, 63, 151, 109),
1244 (7, 109, 150, 52), (8, 131, 144, 83), (8, 83, 152, 59), (8, 59, 159, 118), (8, 118, 151, 131),
1245 (9, 60, 145, 142), (9, 142, 153, 138), (9, 138, 152, 83), (9, 83, 144, 60), (10, 120, 146, 129),
1246 (10, 129, 154, 123), (10, 123, 153, 142), (10, 142, 145, 120), (11, 137, 147, 76), (11, 76, 155, 130),
1247 (11, 130, 154, 129), (11, 129, 146, 137), (12, 54, 148, 62), (12, 62, 156, 116), (12, 116, 155, 76),
1248 (12, 76, 147, 54), (13, 95, 149, 51), (13, 51, 157, 114), (13, 114, 156, 62), (13, 62, 148, 95),
1249 (14, 91, 150, 136), (14, 136, 158, 80), (14, 80, 157, 51), (14, 51, 149, 91), (15, 109, 151, 118),
1250 (15, 118, 159, 87), (15, 87, 158, 136), (15, 136, 150, 109), (16, 59, 152, 103), (16, 103, 160, 50),
1251 (16, 50, 167, 88), (16, 88, 159, 59), (17, 138, 153, 94), (17, 94, 161, 75), (17, 75, 160, 103),
1252 (17, 103, 152, 138), (18, 123, 154, 74), (18, 74, 162, 135), (18, 135, 161, 94), (18, 94, 153, 123),
1253 (19, 130, 155, 134), (19, 134, 163, 126), (19, 126, 162, 74), (19, 74, 154, 130), (20, 116, 156, 49),
1254 (20, 49, 164, 140), (20, 140, 163, 134), (20, 134, 155, 116), (21, 114, 157, 99), (21, 99, 165, 102),
1255 (21, 102, 164, 49), (21, 49, 156, 114), (22, 80, 158, 111), (22, 111, 166, 108), (22, 108, 165, 99),
1256 (22, 99, 157, 80), (23, 87, 159, 88), (23, 88, 167, 79), (23, 79, 166, 111), (23, 111, 158, 87),
1257 (24, 50, 160, 93), (24, 93, 168, 110), (24, 110, 175, 119), (24, 119, 167, 50), (25, 75, 161, 113),
1258 (25, 113, 169, 128), (25, 128, 168, 93), (25, 93, 160, 75), (26, 135, 162, 58), (26, 58, 170, 122),
1259 (26, 122, 169, 113), (26, 113, 161, 135), (27, 126, 163, 70), (27, 70, 171, 107), (27, 107, 170, 58),
1260 (27, 58, 162, 126), (28, 140, 164, 98), (28, 98, 172, 139), (28, 139, 171, 70), (28, 70, 163, 140),
1261 (29, 102, 165, 86), (29, 86, 173, 133), (29, 133, 172, 98), (29, 98, 164, 102), (30, 108, 166, 121),
1262 (30, 121, 174, 68), (30, 68, 173, 86), (30, 86, 165, 108), (31, 79, 167, 119), (31, 119, 175, 132),
1263 (31, 132, 174, 121), (31, 121, 166, 79), (32, 110, 168, 66), (32, 66, 176, 85), (32, 85, 183, 117),
1264 (32, 117, 175, 110), (33, 128, 169, 53), (33, 53, 177, 78), (33, 78, 176, 66), (33, 66, 168, 128),
1265 (34, 122, 170, 65), (34, 65, 178, 73), (34, 73, 177, 53), (34, 53, 169, 122), (35, 107, 171, 57),
1266 (35, 57, 179, 101), (35, 101, 178, 65), (35, 65, 170, 107), (36, 139, 172, 67), (36, 67, 180, 106),
1267 (36, 106, 179, 57), (36, 57, 171, 139), (37, 133, 173, 81), (37, 81, 181, 61), (37, 61, 180, 67),
1268 (37, 67, 172, 133), (38, 68, 174, 112), (38, 112, 182, 64), (38, 64, 181, 81), (38, 81, 173, 68),
1269 (39, 132, 175, 117), (39, 117, 183, 69), (39, 69, 182, 112), (39, 112, 174, 132), (40, 85, 176, 127),
1270 (40, 127, 184, 125), (40, 125, 191, 105), (40, 105, 183, 85), (41, 78, 177, 104), (41, 104, 185, 97),
1271 (41, 97, 184, 127), (41, 127, 176, 78), (42, 73, 178, 90), (42, 90, 186, 89), (42, 89, 185, 104),
1272 (42, 104, 177, 73), (43, 101, 179, 84), (43, 84, 187, 82), (43, 82, 186, 90), (43, 90, 178, 101),
1273 (44, 106, 180, 48), (44, 48, 188, 100), (44, 100, 187, 84), (44, 84, 179, 106), (45, 61, 181, 124),
1274 (45, 124, 189, 96), (45, 96, 188, 48), (45, 48, 180, 61), (46, 64, 182, 115), (46, 115, 190, 72),
1275 (46, 72, 189, 124), (46, 124, 181, 64), (47, 69, 183, 105), (47, 105, 191, 55), (47, 55, 190, 115),
1276 (47, 115, 182, 69), (192, 248, 336, 323), (192, 323, 343, 255),
1277 (193, 333, 337, 252), (193, 252, 336, 248),
1278 (194, 263, 338, 312), (194, 312, 337, 333), (195, 269, 339, 329),
1279 (195, 329, 338, 263), (196, 284, 340, 246),
1280 (196, 246, 339, 269), (197, 335, 341, 287), (197, 287, 340, 284),
1281 (198, 244, 342, 283), (198, 283, 341, 335),
1282 (199, 255, 343, 301), (199, 301, 342, 244), (200, 323, 336, 275),
1283 (200, 275, 344, 251), (200, 251, 351, 310),
1284 (200, 310, 343, 323), (201, 252, 337, 334), (201, 334, 345, 330),
1285 (201, 330, 344, 275), (201, 275, 336, 252),
1286 (202, 312, 338, 321), (202, 321, 346, 315), (202, 315, 345, 334),
1287 (202, 334, 337, 312), (203, 329, 339, 268),
1288 (203, 268, 347, 322), (203, 322, 346, 321), (203, 321, 338, 329),
1289 (204, 246, 340, 254), (204, 254, 348, 308),
1290 (204, 308, 347, 268), (204, 268, 339, 246), (205, 287, 341, 243),
1291 (205, 243, 349, 306), (205, 306, 348, 254),
1292 (205, 254, 340, 287), (206, 283, 342, 328), (206, 328, 350, 272),
1293 (206, 272, 349, 243), (206, 243, 341, 283),
1294 (207, 301, 343, 310), (207, 310, 351, 279), (207, 279, 350, 328),
1295 (207, 328, 342, 301), (208, 251, 344, 295),
1296 (208, 295, 352, 242), (208, 242, 359, 280), (208, 280, 351, 251),
1297 (209, 330, 345, 286), (209, 286, 353, 267),
1298 (209, 267, 352, 295), (209, 295, 344, 330), (210, 315, 346, 266),
1299 (210, 266, 354, 327), (210, 327, 353, 286),
1300 (210, 286, 345, 315), (211, 322, 347, 326), (211, 326, 355, 318),
1301 (211, 318, 354, 266), (211, 266, 346, 322),
1302 (212, 308, 348, 241), (212, 241, 356, 332), (212, 332, 355, 326),
1303 (212, 326, 347, 308), (213, 306, 349, 291),
1304 (213, 291, 357, 294), (213, 294, 356, 241), (213, 241, 348, 306),
1305 (214, 272, 350, 303), (214, 303, 358, 300),
1306 (214, 300, 357, 291), (214, 291, 349, 272), (215, 279, 351, 280),
1307 (215, 280, 359, 271), (215, 271, 358, 303),
1308 (215, 303, 350, 279), (216, 242, 352, 285), (216, 285, 360, 302),
1309 (216, 302, 367, 311), (216, 311, 359, 242),
1310 (217, 267, 353, 305), (217, 305, 361, 320), (217, 320, 360, 285),
1311 (217, 285, 352, 267), (218, 327, 354, 250),
1312 (218, 250, 362, 314), (218, 314, 361, 305), (218, 305, 353, 327),
1313 (219, 318, 355, 262), (219, 262, 363, 299),
1314 (219, 299, 362, 250), (219, 250, 354, 318), (220, 332, 356, 290),
1315 (220, 290, 364, 331), (220, 331, 363, 262),
1316 (220, 262, 355, 332), (221, 294, 357, 278), (221, 278, 365, 325),
1317 (221, 325, 364, 290), (221, 290, 356, 294),
1318 (222, 300, 358, 313), (222, 313, 366, 260), (222, 260, 365, 278),
1319 (222, 278, 357, 300), (223, 271, 359, 311),
1320 (223, 311, 367, 324), (223, 324, 366, 313), (223, 313, 358, 271),
1321 (224, 302, 360, 258), (224, 258, 368, 277),
1322 (224, 277, 375, 309), (224, 309, 367, 302), (225, 320, 361, 245),
1323 (225, 245, 369, 270), (225, 270, 368, 258),
1324 (225, 258, 360, 320), (226, 314, 362, 257), (226, 257, 370, 265),
1325 (226, 265, 369, 245), (226, 245, 361, 314),
1326 (227, 299, 363, 249), (227, 249, 371, 293), (227, 293, 370, 257),
1327 (227, 257, 362, 299), (228, 331, 364, 259),
1328 (228, 259, 372, 298), (228, 298, 371, 249), (228, 249, 363, 331),
1329 (229, 325, 365, 273), (229, 273, 373, 253),
1330 (229, 253, 372, 259), (229, 259, 364, 325), (230, 260, 366, 304),
1331 (230, 304, 374, 256), (230, 256, 373, 273),
1332 (230, 273, 365, 260), (231, 324, 367, 309), (231, 309, 375, 261),
1333 (231, 261, 374, 304), (231, 304, 366, 324),
1334 (232, 277, 368, 319), (232, 319, 376, 317), (232, 317, 383, 297),
1335 (232, 297, 375, 277), (233, 270, 369, 296),
1336 (233, 296, 377, 289), (233, 289, 376, 319), (233, 319, 368, 270),
1337 (234, 265, 370, 282), (234, 282, 378, 281),
1338 (234, 281, 377, 296), (234, 296, 369, 265), (235, 293, 371, 276),
1339 (235, 276, 379, 274), (235, 274, 378, 282),
1340 (235, 282, 370, 293), (236, 298, 372, 240), (236, 240, 380, 292),
1341 (236, 292, 379, 276), (236, 276, 371, 298),
1342 (237, 253, 373, 316), (237, 316, 381, 288), (237, 288, 380, 240),
1343 (237, 240, 372, 253), (238, 256, 374, 307),
1344 (238, 307, 382, 264), (238, 264, 381, 316), (238, 316, 373, 256),
1345 (239, 261, 375, 297), (239, 297, 383, 247),
1346 (239, 247, 382, 307), (239, 307, 374, 261), (388, 389, 385, 384),
1347 (389, 390, 386, 385), (390, 391, 387, 386),
1348 (392, 395, 399, 396), (384, 385, 386, 387), (391, 390, 389, 388),
1349 (392, 393, 388, 384), (394, 395, 387, 391),
1350 (393, 394, 391, 388), (395, 392, 384, 387), (398, 397, 396, 399),
1351 (394, 393, 397, 398), (395, 394, 398, 399),
1352 (393, 392, 396, 397), (400, 401, 403, 402), (402, 403, 405, 404),
1353 (404, 405, 407, 406), (406, 407, 409, 408),
1354 (410, 411, 413, 412), (412, 413, 415, 414), (414, 415, 417, 416), (416, 417, 419, 418)]
1356 mesh = bpy.data.meshes.new(objname)
1357 myobject = bpy.data.objects.new(objname, mesh)
1359 myobject.location = bpy.context.scene.cursor.location
1360 bpy.context.collection.objects.link(myobject)
1362 mesh.from_pydata(myvertex, [], myfaces)
1363 mesh.update(calc_edges=True)
1365 return myobject
1368 # ------------------------------------------------------------------------------
1369 # Create bezier curve
1370 # ------------------------------------------------------------------------------
1371 def create_bezier(objname, points, origin, depth=0.001, fill='FULL'):
1372 curvedata = bpy.data.curves.new(name=objname, type='CURVE')
1373 curvedata.dimensions = '3D'
1374 curvedata.fill_mode = fill
1375 curvedata.bevel_resolution = 5
1376 curvedata.bevel_depth = depth
1378 myobject = bpy.data.objects.new(objname, curvedata)
1379 myobject.location = origin
1381 bpy.context.collection.objects.link(myobject)
1383 polyline = curvedata.splines.new('BEZIER')
1384 polyline.bezier_points.add(len(points) - 1)
1386 for idx, (knot, h1, h2) in enumerate(points):
1387 point = polyline.bezier_points[idx]
1388 point.co = knot
1389 point.handle_left = h1
1390 point.handle_right = h2
1391 point.handle_left_type = 'FREE'
1392 point.handle_right_type = 'FREE'
1394 return myobject