FRep XML specifications

Below is the description of XML format for FRep scenes used by Denis in FRep viewer and by Oleg in Ray-tracer.

File structure

  • Header
  • Parameters section
  • Models section

Header

<?xml version="1.0" ?>

Parameters section

Bounding box: minX (float), minY (float), minZ (float), maxX (float), maxY (float), maxZ (float)

Grid resolution (for polygonization): resolutionX (float), resolutionY (float), resolutionZ (float)

Example:

<Parameters 
minX="-5.1" minY="-1.5" minZ="-4.5" 
maxX="5.05" maxY="9.7" maxZ="5.3" 
resolutionX="50.0" resolutionY="50.0" resolutionZ="50.0" T="0.0" 
/>

Models section

Model is described inside <FRepModel> tag (see below). There can be several different models inside one file. See description of the tags inside below.

Model structure

  • <FRepModel> (model tag). Attributes: Name (string).

Model can have tags that are describing geometry and operations (geometry operations and transformations).

Geometry tags

  • <Sphere> (ellipsoid object). Attributes: Name (string), centerX (float), centerY (float), centerZ (float), radiusX (float), radiusY (float), radiusZ (float)
  • <Cylinder> (elliptic cylinder object). Attributes: Name (string), direction (x/y/z), centerX (float), centerY (float), centerZ (float), radiusX (float), radiusY (float), height (float)
  • <Cone> (elliptic cone object). Attributes: Name (string), direction (x/y/z), centerX (float), centerY (float), centerZ (float), radiusX (float), radiusY (float), height (float)
  • <Box> (box object). Attributes: Name (string), centerX (float), centerY (float), centerZ (float), dimensionX (float), dimensionY (float), dimensionZ (float)
  • <Torus> (torus object). Attributes: Name (string), direction (x/y/z), centerX (float), centerY (float), centerZ (float), radiusBig (float), radiusSmall (float)

Geometry does not have child nodes!!

Geometry operations

Binary operations:

  • <CSG> (CSG operation). Attributes: Name (string), type (Intersection/Union/Difference)
  • <Blend> (CSG blend operation). Attributes: Name (string), type (Intersection/Union/Difference), A0 (float), A1 (float), A2 (float)

Transformations

  • <Transform> (affine transformation). Attributes: Name (string), transX (float), transY (float), transZ (float), angleX (float), angleY (float), angleZ (float), scaleX (float), scaleY (float), scaleZ (float)

Example:

<Transform Name="transformNode9" 
transX="-3.3" transY="5.0" transZ="-0.7" 
angleX="0.0" angleY="-0.6" angleZ="0.0" 
scaleX="1.0" scaleY="1.0" scaleZ="1.0" />

Misc

fhfint_frep_xml.txt · Last modified: 2009/09/05 03:45 by oleg
This site contains HyperFun and other software that is free to use and modify under the provisions of the CGPL agreement unless otherwise stated.
Project hosted by the Digital Materialization Group
HyperFun CGPL Creative Commons License Valid CSS