[x3d-public] Alternate Units for X3D and 3D Printing

vmarchetti at kshell.com vmarchetti at kshell.com
Fri Dec 8 09:47:51 PST 2017


I'm just confirming what Leonard and Alan have pointed out.

The Design Printing and Scanning Working Group examined NetFabb support for X3D in October 2017 and prepared a document of some issues we discovered; at http://x3dgraphics.com/examples/X3dForAdvancedModeling/ToolConversions/NetfabbConversionIssues.txt <http://x3dgraphics.com/examples/X3dForAdvancedModeling/ToolConversions/NetfabbConversionIssues.txt> . 

The X3D files generated by NetFabb for export declare X3D version 3.0; so it makes sense that the Netfabb code predates the introduction of the UNIT statement (which is encoded as an 'unit' XML element in the header section. The Netfabb X3D implementation 'knows' that the default unit for X3D is meters; so it multiplies imported coordinates by 1000 (it also scales coordinates back down by a factor of 0.001 on export); but doesn't yet know that the X3D unit can be overridden by the UNIT statement ( <unit> element ).

This could be worked around with a global Transform node, but as Alan pointed out, Transform nodes are ignored by the NetFabb importer. For the long term solution it would be better for X3D importers such as NetFabb took into account the UNIT declarations when present, and each application made the appropriate conversion on raw X3D data as needed for that domain.

Vince Marchetti

> On Dec 8, 2017, at 10:20 AM, Ryan, Justin <jryan1 at phoenixchildrens.com> wrote:
> 
> Hello X3D Public List,
>  
> I was hoping someone could answer a question for me regarding units. I have been translating STL to X3D for medical 3D models. While the STLs are technically unitless, the de facto standard unit of medical 3D reconstruction is mm. A direct conversion means that the X3D are scaled up by a factor of 1000.
>  
> While I am working on creating a script to scale the coordinate points, I was also hoping on utilizing xml tags to also scale.
>  
> I attempted adding the following (separate and together); however, opening the files in netfabb had zero impact on its import scale.
>  
> Option 1 (right after opening scene tag):
> <physical><length unit=”MILLI” basis=”1” numeral=”DEC”/></physical>
>  
> Option 2 (right after opening head tag):
> <unit category='length' conversionFactor='0.001' name='millimeters'/>
>  
> Any ideas as to why neither of these fixed my scale issue? Besides changing the actual coordinate points (dividing all by 1000), are there other unit tags that might be opened by netfabb? My concern with using a <transform scale…> is that the reason why there is a scale might be lost if the files were being disseminated.
>  
> Last follow-up question, what is the maximum precision of coordinate points within X3D (if I do go the divide by 1000 route)?
>  
> <image001.jpg>
> <image002.jpg>
> Justin Ryan, PhD
> Arizona State University Adjunct Faculty
> Phoenix Children’s Hospital Research Scientist
>  
> Phoenix Children's Hospital
> Cardiac 3D Print Lab
>  
> p (602) 933-3902
>  
> Cardiac3DPrintLab.com <http://cardiac3dprintlab.com/>	
>  
> <image003.jpg>
>  
>  
>  
> This transmission, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential, proprietary, legally privileged, or otherwise protected by law from disclosure. Any unauthorized review, use, copying, disclosure, or distribution is prohibited. If you are not the intended recipient, or the person responsible for delivering this to an addressee, you should notify the sender immediately by telephone or by reply e-mail, and destroy all copies of the original message.
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org <mailto:x3d-public at web3d.org>
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org <http://web3d.org/mailman/listinfo/x3d-public_web3d.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20171208/d2c4e9ad/attachment.html>


More information about the x3d-public mailing list