[X3D-Public] [Cad] Representing CAD Assembly composed of multiple files using X3D CAD Spec
brutzman at nps.edu
Thu Jul 19 09:01:19 PDT 2012
[cc: x3d-public due to general interest]
On 7/18/2012 9:23 PM, Hyokwang Lee wrote:
> Two important files are missed.
> They are externally referenced geometry files.
Hyo, thanks for posting all of these X3D CAD examples.
I am hoping that we can prepare for our early-morning meeting in LA
in 2 weeks to get files ready for inclusion in the Basic X3D Examples
You and others may have noticed that the X3D scenes in this archive
follow a certain naming convention. There is also common metadata
in each scene. Together these good practices allow autogeneration
of the complete website.
It would be good to make a list of all of the related scenes for your
important examples. Giving them a common prefix word will help to
alphabetize them together in the CAD directory catalog. Explanatory
diagrams or a summary HTML page can be included and linked in metadata.
Details about the naming conventions in use follow. These were all built
incrementally based on experiences while developing and deploying content
in the archives already. When we are agreed on the next steps, we can
modify the source .x3d examples and check them into sourceforge for shared
access and continued refinement.
Discussion, questions and improvements are welcome. I look forward to
getting these examples fully elaborated and visible to everyone. These
are important steps towards establishing best practices for X3D CAD.
Thanks for your important efforts!
X3D Scene Authoring Hints: Naming Conventions
> Naming Conventions
> CamelCaseNaming: capitalize each word, never use abbreviations, strive for clarity, and be brief but complete.
> startWithLowerCaseLetter when defining field names (i.e. attributes) for Prototypes and Scripts.
> Ensure consistent capitalization throughout. Of note: the Windows operating system is not case sensitive, but http servers are. Thus mismatched capitalization can hide target files, and this error only is revealed when placed on a server.
> Use the underscore character ("_") to indicate subscripts on mathematical variables. Otherwise avoid use of underscores since they look like whitespace when part of a URL address.
> Avoid use of hyphens ("-") since these are erroneously turned into subtraction operators when converted into class or variable names.
> Naming conventions apply to .x3d files, image files, and Prototypes. It is also a good idea to follow them for DEF/USE names.
> There are multiple requirements for characters allowed in DEF/USE names.
> .x3d, .x3db encodings: must follow XML requirements for ID/IDREF data type.
> .x3dv, .wrl encodings: must follow ClassicVRML Grammar requirements for Id/IdFirstChar.
> Most restrictive and most interoperable guidance regarding choice of characters in names: can start with letter or underscore character, but not a number or a colon. Can then include letters, numbers, hyphen, underscore, or period characters. This interoperability is important so that files can be converted equivalently between encodings without validation problems.
> Use lower case for filename extensions. Examples: .png .jpg .txt. Although Windows systems are insensitive to upper/lower case, any differences will cause "file not found" failures on Unix systems (Apple, Linux) and http servers.
> Be consistent. When multiple files pertain to a single entity, start with the same name so that they will alphabetize adjacent to each other in the catalog and the directory listings. Examples: WaypointInterpolatorPrototype.x3d WaypointInterpolatorExample.x3d WaypointInterpolatorExample.png
> Good choices for directory and subdirectory names can help keep scene names terse.
> Naming of multiple similar autogenerated files: Concatenate the following name components as appropriate. Separate components by period characters, since underscores disappear as part of a url and since hyphens will break across a line.
> .PhysicalLocation (for example .KauaiHawaii)
> General notes on naming conventions:
> These conventions are suitable for X3D scenes, XML tagset design, and corresponding Java classes.
> This approach matches the node and field naming conventions in the X3D Specification (and most XML).
> (Ironic) Success Metric: when is a name successful?
> Answer: when no one has to discuss that name any more.
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 X3D-Public