Posted by
RickLutowski on
Mar 29, 2023; 9:22pm
URL: https://forum.jogamp.org/Java-3D-CAD-program-volunteer-opportunities-tp4042337p4042353.html
philjord wrote:
> package com.jreality.cmodel.rcs_subdiv.Partition from jreality_v0.6_src.tgz
> has
> import com.jreality.geometry.shape3.ClosedFacetedSurface;
My previous post responding to this issue does NOT fix the problem. I tested the proposed solution before posting it, but the test was compromised by a 20 year old "ClosedFacetedSurface.class" file that was lurking on my system that I had forgotten about.
The real solution consists of 2 steps.
Step 1 -- Create a stub of ClosedFacetedSurface,java to resolve the dependency link. The method doesn't have to be functional because CM Creator does not actually call it (yet). The stub method goes in package com.jreality.cmodel.rcs_geom
Step 2 is to change all references of the form
com.jreality.geometry.shape3.ClosedFacetedSurface
to
com.jreality.cmodel.rcs_geom.ClosedFacetedSurface
Such references occur in the methods
com.jreality.cmodel.rcs_geom.IntegrableSurface3
com.jreality.cmodel.rcs_subdiv.Partition
com.jreality.cmodel.rcs_subdiv.UNormalPartn
com.jreality.cmodel.rcs_subdiv.VNormalPartn
com.jreality.cmodel.rcs_subdiv.VNormalPartn
com.jreality.cmodel.ExtSurface
Most of these are import statements.
With these 2 steps completed, the compile script ".compile_creator" provided in the _src.tgz distro file should work ok. CM Surveyor is not needed at all. These changes have been made to the CM Creator master files and will be in the next release to avoid these issues in the future.
Here is the source for the stub class that can be cut and paste into your CM Creator source directories, for anyone so inclined:
-----------------------------------------------------------------------------------------------------------------------------
/* com.jreality.cmodel.rcs_geom.ClosedFacetedSurface
*/
package com.jreality.cmodel.rcs_geom;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
/*
* Application: Compartmentalized Model Package
*
* Copyright (C) 2023 LDJ Trust.
*
* This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this file; if not, see
https://www.gnu.org/licenses/ *
*
*/
/**
* Class Purpose: Model a closed 3D surface of arbitrary shape
* in a manner compatible with java3d.
* <p>
* Notes: This method is a stub for the real ClosedFacetedSurface
* located in package com.jreality.geometry.shape3.
* The real version is strongly tied to an old version of
* java3d, and needs to be updated for new versions of java3d.
* In the interim, this stub can be used to resolve CM Creator
* references to this method.
*/
public class ClosedFacetedSurface extends Object {
/*
******************************************************************************
* Field Variable Declarations
******************************************************************************
*
* Private Instance Fields
*/
/*
******************************************************************************
* Constructor Methods
******************************************************************************
*
* ClosedFacetedSurface Constructor #1
*/
/**
* Purpose: Default constructor for the class.
* <p>
* Notes: Intended for use during deserialization only. Applications
* should use the argumented constructors for shape object creation.
* <p>
*/
public ClosedFacetedSurface ( ) {
super();
}
/*
******************************************************************************
* Object Behavior Methods
******************************************************************************
*
* ClosedFacetedSurface.write
*/
/**
* Purpose: Write this ClosedFacetedSurface object to file.
* <br>
* Notes:
*
* @param dos DataOutputStream for writing the ClosedFacetedSurface data.
* @exception IOException problem writing file,
* such as insufficient permissions.
*/
public void write (DataOutputStream dos)
throws IOException
{
return;
}
/*
******************************************************************************
*
* ClosedFacetedSurface.read
*/
/**
* Purpose: Read a ClosedFacetedSurface object from file.
* <br>
* Notes:
*
* @param dis DataInputStream for reading the ClosedFacetedSurface data.
* @param units Specific Units in which the ClosedFacetedSurface was stored
* on file.
* @exception IOException problem reading file,
* such as insufficient permissions.
*/
public void read (DataInputStream dis, String[] units)
throws IOException
{
return;
}
/*
******************************************************************************
*/
} // End of com.jreality.cmodel.rcs_geom.ClosedFacetedSurface
-----------------------------------------------------------------------------------------------------------------------------
I apologize for the previous wild goose chase.
On the positive side, it did serve as an intro to CM Surveyor, which is planned to serve as the bridge for implementing java3d in CM Creator, and identified some of the challenges involved.