[x3d-public] Edge cases of Extrusion

Alekseyev, Vsevolod (NIH/NIAID) [E] VAlekseyev at niaid.nih.gov
Wed Jun 10 11:59:51 PDT 2015


Here, navigate to http://www.jishop.com/temp/x3d/ and see the coincident points sample. X3DOM misdisplays all of them but the first one.



-----Original Message-----
From: Don Brutzman [mailto:brutzman at nps.edu] 
Sent: Wednesday, June 10, 2015 1:27 PM
To: Alekseyev, Vsevolod (NIH/NIAID) [E]
Cc: X3D Graphics public mailing list
Subject: Re: [x3d-public] Edge cases of Extrusion

Thanks Seva.

We're definitely interested... just been busy with Schema and conference preparations.

I've previously created a test scene that may help, am happy to add more examples that illustrate proper use.  Having examples (and validating them) for the issues you've posed would be great.

http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes
http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/ExtrusionExamplesTest.x3d
http://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/ExtrusionExamplesTest.html

Looks like X3DOM is getting close to covering all of these cases:
http://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/ExtrusionExamplesTest.xhtml
http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/ExtrusionExamplesTest.X3DOM.png

http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/ExtrusionExamplesTest.BScontact.png
http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/ExtrusionExamplesTest.FreeWrl.png
http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/ExtrusionExamplesTest.InstantReality.png
http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/ExtrusionExamplesTest.OctagaVS.png
(view3dscene wouldn't load it)

Xj3D only works on some cases of Extrusion.  There is a verbose mode for console output that has helped with troubleshooting to date.
http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/ExtrusionExamplesTest.Xj3D.png
http://x3dGraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/ExtrusionExamplesTestXj3dConsoleOutput.txt

Since Extrusion implementation is a perennial issue, it might be a good idea to create a web3d wiki page regarding implementation trickiness, proper algorithms, etc.  Perhaps we should also create another scene with anomalies or illegal cases.

Looking at this together will help us really get precise on whether & what spec definitions need to be improved.


On 6/10/2015 8:20 AM, Alekseyev, Vsevolod (NIH/NIAID) [E] wrote:
> In the spirit of the spec review, did anyone maybe get a chance to review the Extrusion spec in light of the problems that I've outlined at http://web3d.org/pipermail/x3d-public_web3d.org/2015-June/003412.html ?
>
> There's one more problem with coincident spine points that I forgot to mention: the algorithm for CSP Y calculation in case of coincident spine points is inconsistent with the "special cases" rule that CSP for coincident points should match. It's entirely unclear rule takes precedence.

http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/geometry3D.html#Extrusion
http://www.web3d.org/x3d/content/X3dTooltips.html#Extrusion


p.s. another piece: here are the QA tests for extrusion that are in X3D Schematron:

http://www.web3d.org/x3d/tools/schematron/X3dSchematronValidityChecks.sch

     <!-- ========= Extrusion ========== -->
     <rule context="Extrusion">
       <let name="crossSection"             value="normalize-space(translate(@crossSection,',',' '))"/>
       <let name="spine"                    value="normalize-space(translate(@spine,       ',',' '))"/>
       <let name="scale"                    value="normalize-space(translate(@scale,       ',',' '))"/>
       <let name="orientation"              value="normalize-space(translate(@orientation, ',',' '))"/>
       <let name="crossSectionCount"        value="string-length($crossSection)      - string-length(translate($crossSection,' ','')) + 1"/>
       <let name="spineCount"               value="string-length($spine)             - string-length(translate($spine,       ' ','')) + 1"/>
       <let name="scaleCount"               value="string-length($scale)             - string-length(translate($scale,       ' ','')) + 1"/>
       <let name="orientationCount"         value="string-length($orientation)       - string-length(translate($orientation, ' ','')) + 1"/>
       <let name="crossSectionResidue"      value="translate($crossSection,     '+-0123456789Ee., ','')"/>
       <let name="spineResidue"             value="translate($spine,            '+-0123456789Ee., ','')"/>
       <let name="scaleResidue"             value="translate($scale,            '+-0123456789Ee., ','')"/>
       <let name="orientationResidue"       value="translate($orientation,      '+-0123456789Ee., ','')"/>
       <extends rule="geometryNode"/>
       <extends rule="NoChildNode"/>
       <extends rule="creaseAngle"/>
       <report test="($crossSectionCount = 0)" role="warning">&NodeDEFname; missing crossSection </report>
       <report test="($spineCount = 0)"        role="warning">&NodeDEFname; missing spine </report>
       <assert test="string-length($crossSectionResidue) = 0" role="error">&NodeDEFname; has illegal character <value-of select='$crossSectionResidue'/> in crossSection array (crossSection='<value-of select='@crossSection'/>') </assert>
       <assert test="string-length($scaleResidue)        = 0" role="error">&NodeDEFname; has illegal character <value-of select='$scaleResidue'/> in scale array (scale='<value-of select='@scale'/>') </assert>
       <assert test="string-length($spineResidue)        = 0" role="error">&NodeDEFname; has illegal character <value-of select='$spineResidue'/> in spine array (spine='<value-of select='@spine'/>') </assert>
       <assert test="string-length($orientationResidue)  = 0" role="error">&NodeDEFname; has illegal character <value-of select='$orientationResidue'/> in orientation array (orientation='<value-of select='@orientation'/>') </assert>
       <!-- check for legal array tuples -->
       <assert test="(($crossSectionCount mod 2) = 0)" role="warning">&NodeDEFname; crossSection array size <value-of select='$crossSectionCount div 2'/> does not have legal number of MFVec2f values, must be evenly divisible by 2 (crossSection='<value-of select='@crossSection'/>') </assert>
       <assert test="(($scaleCount mod 2)        = 0)" role="warning">&NodeDEFname; scale array size <value-of select='$scaleCount div 2'/> does not have legal number of MFVec2f values, must be evenly divisible by 2 (scale='<value-of select='@scale'/>') </assert>
       <assert test="(($spineCount mod 3)        = 0)" role="warning">&NodeDEFname; spine array size <value-of select='$spineCount div 3'/> does not have legal number of MFVec3f values, must be evenly divisible by 3 (spine='<value-of select='@spine'/>') </assert>
       <assert test="(($orientationCount mod 4)  = 0)" role="warning">&NodeDEFname; orientation array size <value-of select='$orientationCount div 4'/> does not have legal number of MFRotation values, must be evenly divisible by 4 (orientation='<value-of select='@orientation'/>') </assert>
       <!-- check for sufficient array size -->
       <assert test="(($spineCount = 0)      or ($spineCount > 5))" role="error">&NodeDEFname; spine array size of <value-of select='$spineCount'/> is insufficient to define a line segment, must have 6 or more values (spine='<value-of select='@spine'/>') </assert>
       <!-- check for matching array sizes -->
       <assert test="($scaleCount = 0)       or ($scaleCount = 2)       or (($scaleCount div 2)       = ($spineCount div 3))" role="warning">&NodeDEFname; scale array size <value-of select='$scaleCount div 2'/> (scale='<value-of select='@scale'/>') must match spine array size <value-of select='$spineCount div 3'/> </assert>
       <assert test="($orientationCount = 0) or ($orientationCount = 4) or (($orientationCount div 4) = ($spineCount div 3))" role="warning">&NodeDEFname; orientation array size <value-of select='$orientationCount div 4'/> (orientation='<value-of select='@orientation'/>') must match spine array size <value-of select='$spineCount div 3'/> </assert>
       <report test="(@beginCap='TRUE' )" role="error">&NodeDEFname; beginCap='TRUE'  beginCap='true' instead</report>
       <report test="(@beginCap='FALSE')" role="error">&NodeDEFname; beginCap='FALSE'  beginCap='false' instead</report>
       <report test="(@endCap='TRUE'   )" role="error">&NodeDEFname; endCap='TRUE'  endCap='true' instead</report>
       <report test="(@endCap='FALSE'  )" role="error">&NodeDEFname; endCap='FALSE'  endCap='false' instead</report>
       <report test="not(/X3D[(@profile='Immersive') or (@profile='Full')] or /X3D/head/component[@name='Geometry3D'][number(@level) ge 4] or (count(preceding::*[local-name()=$NodeName]) > 0))" role="error">&NodeDEFname; requires at least <component name='Geometry3D' level='4'/> or <X3D profile='Immersive'/> </report>
     </rule>

p.s. for anyone interested who is able to go to Web3D 2015 conference, am happy to meet and discuss further there.

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 mailing list