Skip to content

Conversation

@gsohler
Copy link
Member

@gsohler gsohler commented Nov 21, 2023

Squashed commit of all my changes

@Matthieu-LAURENT39
Copy link

Matthieu-LAURENT39 commented Nov 22, 2023

Really nice, hope this gets merged!
Seems like i was a bit too late to work some more on the fork '^^

@bandtank
Copy link

Man this really needs to be merged. It is painful to keep up with changes while still enabling Python. Thank you for the hard work.

@Matthieu-LAURENT39
Copy link

Also, i just noticed when going through the changes, but when squashing you can use Co-authored-by: in your commit message to mention all authors that worked on something.

Personally i don't really care about having attribution, but it's good practice so i thought i'd mention it ;)

@gsohler
Copy link
Member Author

gsohler commented Nov 27, 2023 via email

@Matthieu-LAURENT39
Copy link

Matthieu-LAURENT39 commented Nov 27, 2023

Hi Matthieu Yes of course, It's very true that you have contributed quite a lot to my fork, especially with the editor and operators and the nice walk-through tutorial. When doing the squash the intent was not to remove your name but to remove very old commits which do not actually belong the the project. On my 1st trial to git rebase my branch to a correct master I spend over 2 hours for nothing. There were lots of conflicts on each new hash, which was absolutely no fun. So I decided so squash instead ... If you want to have this fixed, we can schedule for a screen sharing session to fix it. personally i dont have too much of these abilities. and again, sorry. Your effort is very well appreciated!

On Mon, Nov 27, 2023 at 3:23 PM Matthieu LAURENT @.> wrote: Also, i just noticed when going through the changes, but when squashing you can use Co-authored-by: https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors in your commit message to mention all authors that worked on something. Personally i don't really care about having attribution, but it's good practice so i thought i'd mention it ;) — Reply to this email directly, view it on GitHub <#4841 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCO4MX6DNQAMKIGPUAHFPDYGSO73AVCNFSM6AAAAAA7UKWFIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRXHEZTGOBXGE . You are receiving this because you authored the thread.Message ID: @.>

Don't worry about it too much ^^
If you need help rebasing, i have quite a bit of experience with git, so i wouldn't mind helping.
Feel free to send me an email 👍

Co-authored-by: Matthieu LAURENT <matthieu.laurent69@proton.me>
@pca006132
Copy link
Member

  1. Minimal supported python version should be Python 3.10, as Python 3.9 contains node.h that will conflict with src/core/node.h. We can either write this as requirement or resolve this by changing every #include "node.h" to #include "src/core/node.h".
  2. Backup file still has .scad suffix.
  3. For some reason I cannot get the GUI to work:
    image
  4. For slightly more complicated example (from the openscad-python website), I got segfault with the GUI (but it works fine in CLI):
    def foot(x,y):
    	c=cube([1,1,10])
    	return translate(c,[x,y,0])
    
    def plate():
    	return cube([11,11,1])
    
    parts=[]
    parts.append(translate(plate(),[0,0,10]))
    
    for y in [0,10]:
    	for x in [0,10]:
    		parts.append(foot(x,y))
    
    output(parts)
    #0  0x00007ffff658e1b2 in t_primary_rule ()
       from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
    #1  0x00007ffff658e328 in t_primary_rule ()
       from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
    #2  0x00007ffff6593c7f in single_subscript_attribute_target_rule ()
       from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
    #3  0x00007ffff6594db8 in simple_stmt_rule ()
       from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
    #4  0x00007ffff65976b3 in simple_stmts_rule ()
       from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
    #5  0x00007ffff659bf2a in statements_rule ()
       from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
    #6  0x00007ffff659ef22 in _PyPegen_parse ()
       from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
    #7  0x00007ffff633bfa2 in _PyPegen_run_parser ()
       from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
    #8  0x00007ffff633c36c in _PyParser_ASTFromString ()
       from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
    #9  0x00007ffff6577dfe in PyRun_SimpleStringFlags ()
       from /nix/store/hd18diw4x8yn48d83z09gsifxhqm5cz6-python3-3.11.6-env/lib/libpython3.11.so.1.0
    #10 0x0000000000dbce78 in evaluatePython (
        code="def foot(x,y):\r\n\tc=cube([1,1,10])\r\n\treturn translate(c,[x,y,0])\r\n\r\ndef plate():\r\n\treturn cube([11,11,1])\r\n\r\nparts=[]\r\nparts.append(translate(plate(),[0,0,10]))\r\n\r\nfor y in [0,10]:\r\n\tfor x in [0,10]:\r\n"..., assignments=std::vector of length 2, capacity 2 = {...})
        at /home/pca006132/code/openscad/src/python/pyopenscad.cc:528
    #11 0x0000000000cfdfc8 in MainWindow::parseTopLevelDocument (this=0x4f2658a8c00)
        at /home/pca006132/code/openscad/src/gui/MainWindow.cc:1992
    #12 0x0000000000d81cf2 in TabManager::openTabFile (this=this@entry=0x4f26d6b5880, filename=...)
        at /home/pca006132/code/openscad/src/gui/TabManager.cc:504
    

Not sure if 3 and 4 are due to my rather unusual setup... Don't think they should block the merge if it works for others, I can find some time to debug that issue.

@gsohler
Copy link
Member Author

gsohler commented Dec 1, 2023 via email

@pca006132
Copy link
Member

For 3 and 4, I tried the old commit (before my changes) and it is the same.

void PyOpenSCADObject_dealloc(PyOpenSCADObject *self)
{
Py_XDECREF(self->dict);
// Py_XDECREF(self->dict);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this cause memory leak?

@gsohler
Copy link
Member Author

gsohler commented Dec 1, 2023 via email

@pca006132
Copy link
Member

yes it works now.

@gsohler gsohler mentioned this pull request Feb 20, 2024
@edbrannin edbrannin mentioned this pull request Jun 6, 2024
@andyDoucette
Copy link

I love the idea of being able to combine the ease and expressive power of python with the openscad ecosystem! I hope this gets merged soon. :)

@gsohler
Copy link
Member Author

gsohler commented Jan 29, 2025

for the time being you can go with pythonscad (http://www.pythonscad.org/ )
Its a superset of openscad(all openscad is still working, plus the python engine.
I hope they will merge with unchanged featureset so you can reuse your pythonscad scripts with future openscad .

@andyDoucette
Copy link

andyDoucette commented Jan 29, 2025 via email

@gsohler
Copy link
Member Author

gsohler commented Jan 29, 2025 via email

@github-actions
Copy link

OpenSCAD bot: this PR is stale because it has been open for 120 days with no activity. It will be closed if no further activity occurs within 60 days.

@groutoutlook
Copy link

Can it not be marked "stall", please?

@github-actions github-actions bot removed the Stalled label Nov 8, 2025
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

Successfully merging this pull request may close these issues.