SebKuzminsky / pycam

Other
338 stars 99 forks source link

3 small improvements #184

Open nseinlet opened 3 years ago

nseinlet commented 3 years ago

3 small improvements I use daily to handle stl which comes out of openscad designs.

petterreinholdtsen commented 2 years ago

Why is the check for zero-length/short-lengh lines removed? It seem a bit risky.

nseinlet commented 2 years ago

the check is removed because models produced in openscad with high $fn, like $fn = 200;cylinder(r=2,h=10,center=true); are unusable in pycam.

petterreinholdtsen commented 2 years ago

[SEINLET Nicolas]

the check is removed because models produced in openscad with high $fn, like $fn = 200;cylinder(r=2,h=10,center=true); are unusable in pycam.

Aha. Why not reduce the epsilon instead? I assume the length is not zero?

-- Happy hacking Petter Reinholdtsen

petterreinholdtsen commented 2 years ago

[SEINLET Nicolas]

the check is removed because models produced in openscad with high $fn, like $fn = 200;cylinder(r=2,h=10,center=true); are unusable in pycam.

What exactly is the line length with such $fn here?

I find 'epsilon = 0.00001' in pycam/Geometry/init.py. If I understand the cylinder correctly, it got radius 2 and the circle will be split into 200 segments. Each segment would them be approximately 2 3.14159 2 /200 = .0628318, which is way above epsilon. Did I misunderstand the issue?

-- Happy hacking Petter Reinholdtsen

petterreinholdtsen commented 2 years ago

@nseinlet Btw, do you have an example STL file demonstrating the problem, and perhaps the openscad file used to generate it?

nseinlet commented 2 years ago

I'll reproduce the issue and upload file and Traceback.