Skip to content

Commit 4add8eb

Browse files
committed
add limits for all numeric parameters
1 parent 50a5fe1 commit 4add8eb

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

  • customizer/src/obs_case_customizer

customizer/src/obs_case_customizer/app.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -263,22 +263,22 @@ class CustomVariables(BaseModel):
263263
MainCase_top_rider: bool = True
264264
MainCase_back_rider_cable: bool = True
265265
MainCase_top_rider_cable: bool = True
266-
m3_screw_diameter_tight: float = 3
267-
m3_screw_diameter_loose: float = 3.25
268-
m3_insert_hole_diameter: float = 4
269-
m3_hex_nut_diameter: float = Field(6, title='The height in cm', ge=5, le=6)
270-
SeatPostMount_angle: float = 20
271-
SeatPostMount_diameter: float = 28
272-
SeatPostMount_length: float = 20
273-
HandlebarRail_tube_radius: float = 18
274-
DisplayCaseTop_pcb_width: float = 26.5
275-
DisplayCaseTop_pcb_height: float = 27.2
276-
DisplayCaseTop_pcb_standoff: float = 1.7
277-
extrude_width: float = 0.46
266+
m3_screw_diameter_tight: float = Field(3, title='diameter in mm', ge=2.6, le=3.6)
267+
m3_screw_diameter_loose: float = Field(3.25, title='in mm', ge=2.9, le=3.7)
268+
m3_insert_hole_diameter: float = Field(4, title='in mm', ge=3.5, le=5.6)
269+
m3_hex_nut_diameter: float = Field(6, title='in mm', ge=5, le=6)
270+
SeatPostMount_angle: float = Field(20, title='in mm', ge=0, le=60)
271+
SeatPostMount_diameter: float = Field(28, title='in mm', ge=15, le=35)
272+
SeatPostMount_length: float = Field(20, title='in mm', ge=15, le=120)
273+
HandlebarRail_tube_radius: float = Field(18, title='in mm', ge=10, le=30)
274+
DisplayCaseTop_pcb_width: float = Field(26.5, title='in mm', ge=25, le=29)
275+
DisplayCaseTop_pcb_height: float = Field(27.2, title='in mm', ge=25, le=29)
276+
DisplayCaseTop_pcb_standoff: float = Field(1.7, title='in mm', ge=0.5, le=2)
277+
extrude_width: float = Field(0.46, title='in mm', ge=0.15, le=1)
278278
enable_easy_print: bool = True
279279
enable_text: bool = True
280-
layer_height: float = 0.2
281-
default_clearance: float = 0.2
280+
layer_height: float = Field(0.2, title='in mm', ge=0.04, le=0.5)
281+
default_clearance: float = Field(0.2, title='in mm', ge=-0.01, le=0.5)
282282
orient_for_printing: bool = True
283283

284284

0 commit comments

Comments
 (0)