Loading...
Logo
Processing Forum
getting the error "the package com.briansteen does not exist, you may have a library missing." which i gather is something to do with sunflow or hemesh to sunflow.

followed the steps to the tee for running  hemeshGUI lite (which worked nicely) and then hemeshGUI(which didnt)
(from here: http://www.creativeapplications.net/processing/hemesh-and-hemeshgui-processing/)

Im a total processing noob so any pointers on how to get past this would be massively appreciated.

Welcome all by the way!

Replies(6)

Most likely this means the file "SunflowAPIAPI.java" ( direct download) is not in the correct place.

Place the file in the main HemeshGui directory besides all the pde's (HemeshGui.pde, Modifier.pde etc.)

Do NOT place the file in the code subdirectory.

Also make sure to restart the sketch with the file in place.

>>Place the file in the main HemeshGui directory besides all the pde's (HemeshGui.pde, Modifier.pde etc.)
Solution didn't work with the latest(17Apr) processing v1.5. I'm playing with it on 1.2.1 release good, no mistake here.
Looking forward where sunflow project goes.
For a solution to make it work in Processing 1.5 you can look here.
 Right, I think the original error came from me using the file P5sunflowAPIAPI.java from the zip package as I could not save the direct D/L link as a file on my system.

So, I opened the direct d/l code in dreamweaver, saved it as sunflowAPIAPI.java, replaced P5sunflowAPIAPI next to the hemeshGUI.pde with this new file, and run the program. Previous problem appears to be solved!

However an error on line 68 now appears;

 sunflow.drawMesh("myHemesh", verticesHemeshOneDim, facesHemeshOneDim, actualZoom/20, 0,0,0);
error (ish): The drawing method string, float[], int[] in the type sunflowAPIAPI is not applicable for the arguments; string, float int, int int.

Im guessing those 3 0's at the end of the line are involved, but no idea whats going on,
my processing skills have come on tons since my first post but still this is completely over my head.

Sorry for the n00b questions! Help getting this up and running would be really appreciated.



You're not following the basic instructions again. Because it seems you are not using the correct version of "SunflowAPIAPI.java". In the most recent version of this file I added an additional method so it all works together. For some reason you are using an old version of the file, which doesn't have the method. So you get that error.

Two possible solutions

1. Download the file. How can you not download the file? Just click the right mouse button on the link and choose "save as..."

2. Copy-paste the code below into the SunflowAPIAPI.java yourself. You are able to see and edit this file through the regular Processing IDE just like any pde. Remember to at least put this code inside the main sunflowAPIAPI class which starts at the line class public class SunflowAPIAPI {

Copy code
  1.     /**
  2.      * draws a mesh primitive which can be rotated and scaled
  3.      * @param name individual name of primitive
  4.      * @param vertices Float array with coordinates (like [x0,y0,z0,x1,y1,z1,x2,y2,z2])
  5.      * @param triangles int array connecting the vertices (like [0,1,2])
  6.      * @param size size
  7.      * @param xRotation x rotation
  8.      * @param yRotation y rotation
  9.      * @param zRotation z rotation
  10.      */
  11.     public void drawMesh(String name, float[] vertices, int[] triangles, float size, float xRotation, float yRotation, float zRotation) {
  12.         Matrix4 scale = Matrix4.IDENTITY.multiply( Matrix4.scale(size, size, size) );
  13.         Matrix4 rotate = Matrix4.IDENTITY
  14.         .multiply( Matrix4.rotateZ(zRotation) )
  15.         .multiply( Matrix4.rotateX(xRotation) )
  16.         .multiply( Matrix4.rotateY(yRotation) );
  17.         Matrix4 m = Matrix4.IDENTITY;
  18.         m = scale.multiply(m);
  19.         m = rotate.multiply(m);
  20.         sunflow.parameter("points", "point", "vertex", vertices);
  21.         sunflow.parameter("triangles", triangles);
  22.         sunflow.geometry( name, "triangle_mesh" );
  23.         sunflow.parameter( "shaders", currShader);
  24.         if(isModifiers) sunflow.parameter("modifiers", currModifier);
  25.         sunflow.parameter( "transform", m );
  26.         sunflow.instance( name + ".instance", name );
  27.     }


thanks. embarrassing mistake, il try my best not to make any more of those!