nicolai-wachenschwan / arc-overhang-prusaslicer-integration

A 3D printer slicing algorithm that lets you print 90° overhangs without support material.
GNU General Public License v3.0
334 stars 26 forks source link

int/float issue #60

Closed Dragonkinn02 closed 11 months ago

Dragonkinn02 commented 1 year ago

https://github.com/nicolai-wachenschwan/arc-overhang-prusaslicer-integration/blame/549fcd23e6e4645cb0d48cc8d6c2830f41f5c985/prusa_slicer_post_processing_script.py#L841

Python312\lib\random throws float type cast issue, resolution may be: random.randint(1,int(1e10)))

nicolai-wachenschwan commented 1 year ago

Thank you, will implement that!

MrBarbie commented 11 months ago

Can confirm this works. Before it was throwing the error below Traceback (most recent call last): File "***\3D Printing\ArcOverhangs\prusa_slicer_post_processing_script.py", line 840, in <module> class BridgeInfill(): File "***\3D Printing\ArcOverhangs\prusa_slicer_post_processing_script.py", line 841, in BridgeInfill def __init__(self,pts=[],id=random.randint(1,1e10)) -> None: ^^^^^^^^^^^^^^^^^^^^^^ File "***\AppData\Local\Programs\Python\Python312\Lib\random.py", line 336, in randint return self.randrange(a, b+1) ^^^^^^^^^^^^^^^^^^^^^^ File "***\AppData\Local\Programs\Python\Python312\Lib\random.py", line 312, in randrange istop = _index(stop) ^^^^^^^^^^^^ TypeError: 'float' object cannot be interpreted as an integer

nicolai-wachenschwan commented 11 months ago

took a while, but is implemented, thank you for suggesting that fix!