tweaks
This commit is contained in:
@@ -70,6 +70,7 @@ module MoonModel
|
||||
def derive!
|
||||
nozzle = Float(data["nozzle_mm"])
|
||||
shell = data["shell"]
|
||||
shell["interior"] ||= "solid"
|
||||
shell["wall_mm"] ||= 4.0 * nozzle
|
||||
shell["inlay_depth_mm"] ||= 2.0 * nozzle
|
||||
shell["minimum_feature_mm"] ||= 2.0 * nozzle
|
||||
@@ -84,6 +85,7 @@ module MoonModel
|
||||
raise ArgumentError, "build volume requires three positive dimensions" unless build_volume.length == 3 && build_volume.all?(&:positive?)
|
||||
raise ArgumentError, "purpose must be display or box" unless %w[display box].include?(self["purpose"])
|
||||
raise ArgumentError, "assembly must be auto, one_piece, or eight_piece" unless %w[auto one_piece eight_piece].include?(self["assembly"])
|
||||
raise ArgumentError, "shell interior must be solid or hollow" unless %w[solid hollow].include?(self["shell"]["interior"])
|
||||
raise ArgumentError, "unsupported stand style" unless self["stand"]["style"] == "orbital_triskelion"
|
||||
raise ArgumentError, "stand base clearance must be nonnegative" if Float(self["stand"]["base_clearance_mm"]).negative?
|
||||
raise ArgumentError, "palette must contain at least one color" if self["palette"].empty?
|
||||
|
||||
Reference in New Issue
Block a user