Home - andreasplesch/OCCToX3D GitHub Wiki
Welcome to the OCCToX3D wiki!
Outline
Targets
X3D is flexible enough to provide targeted representations for diverse use cases.
Ideas
preserve hierarchy in x3d export
occ has a document hierarchy which is similar to the x3d scenegraph, including mulitparenting and def/use referencing.
The occ vrml export preserves some of that hierarchy but eventually it will make sense to create a x3d exporter which also does that.
occ uses hierarchical labels to mark entries into the document (graph).
0: corresponds to the (first) document
0:1 level (subdocument)
0:1:1 shapes, includes all geometry and grouping
0:1:2 colors, includes all color definitions used in the shapes
0:1:3 layers, additional organization
0:1:4 d>s, dimensioning data
0:1:5 materials, like shading models
0:1:7 views
translation to x3d:
0: x3d element, has a name attribute -> Meta header
0:1 unused
0:1:1 shapes
compound/assembly -> Group: meta: area, centroid, volume, name;
DEFname = label (0:1:1:1), children components
instance with reference and location -> Transform: meta: name, transform location,
DEFname = label, children single reference (has to lookup reference type)
simple shape with sub shapes: Shape with USE Appeareance to color from colors, and geometry from TSolid
0:1:7: Viewpoints
Documentation
https://raw.githack.com/tpaviot/pythonocc-documentation/master/api_doc/7.4.0beta/index.html