Login  Register

Re: Java 3D CAD program - volunteer opportunities

Posted by RickLutowski on Mar 26, 2023; 11:47pm
URL: https://forum.jogamp.org/Java-3D-CAD-program-volunteer-opportunities-tp4042337p4042344.html

philjord wrote:
> I'm trying to get the code running, but the src zip doesn't seem to have
> com.jreality.geometry.shape3.ClosedFacetedSurface
> in it?
> How do I get that?

Interesting!  The are short, long, and longer answers to this.

Short answer:

You can get the com.jreality.geometry.shape3 package at
http://www.jreality.com/downloads.html
Use the download link "Version 1.1.1 (937467 bytes)"

Long answer:

At first your question threw me because ClosedFacetedSurface is not used by CM Creator, so is not included in the src.tgz file.  A little poking around made me remember I referenced it in a @see statement of com.jreality.cmodel.rcs_geom.IntegrableSurface3 -- which tells me you are running javadoc on the source.  I have not run javadoc on CM Creator for a long time, so you are likely to encounter many more javadoc errors than this!  Unless you would like to clean up the javadoc comments as your first contribution, you might want to skip running javadoc for now.

That being said, helping to document a program is a great way to get up to speed with it.  Once I was tasked with writing the user manual for a large in-house graphics package. Writing the manual made me so familiar with the code that I became the "program mother" for the package.

Longer answer
or
What is ClosedFacetedSurface, and why does CM Creator not use it?

What is ClosedFacetedSurface?

The post that initiated this thread refers to an early java3d applet that was intended to enhance mainstream browsers like Netscape with VR capability.  That program is called CM Surveyor.  ClosedFacetedSurface is the class CM Surveyor. uses to model closed 3D surfaces in a manner compatible with java3d.  (see footnote)

Why does CM Creator not use it?
Reason 1

CM Creator uses a class called com.jreality.cmodel.rcs_geom.IntegrableSurface3 to model closed surfaces. The javadoc comments for IntegrableSurface3 explain how it differs from ClosedFacetedSurface. In a nutshell, ClosedFacetedSurface is designed to support _display_ of compartmentalized models using java3d, whereas IntegrableSurface3 is optimized for fast interpolation, integration and similar operations used to _create_ and _analyze_ compartmentalized models. Thus, one of the tasks in merging CM Surveyor's java3d engine with CM Creator is to write a method that converts an IntegrableSurface3 object to a ClosedFacetedSurface object.  Because both classes model surfaces in fundamentally the same way, this conversion should be quick and fairly painless. (The devil is in other details...)

Reason 2
For those who don't mind my diving deeper, I discovered a design lesson here as well.

In support of CM Surveyor I developed an extensive set of 2D and 3D geometric modeling classes based on a systematic analysis of all logically-possible geometric objects, 38 different geometric objects were identified, from a simple 2D point to complex 3D surfaces. Each geometric object was modeled by its own class, and the classes organized into 3 packages. Even though CM Surveyor only needed a small number of those 38 classes, I figured they would save development time in future geometric applications.

Later, when trying to use these packages in designing CM Creator, things got sticky.  Eventually I concluded that basing a package design on a comprehensive analysis of a problem space results in what might best be termed "over-modularization."  While the design faults of the "massive main" were long ago recognized, I concluded it is also possible to go too far the other way.  The best solution is somewhere in the middle. Thus, CM Creator does not use the CM Surveyor geometric modeling packages, but has its own set of much leaner ones.

----

Footnote: CM Surveyor _is_ available on my website. When I wrote it 20 years ago (1) I was younger, (2) figured I could form a successful business creating VR websites enabled by CM Surveyor (so longevity and successor issues were not the drivers they are now), and (3) github didn't exist then!