Renders of some parts rotated to make identification easier.
fixing_block, rear_fixing_block, atx_short_bracket and z_bar_clamp.
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 113 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 123 KiB |
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 113 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 123 KiB |
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 106 KiB |
13
utils/viz.py
@ -1,10 +1,20 @@
|
||||
import bpy
|
||||
import sys
|
||||
import os
|
||||
import math
|
||||
|
||||
global ob
|
||||
global cam_target
|
||||
mat = 'abs'
|
||||
|
||||
rotations = {
|
||||
"fixing_block.stl" : 180,
|
||||
"rear_fixing_block.stl" : 180,
|
||||
"atx_short_bracket.stl" : -90,
|
||||
"z_bar_clamp.stl" : 180
|
||||
}
|
||||
|
||||
|
||||
def load_stl(file_path):
|
||||
global cam_target,ob
|
||||
# load
|
||||
@ -24,6 +34,9 @@ def load_stl(file_path):
|
||||
# place
|
||||
z_dim = ob.dimensions[2]
|
||||
print(z_dim)
|
||||
filename = file_path.split(os.sep)[-1]
|
||||
if filename in rotations:
|
||||
bpy.ops.transform.rotate(value = rotations[filename] * math.pi / 180.0, axis = (False, False, True))
|
||||
bpy.ops.transform.translate(value=(0,0,z_dim/2.0))
|
||||
cam_target = (0,0,z_dim/3.0)
|
||||
# assign material
|
||||
|