[x3d-public] Errors in Geometry2dComponentPrototypes.wrl at web3d.org

Bederov, Sergey bederov at cortona3d.com
Mon Jul 4 02:32:28 PDT 2016


Hello Don,

Спасибо for your quick response :-)

The points->point issue is now OK.

The problem with metadata is that there is an attempt to connect that field to a Group node inside the PROTO declaration:


PROTO Arc2D [
  field        SFFloat	startAngle 0
  field        SFFloat	endAngle 1.5707963265
  field        SFFloat	radius 1
  exposedField SFNode      metadata NULL    # [appinfo] Metadata node only

    # default NULL

] {
  DEF ArcIndexPoints IndexedLineSet {
    coord DEF Arc3DPoints Coordinate {
    }
  }
  Group {
        	metadata IS metadata           # error: Group doesn't have such field


I would suggest removing the line 45 "metadata IS metadata". This line is an error from the VRML point of view because in VRML the Group node doesn't have a "metadata" field.

You can safely keep the "metadata NULL" field in the PROTO declaration; it is indeed required for Arc2D nodes having something in that field. 


Sergey Bederov
Senior Developer
Cortona3D
Nakhimovsky pr-t, 47, 19-th floor
Moscow, Russia
Phone: +7 (499) 129-15-00
www.cortona3D.com


> -----Original Message-----
> From: Don Brutzman [mailto:brutzman at nps.edu]
> Sent: Friday, July 01, 2016 4:15 AM
> To: Bederov, Sergey
> Cc: x3d-public at web3d.org
> Subject: Re: [x3d-public] Errors in Geometry2dComponentPrototypes.wrl 
> at web3d.org
> 
> Thank you Sergey, спасибо for reporting this simple prolem.  The 
> points -> point problem is corrected just as you suggested, and now 
> matches the specification.
> 
> 	http://www.web3d.org/documents/specifications/19775-
> 1/V3.3/Part01/versionContent.html#Polypoint2D
> 	http://www.web3d.org/x3d/content/X3dTooltips.html#Polypoint2D
> 
> The metadata node is a little more interesting.  The current design 
> has them in the prototype declaration as SFNode field declarations, 
> but not connected anywhere inside the prototype body since they are 
> not valid VRML97.  I think the original motivation was to not throw 
> them away, since some X3D players which retained backwards compatibility might use them.
> 
> If you think these are harmful to include since they inject Metadata 
> nodes into an unsuspecting VRML browser, that seems pretty reasonable.  
> If so, then I can omit them as you suggest, or possibly turn those 
> statements into comments when translating from .x3d to .wrl file encoding.  Please advise.
> 
> Meanwhile the "point" changes are checked in and upload online.  Test
> reports:
> 
> Pass: InstantReality, freewrl (but then crashes after a bit), 
> H3DViewer, X3DOM, Cobweb
> Fail: BS Contact, Octaga, view3dscene, Xj3D
> 
> Updated scenes and updated X3dToVrml97.xslt stylesheet all checked 
> into version control.  Available via
> 
> 	http://www.web3d.org/x3d/content/examples/Basic/development#Geometry2
> dComponentExamples
> 
> The Cobweb result is new, and looks good.  Attached. 8)
> 
> 
> On 6/28/2016 10:47 AM, Bederov, Sergey wrote:
> > Hello all,
> >
> >
> >
> > Recently I have seen a VRML file converted from X3D by some 
> > converter. The
> file is using some non-standard VRML nodes and has EXTERNPROTO 
> definitions pointing to:
> >
> >
> >
> >
> http://www.web3d.org/x3d/content/examples/Basic/development/Geometry2d
> Compon
> entPrototypes.wrl
> >
> >
> >
> > I want to say that there are errors in that file:
> >
> >
> >
> > Line 45:
> >
> >           metadata IS metadata
> >
> >
> >
> > This field is contained in a “Group” node, but in VRML this node 
> > doesn’t
> have a “metadata” field. Here, this link can safely be removed because 
> this field is not used anywhere.
> >
> >
> >
> > Line 497:
> >
> >           field        MFVec2f         points IS points
> >
> >
> >
> > The “points” field is not declared in the PROTO declaration, but the
> “point” field is declared instead. Replacing “points” to “point” seems 
> to make it work.
> >
> >
> >
> > To whom it may concern, please fix these errors. Currently, that 
> > file is
> an invalid VRML file, and a well-behaving VRML browser doesn’t load it 
> and therefore can’t use the PROTO declarations contained therein, even 
> if they don’t have errors.
> >
> >
> >
> >
> >
> > Thank you,
> >
> > Sergey Bederov
> >
> >
> >
> >
> >
> > _______________________________________________
> > x3d-public mailing list
> > x3d-public at web3d.org
> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> >
> 
> 
> 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