56 clr.set_use_colors(OPT[
'useColors'])
60 print(clr.END + clr.BOLD + clr.VIOLET +
"-------------------------------------------")
61 print(clr.END + clr.BOLD + clr.VIOLET +
" MercuryDPM clump generation tool ")
62 print(clr.END + clr.BOLD + clr.VIOLET +
"-------------------------------------------")
65 if (len(sys.argv) == 3):
66 if (sys.argv[1] ==
"-m"):
67 OPT[
'mode'] =
int(sys.argv[2])
70 OPT[
'useNumba'] = OPT[
'useNumba']
and NumbaInstalled
73 if (OPT[
'verbose']):
print(clr.END + clr.BOLD + clr.GREEN +
"Just in time compilation is enabled")
75 if (OPT[
'verbose']):
print(clr.END + clr.BOLD + clr.RED +
"Just in time compilation is disabled, voxel grid computations may be slow")
82 if (OPT[
'verbose']): out +=
": clump input from the list of pebbles, inertial properties via summation over pebbles"
83 print(clr.BOLD + clr.GREEN + out)
85 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Loading pebble configuration..." + clr.BLUE)
87 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
91 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Computing inertial properties..." + clr.BLUE)
93 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
96 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Output clump data..." + clr.BLUE)
98 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
103 if (OPT[
'verbose']): out +=
": clump input from the list of pebbles, inertial properties are via voxel grid"
104 print(clr.BOLD + clr.GREEN + out)
106 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Loading pebble configuration..." + clr.BLUE)
108 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
114 from Src.InertiaComputationsVoxelGrid
import ComputeInertiaFromVoxelGrid
115 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Computing inertial properties..." + clr.BLUE)
117 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
120 from Src.InertiaComputationsVoxelGridNonumba
import compute_inertia_from_voxel_grid_nonumba
121 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Computing inertial properties..." + clr.BLUE)
122 OPT, DATA = compute_inertia_from_voxel_grid_nonumba(OPT, DATA)
123 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
127 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Output clump data..." + clr.BLUE)
129 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
135 out +=
": external clump generation, inertial properties from stl"
136 print(clr.BOLD + clr.GREEN + out)
139 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Loading stl configuration..." + clr.BLUE)
141 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
144 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Loading pebble configuration..." + clr.BLUE)
146 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
150 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Computing inertial properties..." + clr.BLUE)
152 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
156 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Output clump data..." + clr.BLUE)
158 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
163 out +=
": generation of stl sequence for Blender"
164 print(clr.BOLD + clr.GREEN + out)
167 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Loading stl configuration..." + clr.BLUE)
169 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
172 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Loading pebble configuration..." + clr.BLUE)
174 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
178 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Computing inertial properties..." + clr.BLUE)
180 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
184 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Saving stl sequence..." + clr.BLUE)
186 if (OPT[
'verbose']):
print(clr.BOLD + clr.YELLOW +
"Done")
Definition: Baseline.py:1
def ComputeInertiaMixed(OPT, DATA)
Definition: InertiaComputationsMixed.py:155
def ComputeInertiaFromPebbles(OPT, DATA)
Definition: InertiaComputationsPebbles.py:96
def ComputeInertiaFromVoxelGrid(OPT, DATA)
Definition: InertiaComputationsVoxelGrid.py:98
def main()
Definition: MClump.py:50
def OutputClumpData(OPT, DATA)
Definition: OutputData.py:120
def SaveStlSequence(OPT, DATA)
Definition: SaveToStl.py:157