SolidCode/SolidPython

How to read data of graphics.

Frank-bool opened this issue · 6 comments

Frist, thank you very much for the package, which is very helpful for my work.
I use this package to To create 3D-structures. If I want to create two structures and save them in one file, I need to determine whether the two structures intersect before I output the .scad file. Just like this:

A = difference()(
   cylinder(r=5, h=10),
   cube([4,4,4])
)

For example, these two structures, I built the cylinder and the cube. But I do not know whether these two structures intersect. I read the value of A. And the idea is, if A is empty, then there's no intersection, the opposite is the intersection. But I didn't succeed. I didn't find A way to read the value of A. So I would like to ask if there is A way to read out or determine if A is empty.

Or is there a similar Python package that solves my problems and makes it easy to build the same structure as openSCAD? Your package is really great, I didn't find a package as easy to build structure as SolidPython.

If you have any solutions to my problems, please let me know. It will be of great help to me.

Thank you very much for your help and answer.

Thank you very much for your answers.

In the two ways that you mentioned:

  1. My understanding is that you need to make a human judgment after generating the STL file. But my judgment of whether or not to cross the job is left to the computer to do, no human involvement. If the intersection, the output error, otherwise correct, output .scad file.

  2. You offer a good solution, and I'll look into that. I'll see if it's suitable for my current job and help me solve problems.

Thanks again for your help.

Cheers! ^_^

According to the method you said, how can you achieve the function you said in Windows system? I don't know much about it. Could you please provide some information so that I can look up and learn?

WoW! Your method is great, I will keep trying.

Thank you very much for your help! I apologize for the trouble I caused you.