Is there a way to (re)use openscad code in a python program?I tried the os_import no errors but after calling one of the modules openscad freezes until I killed it. I'm working on ubuntu linux.
--
You received this message because you are subscribed to the Google Groups "PythonSCAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pythonscad+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/9671d487-c42c-45cb-8ee4-fa0552986416n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Here's a simple OpenSCAD script.
module cu(){
cube(5);
}
module sp(){
difference (){
cu();
sphere(5);
}
}
//cu();
sp();
if it is saved, as say "testimport.scad" what is the correct
pythonscad script to import it and access either module?
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/CAASeUHpjX2g7iVCiBByQwdo346hkn6Os2ofo3TDW%3Dh1QMcTnpg%40mail.gmail.com.
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/992e6530-569f-4040-88a0-66e93074f9b3%40raywest.com.
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/CAASeUHq4dFH88Kig4XjX2xC-FEBgEORN_%3D5K5AftjmX7v64yNw%40mail.gmail.com.
Hi Willy,
@ray: Do you think osuse() would make the cut for your https://pythonscad.org/pythonscadhelper.html? I would like to vote yes :)
It's not mine any more. But, I suppose it may be worth while adding all the valid functions. The difficulty for me, and possibly ChatGPT would be in creating a succinct example for each. If I were to attempt that, perhaps you could check each addition, before it went live, so to speak?
If that was to happen, then maybe Guenther would host the much enlarged html file. The thing is that AI, if it doesn't know the exact answer, tends to make stuff up, instead of really searching out the truth, or admitting it does not 'know' and my knowledge of PythonSCAD is such that I often can not tell the difference.
I only refer to what is available on pythonscad.org, as I believe
that that is where users will initially look, and personally,
GitHub, Reddit and the like, I see as sources of secondary
information.
Best wishes,
Ray
Hi,
It seems that the free AI's cannot handle larger files. I tried
Claude this time, and it took a bit of prompting to create the
attached, pythonscadhelpertest3.html which has not followed my
initial instructions. I then tried getting it to use that result,
since I'd got it to do a better search window, and merge it again.
No luck, just said too large, start another chat. Annoyingly, it
cannot access previous chats, but why have a dog, and bark
yourself.😇.
If anyone could be arsed, it could be manually merged.
I asked it -
I have a helper for pythondscad as an html file. I need to expand it to include more functions. If send the html file, and a list of functions, can you merge the functions in the same format, generate simple examples, etc, so that it looks like my original html. Pythonscadhelpertest3.html is the layout I want, with the fixed search. Pythonscadhelper.html has the level of detail I want in the examples - It should include print() for numeric output. The idea being that the user only needs copy the example into the editor and run it, no typing required. The text file is the additional functions to be included, either in new or existing sections. Make sure, by splitting the resultant html file into sections, that I get it all.
--
You received this message because you are subscribed to the Google Groups "PythonSCAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pythonscad+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/98c20cba-2955-4818-9efd-1bdb6d61ddadn%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "PythonSCAD" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pythonscad/I_2pVrkh7LU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pythonscad+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/c844a4a3-f410-49c2-b201-bfa078084d23n%40googlegroups.com.
Hi,
After a lot of arguing with a few llm's (they go awol if you ask
why - when they say the list is complete, gives the list, then
asks if you want it to add the missing parts), so I've had to
cobble together the various results.
Anyway, I think this is all the functions, not sure about the
section headings, nor the order, but as it is searchable, maybe
not a problem. I've not checked all of it, it needs more eyeballs.
Not sure if there should be more detail, wrt openscad differences - degrees/radians, integers in for loops, PI /pi, True /true etc.
Maybe if you see a problem, you correct it, and perhaps in a week or two, Guenther will put it on the openscad.org site, to replace the existing.
I've found a few functions that for me need a more detailed
explanation, both in how to use and the usefulness/purpose.
Best wishes,
Ray
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/CAGzK_ohH8DGXSHCcuBBVFDhdN1NKBdYXUweQQXG2qCj%2BXkUKhQ%40mail.gmail.com.
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/971c7ba5-25ef-4148-925c-c7b7b4576537%40raywest.com.
Hi Raymond, it\s a great file because it comes with lots of additional useful function descriptions.
But at the same time it contains functions, which are just wrong like
bounding_box does not existnimport does not accept scad filesdebug is present several timesset_defauts does not existTrignonometric functions are missing... and many more
As previously stated, I will publish once again this file to pythonscadhelper.html because of the previously stated reasons(and it not was no great experience to me either, my mind is not compatible with creating copies)
But I am happy ro receive PR's , patch files or permission to "cherry pick "cool docs" from the given file
PS: I wished I had some access to openscad,org, but probably you wanted to write pythonscad.org ?
Yeh, I'm seeing treble, from trying manually to merge three html files into one. Anyway, you've got the bones of it, alter it as you wish. It needs going through in detail as mentioned
I've not checked all of it, it needs more eyeballs.
I noticed you'd improved the initial splash screen. It now lists and I can select and open either python or scad, without having to preselect. I think the scad examples in that pane, should be replaced with .py examples, but I've no idea if that example pane is ever used... However, when in the editor, and I select 'new', it defaults to scad. In the console, it displays links and licencing wrt openscad, maybe also you need to change/add to that. Then, animate it and get it to play music and recite poetry....😂
Q: Is there a function for exporting each solid to a specific STL name?
A: