[Source] Xj3D Development of nurbs component

Don Brutzman brutzman at nps.edu
Tue Jul 10 14:18:54 PDT 2012


cc: Xj3D source, CAD mailing lists

Vince, thanks for your steady progress.

As discussed, let's use the Web3D conference line tomorrow to begin
next steps for integration of your work into the Xj3D trunk.  Terry
and I will join in.  An hour should be plenty of time.  Anyone else
wanting to listen in and observe is welcome.

	Wednesday 11 July 2012
	13-1400 pacific, 16-1700 eastern
	+1.877.929.9843, 831186#

Once that is accomplished, I hope we can have future sessions to
- confirm correct support and settings for X3D-Edit NURBS
- review, improve X3D NURBS tooltips
- review, post bugs and comparison images for various browser display of NURBS nodes
- review, improve X3D NURBS examples
	http://www.web3d.org/x3d/content/examples/Basic/index.html#NURBS

This will all take some time, of course.  But most of it is OK already.
I'm hoping to have reportable progress and next-step plans for the upcoming
conferences in LA:  Web3D 2012 and SIGGRAPH.

talk to you tomorrow!


On 6/12/2012 5:30 AM, Vincent Marchetti wrote:
> 
> I have developed a branch of the Xj3D code which partially implements the NURBS Component. This work is largely based on the work done in France on the B-Reps project and enhancements to the jgeom library to support meshing NURBS surfaces; I believe this is credited to Alexandre Frouart and Samuel Gerber, please correct me if I have this wrong.
> 
> I did this development in a separate Subversion repository with root URL https://kshell.sourcerepo.com/kshell/kshell/xj3d_code . I have established a read-only account to this repository with:
> username: x3duser
> password: x3duser
> 
> The base of this branch was imported from  the NPS Xj3D branch http://svn.xj3d.org/xj3d_code/branches/NPS@11090  (at revision 11090, 14 Dec 2011; I have not updated my branch against subsequent changes to the NPS branch). You are welcome to enjoy the blind alleys and mistakes documented in the subversion log, but there is a tagged revision which compiles and works and is minimally changed from the NPS branch at https://kshell.sourcerepo.com/kshell/kshell/xj3d_code/tags/rel_1_0
> 
> Directions:
> With the source code in repository https://kshell.sourcerepo.com/kshell/kshell/xj3d_code/tags/rel_1_0/
> 
> [ can be check-out with a read-only account:
> svn --username=x3duser --password=x3duser checkout https://kshell.sourcerepo.com/kshell/kshell/xj3d_code/tags/rel_1_0
> ]
> 
> compile the browser with command line:
> ant build
> 
> and run the browser with:
> bash browser.sh
> 
> X3D files demonstrating the NURBS capabilities of the browser are linked to by these web pages:
> http://www.kshell.com/pages/nurbs_surface_demo
> http://www.kshell.com/pages/trimmed_nurbs_demo
> 
> and directly at: http://www.kshell.com/pages/rev062012/models/laser__top.x3d
> 
> ------------------------------------------------------------------------------
> The following is a summary of the changes made from BASE at https://kshell.sourcerepo.com/kshell/kshell/xj3d_code/trunk@2536, a copy of http://svn.xj3d.org/xj3d_code/branches/NPS@11090 ; and the release tag https://kshell.sourcerepo.com/kshell/kshell/xj3d_code/tags/rel_1_0
> 
> The lines starting with D refers to files that were in the BASE (and the original NPS branch) but not in the new release; this occurs primarily because files were renamed
> 
> Lines starting with A refers to new files.
> 
> Lines starting with M are files that were modified between the BASE and the tagged release, modifications can be viewed with the svn diff command.
> 
> 
> 1. I renamed the file build_nps.xml to build.xml (overwriting the existing build.xml), so that the content in build_nps.xml would be the default configuration going into the ant build engine. I also modified the build.xml and build.properties files to accommodate the file changes below. I also added a usexternalfile declaration to the javadoc target configuration (see build.xml line 860). Had to make other changes in scripts to accommodate this renaming
> 
> D build_nps.xml
> M build.xml
> M buildInstallers.xml
> M npsBin/browser.sh
> 
> The following svn command line retrieves the diff between the build_nps.xml file when this branch was created and the current version of build.xml
> 
> svn diff --old=https://kshell.sourcerepo.com/kshell/kshell/xj3d_code/trunk/build_nps.xml@2536  --new=https://kshell.sourcerepo.com/kshell/kshell/xj3d_code/tags/rel_1_0
> 
> 
> I modified the build.properties file
> M build.properties
> 
> This command retrieves the changes
> svn diff -r2536 https://kshell.sourcerepo.com/kshell/kshell/xj3d_code/trunk/build.properties
> 
> ------------------------------------------------------------------------------
> 
> 2. I renamed the javacc (Java Compiler Compiler) source files in src/javacc so that the base name of the file matches the name of the class file in the product java file. Making this change allows the ant build process to avoid recompiling the .jj file when it has remained unchanged since the last build.
> 
> D src/javacc/vrml/VRML97Field.jj
> D src/javacc/vrml/VRML97Relaxed.jj
> D src/javacc/x3d/X3DField.jj
> D src/javacc/x3d/X3DRelaxed.jj
> 
> A src/javacc/vrml/VRML97FieldParser.jj
> A src/javacc/vrml/VRML97RelaxedParser.jj
> A src/javacc/x3d/X3DFieldParser.jj
> A src/javacc/x3d/X3DRelaxedParser.jj
> 
> ------------------------------------------------------------------------------
> 
> 3. I replaced the net.jgeom jar file with the source code provided by Christophe Mouton, this later version includes java classes which tesselate NURBS and trimmed NURBS surfaces. I also had to include the vtk (Visualization Toolkit, see http://www.vtk.org/ ) since it is imported into some (currently unused) classes in  the net.jgeom library
> 
> D lib/jgeom-core.jar
> A src/java/net
> A lib/vtk.jar
> 
> ------------------------------------------------------------------------------
> 
> 4. Modified the v 3.2 config file to include the NURBS component:
> M src/config/3.2/profiles.xml
> 
> ------------------------------------------------------------------------------
> 
> 5. Modied the CRMainSceneBuilder source to include 2D vector types needed for the NurbsCurve2D node.
> 
> M src/java/org/web3d/vrml/renderer/CRMainSceneBuilder.java
> 
> ------------------------------------------------------------------------------
> 
> 6. Modified DefaultNodeFactory to write explicit message when class cannot be found, useful for debugging.
> 
> M src/java/org/web3d/vrml/renderer/DefaultNodeFactory.java
> 
> ------------------------------------------------------------------------------
> 
> 7. I added or made substantial changes to the following java source files in the directory src/java/org/web3d/vrml/renderer
> 
> A /common/nodes/cadgeometry/BaseIndexedQuadSet.java
> A /common/nodes/geom2d/BaseDisk2D.java
> A /common/nodes/nurbs/BaseContour2D.java
> M /common/nodes/nurbs/BaseNurbsCurve2D.java
> M /common/nodes/nurbs/BaseNurbsPatchSurface.java
> A /common/nodes/nurbs/BaseNurbsTrimmedSurface.java
> A /norender/nodes/cadgeometry/NRIndexedQuadSet.java
> M /norender/nodes/nurbs/NRNurbsPatchSurface.java
> M /ogl/nodes/cadgeometry/OGLCADLayer.java
> A /ogl/nodes/cadgeometry/OGLIndexedQuadSet.java
> A /ogl/nodes/geom2d/OGLDisk2D.java
> A /ogl/nodes/nurbs/OGLContour2D.java
> M /ogl/nodes/nurbs/OGLNurbsCurve2D.java
> M /ogl/nodes/nurbs/OGLNurbsPatchSurface.java
> A /ogl/nodes/nurbs/OGLNurbsTrimmedSurface.java
> A /ogl/nodes/nurbs/TrimSegment.java
> A /ogl/nodes/nurbs/mesh
> 
> 
> Vincent Marchetti
> vmarchetti at ameritech.net

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman





More information about the Source mailing list