sree314 / stepcvt

Generate STL files for 3D printing from STEP files
2 stars 0 forks source link

A5 #21

Closed Asai-Yume closed 8 months ago

Asai-Yume commented 8 months ago

I still have some issues which seem to be some errors with the functions in partinfo, so I do not want to close the issue just yet

Asai-Yume commented 8 months ago

I think the code has too much Windows-specific stuff like drive names.

If I remove the codes to accomodate the windows system, the tests wouldn't pass. Should we allow some sort of parameters to modify the paths? Or is there something I'm missing here?

sree314 commented 8 months ago

Use the as_posix function for the slashes. I think removing the drive is necessary, not sure why it doesn't get removed in to_relative(). I think the tests may need some modifications, but reading Pathlib documentation may provide some better ideas that don't result in Windows- or Linux-specific code.

Asai-Yume commented 8 months ago

Use the as_posix function for the slashes. I think removing the drive is necessary, not sure why it doesn't get removed in to_relative(). I think the tests may need some modifications, but reading Pathlib documentation may provide some better ideas that don't result in Windows- or Linux-specific code.

Yes, using the as_posix function did resolve the problems for slashes. I think what needed to be done is using a PurePath object rather than a Path object. Though I'm still unsure what to do with the from_dict function, since I'm manually padding a drive to the path for windows users, and I do not see functions in the documentation that does that.

sree314 commented 8 months ago

Don't add C: -- that's wrong even on Windows when multiple drives are used.