2.2.6 • Published 3 months ago

@jscad/x3d-deserializer v2.2.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

@jscad/x3d-deserializer

Deserializer of X3D data to JSCAD geometries

NPM version NPM downloads Build Status Stability License

User Group Lerna JavaScript Style Guide

Backers Sponsors

Overview

This deserializer converts X3D (XML encoded) formatted data (files) to JSCAD scripts or geometries.

X3D Implementation Notes

The X3D XML Coding changes as new releases are published.

This deserializer converts only what is supported by JSCAD libraries. Full document conversion is NOT supported, however conversion of the following X3D entities are possible:

X3D EntityJSCAD GeometryNotes
Arc2Darc2D shape
ArcClose2Dcircle2D shape
Boxcuboid3D shape
Circle2Darc2D shape
Conecylinder3D shape
Cylindercylinder3D shape
Disk2Darc or circle2D shape
ElevationGridpolyhedron3D mesh
ExtrusionextrudeFromSlices3D mesh BUGGY
IndexedFaceSetpolyhedron3D mesh
IndexedLineSetline2D shape or 3D shape (UNSUPPORTED)
IndexedQuadSetpolyhedron3D mesh
IndexedTriangleFanSetpolyhedron3D mesh
IndexedTriangleSetpolyhedron3D mesh
IndexedTriangleStripSetpolyhedron3D mesh
LineSetline2D shape or 3D shape (UNSUPPORTED)
NurbsCurveUNSUPPORTED
NurbsCurve2DUNSUPPORTED
PointSetUNSUPPORTED
Polyline2Dline2D shape
Polypoint2DTBD
QuadSetpolyhedron3D mesh
Rectangle2Drectangle2D shape
Spheresphere3D shape
TriangleFanSetpolyhedron3D mesh
TriangleSetpolyhedron3D mesh
TriangleSet2Done or more geom22D shape
TriangleStripSetpolyhedron3D mesh
TextUNSUPPORTED

UNIT can be changed by a 'unit' statement

  • length (meters * conversionFactor)
  • angle (radians * conversionFactor)

In addition, colors as part of materials are added to geometry. And colors as part of mesh are added to polygons of a geometry.

Finally, there are many applications that can save to X3D formats. All testing is performed with X3D files from Web3D.org, period.

Table of Contents

Installation

npm install @jscad/x3d-deserializer

Usage

const x3dDeSerializer = require('@jscad/x3d-deserializer')

const rawData = fs.readFileSync('PATH/TO/file.x3d')
const jscadScript = x3dDeSerializer.deserialize({filename: 'file.x3d', output: 'script'}, rawData)

Contributing

The various JSCAD packages and all source code are part of the JSCAD Organization, and maintained by a group of volunteers. We welcome and encourage anyone to pitch in but please take a moment to read the following guidelines.

  • If you want to submit a bug report please make sure to follow the Reporting Issues guide. Bug reports are accepted as Issues via GitHub.

  • If you want to submit a change or a patch, please read the Contributing Guide. New contributions are accepted as Pull Requests via GitHub.

  • We only accept bug reports and pull requests on GitHub.

  • If you have a question about how to use JSCAD, then please start a conversation at the JSCAD User Group. You might find the answer in the JSCAD.org User Guide.

  • If you have a change or new feature in mind, please start a conversation with the Core Developers and start contributing changes.

Small Note: If editing this README, please conform to the standard-readme specification.

License

The MIT License (MIT) (unless specified otherwise)

2.2.6

3 months ago

3.0.0-alpha.0

8 months ago

2.2.5

11 months ago

2.2.4

1 year ago

2.2.3

1 year ago

2.2.2

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.1.4

2 years ago

2.1.5

2 years ago

2.1.3

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

3 years ago