[x3d-public] UNIT statement syntax?

Alekseyev, Vsevolod (NIH/NIAID) [E] VAlekseyev at niaid.nih.gov
Mon Aug 8 10:29:29 PDT 2016


Yes, I would like to ask. For a UNIT statement, what would be the XML, please?

-----Original Message-----
From: Roy Walmsley [mailto:roy.walmsley at ntlworld.com] 
Sent: Monday, August 08, 2016 1:15 PM
To: Alekseyev, Vsevolod (NIH/NIAID) [E] <VAlekseyev at niaid.nih.gov>
Cc: x3d-public at web3d.org
Subject: RE: [x3d-public] UNIT statement syntax?

Seva,

Your observations mirror those previously reported on this topic. There is an existing Mantis issue for this - Issue 851. During a working group meeting held 14th October 2015 it was agreed that there should be a new clause "Encoding of statements" inserted after clause 6 "Encoding of nodes"
in ISO/IEC 19776-1 for the next version. This will cover all the points you raised.

If there is anything specific we can help you with in the meantime, please do not hesitate to ask.

Thanks for the comments - keep them coming!!

Regards,

Roy

-----Original Message-----
From: x3d-public [mailto:x3d-public-bounces at web3d.org] On Behalf Of Alekseyev, Vsevolod (NIH/NIAID) [E]
Sent: 08 August 2016 16:41
To: x3d-public at web3d.org
Subject: [x3d-public] UNIT statement syntax?

Neither X3D standard (ISO 19775:2013), nor the X3D XML encoding standard (ISO 19776-1:2015) seem to contain the syntax of the UNIT statement.

In the X3D standard, under Core component, section 7.2.5.5 talks about the UNIT statement. The wording goes

"A change in a base unit is specified by UNIT statements at the top of the file preceding any element content but in the statement order specified in
7.2.5.1 Organization. The form of the UNIT statement is:

UNIT <category> <name> <conversionFactor>"

The specified string is clearly not how it's supposed to go in an XML document. Especially if you consider the following section, 7.2.5.6, which specifies the syntax for META as "META <key> <data>". If you look at the XML encoding standard, there's no explicit syntax for neither of those statements, but there's an example for meta in section 4.2.3: "<meta name='description' content='X3D scene header and prototype syntax examples.
'/>" As you can see, neither "key" nor "data" parameter names translate directly into XML attribute names. For all we know, the "category", "name", and "conversionFactor" parameters of UNIT might as well correspond to XML attributes "type", "alias", and "coefficient".

In general, the expected format of the X3D <head> element is practically undocumented. Section 4.3.2 of the XML Encoding standard mentions that an XML file may contain a "single optional head element which can contain component, unit, and metadata information (as described 4.3.1 XML encoding)", but section 4.3.1 doesn't mention neither meta, nor component, nor unit.

In my specific case, UNIT became relevant because I'm working on an X3D implementation for a piece of 3D printing software. In a Web browser context, absolute values of coordinates are practically meaningless, because the display scale factor is transient and can be changed by the user any moment. Meanwhile, in a 3D printing context, retaining the intended object size is extremely relevant.




_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org




More information about the x3d-public mailing list