Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Processing library #8

Closed
hamoid opened this issue Aug 6, 2014 · 5 comments
Closed

Feature request: Processing library #8

hamoid opened this issue Aug 6, 2014 · 5 comments

Comments

@hamoid
Copy link

hamoid commented Aug 6, 2014

Many people would be really happy if a CSG library existed for Processing. Just saying ;)

Processing (processing.org) is based in Java 7. I took a look at porting the code myself, but first I would have to study how to port Java 8 code to Java 7. Would that be a complicated task? Never did Java 8.

I think a possible Processing CSG library would include only a subset of the JCSG features, since it's already possible to create spheres, cubes, and other shapes, it's easy to display them simply by calling shape(myShape), where myShape is of type PShape. Processing has many 3D libraries available with mesh generation features (http://hg.postspectacular.com/toxiclibs/, http://hemesh.wblut.com/ and others), which offer iso surfaces, convex hull, polyhedrons, tubes, bending, stretching, and other kinds of distortion. Only CSG is missing :)

Are there plans for such a Processing library? Otherwise, do you know of a Java 8 to 7 translation guide?

Thanks!

@miho
Copy link
Owner

miho commented Aug 6, 2014

Hi,

to be honest, I didn't think about Processing. Would you use a Java 7 port? If so, I can help you with the port. It shouldn't be complicated.

@hamoid
Copy link
Author

hamoid commented Aug 6, 2014

Hi! Thanks for the quick reply. I would be very happy with a Java 7 port :) I can maybe maintain a parallel Java 7 version, or maybe build the Processing library myself.

Initially I loaded the project in Eclipse without realizing the Java 8 requirement and saw 997 errors, but I guess they all belong to a few categories of expressions that don't exist in 7.

The first issues I encounter are these:

return p.vertices.stream().allMatch(v -> contains(v));
csg.polygons = polygonStream.map((Polygon p) -> p.clone()).collect(Collectors.toList());
materialNames.keySet().forEach(s -> { .... });

I understand what they do from other languages I've used. But what's the easiest way to do this on 7?

@miho
Copy link
Owner

miho commented Aug 6, 2014

Hi,

I've just commited a Java 7 port (java7 branch). Hope it works :) It's untested.

You can contribute the processing related code to the java7 branch if you like.

@hamoid
Copy link
Author

hamoid commented Aug 6, 2014

Awesome! Thanks! Will try it out and report back :)

@miho
Copy link
Owner

miho commented Aug 18, 2015

No activity.

@miho miho closed this as completed Aug 18, 2015
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

No branches or pull requests

2 participants