@@ -25,7 +25,7 @@ class Program
25
25
private static bool COLOR ;
26
26
private static bool MESH_SKIP_CAPTURE ;
27
27
28
- private static float SCALE = 1 ;
28
+ private static float GRID_SIZE = 10 ;
29
29
private static int HEIGHT_MAP = 1 ;
30
30
private static int COLOR_LIMIT = 256 ;
31
31
private static int MESH_SEGMENT_X = 4 ;
@@ -52,7 +52,7 @@ public static void Main(string[] args)
52
52
{ "msub|mesh-subsample=" , "set the number of subsample (for MeshSampler)" , ( int v ) => MESH_SUBSAMPLE = v } ,
53
53
{ "mskip" , "skip the capturing points part and load the previous PLY (for MeshSampler)" , v => MESH_SKIP_CAPTURE = v != null } ,
54
54
{ "p|palette=" , "set the palette" , v => INPUT_PALETTE_FILE = v } ,
55
- { "sc|scale =" , "set the scale " , ( float v ) => SCALE = v } ,
55
+ { "gs|grid-size =" , "set the grid-size " , ( float v ) => GRID_SIZE = v } ,
56
56
{ "d|debug" , "enable the debug mode" , v => Schematic . DEBUG = v != null } ,
57
57
} ;
58
58
@@ -138,8 +138,8 @@ private static void CheckArguments()
138
138
throw new ArgumentNullException ( "[ERROR] Missing required option: --i" ) ;
139
139
if ( OUTPUT_PATH == null )
140
140
throw new ArgumentNullException ( "[ERROR] Missing required option: --o" ) ;
141
- if ( SCALE <= 0 )
142
- throw new ArgumentException ( "[ERROR] --scale argument must be positive" ) ;
141
+ if ( GRID_SIZE < 10 || GRID_SIZE > Schematic . MAX_WORLD_LENGTH )
142
+ throw new ArgumentException ( "[ERROR] --grid-size argument must be greater than 10 and smaller than " + Schematic . MAX_WORLD_LENGTH ) ;
143
143
if ( HEIGHT_MAP < 1 )
144
144
throw new ArgumentException ( "[ERROR] --heightmap argument must be positive" ) ;
145
145
if ( COLOR_LIMIT < 0 || COLOR_LIMIT > 256 )
@@ -162,8 +162,8 @@ private static void DisplayArguments()
162
162
Console . WriteLine ( "[INFO] Specified shaders file: " + INPUT_SHADER_FILE ) ;
163
163
if ( COLOR_LIMIT != 256 )
164
164
Console . WriteLine ( "[INFO] Specified color limit: " + COLOR_LIMIT ) ;
165
- if ( SCALE != 1 )
166
- Console . WriteLine ( "[INFO] Specified increase size: " + SCALE ) ;
165
+ if ( GRID_SIZE != 10 )
166
+ Console . WriteLine ( "[INFO] Specified grid size: " + GRID_SIZE ) ;
167
167
if ( Schematic . CHUNK_SIZE != 128 )
168
168
Console . WriteLine ( "[INFO] Specified chunk size: " + Schematic . CHUNK_SIZE ) ;
169
169
if ( EXCAVATE )
@@ -247,26 +247,26 @@ private static AbstractToSchematic GetConverter(string path)
247
247
case ".binvox" :
248
248
return new BinvoxToSchematic ( path ) ;
249
249
case ".csv" :
250
- return new CSVToSchematic ( path , SCALE , COLOR_LIMIT ) ;
250
+ return new CSVToSchematic ( path , GRID_SIZE , COLOR_LIMIT ) ;
251
251
case ".ply" :
252
- return new PLYToSchematic ( path , SCALE , COLOR_LIMIT ) ;
252
+ return new PLYToSchematic ( path , GRID_SIZE , COLOR_LIMIT ) ;
253
253
case ".png" :
254
254
return new PNGToSchematic ( path , INPUT_COLOR_FILE , HEIGHT_MAP , EXCAVATE , COLOR , COLOR_LIMIT ) ;
255
255
case ".qb" :
256
256
return new QBToSchematic ( path ) ;
257
257
case ".schematic" :
258
- return new SchematicToSchematic ( path , EXCAVATE , SCALE ) ;
258
+ return new SchematicToSchematic ( path , EXCAVATE ) ;
259
259
case ".tif" :
260
260
return new TIFtoSchematic ( path , INPUT_COLOR_FILE , HEIGHT_MAP , EXCAVATE , COLOR , COLOR_LIMIT ) ;
261
261
case ".xyz" :
262
- return new XYZToSchematic ( path , SCALE , COLOR_LIMIT ) ;
262
+ return new XYZToSchematic ( path , GRID_SIZE , COLOR_LIMIT ) ;
263
263
case ".json" :
264
264
return new JsonToSchematic ( path ) ;
265
265
case ".vox" :
266
266
return new VoxToSchematic ( path ) ;
267
267
case ".obj" :
268
268
case ".fbx" :
269
- return new MeshToSchematic ( path , SCALE , COLOR_LIMIT , MESH_SEGMENT_X , MESH_SEGMENT_Y , MESH_SUBSAMPLE , MESH_SKIP_CAPTURE ) ;
269
+ return new MeshToSchematic ( path , GRID_SIZE , COLOR_LIMIT , MESH_SEGMENT_X , MESH_SEGMENT_Y , MESH_SUBSAMPLE , MESH_SKIP_CAPTURE ) ;
270
270
default :
271
271
return null ;
272
272
}
0 commit comments