Asking for help about rhino_3gs

I have already installed rhino_3gs successfully. But after I closed Rhino and then opened it again, rhino_3gs occured an error with the button “create primal diagram”, which said, “max is an empty sequence”.
Then I uninstalled 3gs and installed 3gs again, 3gs ran correctly. But everytime when I opened Rhino after closing it, 3gs always occurs an error. How should I solve this?
PS: Does anyone have manual or tutorial of 3gs? I’m new on this.
Thanks soooo much!

Hi @Ziv, thanks for posting here for the first time! I am no expert on 3gs but the error you mention might suggest you are trying to create a “primal diagram” from some form of invalid input (be it geometrical or not). Do you want to post a file where the error you saw is can be replicated or a screenshot of what you see in Rhino when this error pops up?

Hi @arpastrana , thanks for your reply.
First, I created a simple tetrahedron. And then, I wanted to create a force diagram, it’s OK. But when I wanted to create a primal diagram, an error occured like this. (Sry, I cannot put image in the reply.)
Exception Occured
Message: max() arg is an empty sequence.
Traceback:
line unknown, in , “”
line 99, in check_eq, “C:\Users\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\compas_3gs\rhino\objects\formnetworkobject.py”
line 55, in RunCommand, “C:\Users\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\PythonPlugins\3GS{7ce56e93-79c1-44ac-9716-1a53ca42ac9c}\dev\TGS_primal_cmd.py”
line 1, in , “”

Next, I tried to create a reciprocate diagram. I set the alpha and vertices. Another error occured like this.
Exception Occured
Message: max() arg is an empty sequence.
Traceback:
line unknown, in , “”
line 99, in check_eq, “C:\Users\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\compas_3gs\rhino\objects\formnetworkobject.py”
line 131, in RunCommand, “C:\Users\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\PythonPlugins\3GS{7ce56e93-79c1-44ac-9716-1a53ca42ac9c}\dev\TGS_reciprocate_cmd.py”
line 1, in , “”

I don’t know whether I did it correctly or not. I’m confused now.
Thanks again!

PS: I found that rhino_3gs and rhinoVAULT2 are not compatible.

@juney would you mind having a look at this?

Hi @Ziv, and thanks @arpastrana for the reply.

From what you have described here, I presume that you have created a polyhedral force diagram from a single tetrahedron. A single-cell force diagram means that the primal diagram has only one vertex, and does not have any edges. This is why you are getting the error messages you mentioned. Try with at least two cells, then these errors should go away.

Hi @juney, it’s an honor to have you reply. I will give it a try in rhino and read your thesis more carefully.

Hi, @juney. Sry to bother you.
I tried with your suggestion. But the error still exists just like the pictures below.

Create reciprocate diagram.

And the error of primal diagram still exists as the same as the reply above.

Is there a possibility that it’s my rhino version or python version problem.
Rhino version: 6.5.
Python version: 3.8

Your input geometry does not seem to be a closed polysurface… for example, the top of the shape seems to be open. Also, there doesn’t seem to be a valid primal diagram (“formnetwork”) in the scene, so there is nothing to “reciprocate.” You will need to input at least two conjoined, closed polysurfaces to get any formdiagram out of it. One polysruface doesn’t represent a structure; it is just a point in space with external forces. The two pyramid shapes are also joined at a vertex, which cannot happen. Any two adjacent polysurfaces must be sharing a face.

Perhaps the first thing to test would be something very simple, like a Rubik’s cube.

I tested with Rubik’s cube. But when I tried to create primal diagram, there was another error like the picture below.

I illustrate my understanding of this plug-in to confirm whether it is the problem of my operation.

  1. Create polysurfaces.
  2. Create force diagram.
  3. Create primal diagram (form diagram).
  4. Create reciprocate diagram.
  5. Adjust force diagram or form diagram.

Hi @Ziv. This is indeed a bug. The “Attempted to divide by zero” error was being raised because in this particular case (27 cubes), all internal faces of the form diagram have the same areas and therefore the same force magnitudes. The default display mode in compas_3gs shows force magnitudes in a color gradient. For each face, the color is computed as i_to_blue((abs(force) - min_c) / (max_c - min_c)). In this case max_c is the same as min_c, hence the error.

This bug has been fixed in release v0.5.1, which can be downloaded from here. Please try with this updated version, and let me know if everything works. And thanks for finding the bug!