Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

garbage added to solid name #233

Open
hramrach opened this issue Mar 24, 2025 · 1 comment
Open

garbage added to solid name #233

hramrach opened this issue Mar 24, 2025 · 1 comment

Comments

@hramrach
Copy link

Version: 3.2.0

Repeatedly opening and saving the same file extends solid name ad absurdum.

The original model name is obtained as binary string, and instead of printing as is it's converted with repr.

@@ -1,4 +1,4 @@
-solid b"b'OpenSCAD_Model'"
+solid b'b'b\'b"b\\\'OpenSCAD_Model\\\'"\'''
facet normal 0.000003 2.012162 -3.765519
outer loop
vertex -21.940001 23.424000 0.114181
@@ -77069,4 +77069,4 @@ facet normal 0.000000 26.125145 0.000000
vertex 9.940000 -34.549999 32.525501
endloop
endfacet
-endsolid b"b'OpenSCAD_Model'"
+endsolid b'b'b\'b"b\\\'OpenSCAD_Model\\\'"\'''

@hramrach
Copy link
Author

p('solid {}'.format(str(name,errors='replace')), file=fh) seems to work correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant