US Pro 5.3 IGES Export

png

The IGES export module is new for Geodesica-SFX 0-9-9-8-win64.

Background

IGES stands for Initial Graphics Exchange Specification and is now an old format, version one being first published in 1978. It was developed as a neutral format to ease the transfer of information between different CAD systems. There have been several criticism of IGES in the past - mainly because of its age, and also because early versions of the specification only represented surfaces. However with age comes great maturity, and later versions IGES are feature rich; not least they implement MSBO’s (Manifold Solid B-Rep Objects), which can be used for solid models, providing all the required data for weight, volume, surface area, and moments of inertia. The problem with IGES is not the format itself, but rather with the many different post-processors in existence - most of which are sealed black boxes, developed in house, and not consistently implemented across CAD systems and platforms. Therefore, when implementing IGES export, I endevoured to offer as many entity types as possible; at least one of these should work with your own particular IGES importer.

This was a steep learning curve, but instead of using a third party library, I wanted to write my own code, implementing only what was required. Thus the IGES export module is not a full blown pre-processor in the conventional sense, but rather a suite of piecemeal classes. The most tricky part was formatting parameter data within the 80 char column limit, and I shamelessly lifted a function from BRL-CAD’s IGES export code for this purpose. Indeed, the BRL-CAD sources were a very helpful introduction to writing my own exporter. Thank you BRL-CAD for pointing a way through the IGES maze.

Geodesica’s intersection code has always used accurate algebraic boundary conditions; however, the DXF and OBJ export meshes are only polygonal representations. But with IGES export, the benefit of generating highly accurate MSBO’s from the intersection data is now possible...

Advanced options

png

UNITS

Lets you choose any unit supported by the IGES standard, including miles, feet, inches, mils, microinches, kilometers, meters, centimeters, millimeters, and microns. The exported coordinate data is converted from Geodesica’s Working units (which are set in set the Preferences) to the units selected in the menu. If you select USE MODEL UNITS, the output units are not converted, but remain the same as the Working units set in Geodesica’s preferences. This is the preferred option as additional unit conversion during export can incur a loss of precision. Be sure to check the option Scale to Actual Size in the main export window.

png

COINCIDENT POINT RESOLUTION

Specifies the smallest distance between coordinates, in model-space units, that the receiving system shall consider as separate. For example, if the value is 0.0001, postprocessors shall consider as “coincident” any coordinate locations in the exported file which are less than 0.0001 model-space units apart.

SIGNIFICANT DIGITS

The number of significant digits for coordinate data in the exported file are set by this counter. The minimum number is 1 and the maximum number is 10.

MAX LINE WIDTH IN POINTS

Specifies the maximum line width in Points. Minimum value is 0.25; maximum value is 5. Note: 1 point = 0.3514598 millimeters.

POLYLINE ENTITY

Multi-span linear spline curves (polylines) are output as copious data (IGES entity #106), or Rational B-spline curves (IGES entity #126).

CELLS

Export options are:

  1. B-Rep Shell (IGES entity #186) - exports a single manifold of cells. All cells must be coplanar.
  2. Bounded Plane (IGES entity #108) - exports individual cell entities. Non-coplanar cells are trifanned during export.

At the time of writing, AutoCAD preserves Isolate Set colours using either option. However, FreeCAD, CAD Assistant and CAD Exchanger only preserve Isolate Set colours using the Bounded Plane option. The Isolate Set ID, as given by Geodesica, is listed in the model hierarchy.

When using the Bounded Plane (IGES entity #108) and importing into FreeCAD, you must import the IGES file using the Part menu and then select Import CAD.... When the dialogue appears, be sure to select Import IGES with colors from the bottom-right pop-up.

png

png

Below: a Dual lattice of cells exported using the Bounded Planes option. Only the blue penatagonal cells are coplanar. The non-coplanar cells are decimated into trifans during export. Each simplex within a cell has the same parent colour and ID:

png

STRUTS

Export options are:

  1. B-Rep Shell (IGES entity #186)
  2. Trimmed Surfaces (IGES entity #144)

At the time of writing, only B-Rep Shells are implemented.

KILL CONSTRUCTION LINES

When this option is checked, construction lines are removed from the Shell B-Brep. Whilst this makes for a smaller file, it removes any hints that may be required for further modelling in the import program. For example, Geodesica constructs Edge type struts so that the quad-edge (ORG to DEST) passes through the center line of the strut. This location is precisely marked by the trifan center vertex at each end of the strut. However, when ‘Kill Construction Lines’ is ON, the trifan edges are deleted leaving a single polygonal face, and the location of the center line is lost. Likewise, the mitre construction edges for Face type struts are deleted when this option is ON. This is made clear in the following screenshots.

png png

png png

png png

ELLIPTICAL STRUT CAVEAT

More research is required on how to export elliptical struts using IGES. Until this is resolved, it is advised to avoid this strut type when exporting to IGES. The problem is as follows. Geodesica’s elliptical strut uses the Right Cylindrical Surface entity, which is obviously a contradiction in terms. However, what is interesting is that after import into both CAD Assistant and FreeCAD, the BREP shaft remains elliptical according to the set profile and appears geometrically correct in all respects - even the tangential intersection planes at each end are preserved:

png

However, when importing elliptical struts into AutoCAD online viewer, the elliptical profile is removed and the struts loose their intersection plane information. This is the expected behaviour when using a Right Cylindrical Surface for an elliptical profile. I hope to have this fixed in version 0-9-9-9. Until then, please use another strut type when exporting to IGES.

HUBS

Export options are:

SPHERE

  1. Surface of Revolution (IGES entity #120)
  2. B-Rep Shell (IGES entity #186) with Spherical Surface (IGES entity #196)
  3. CSG Sphere (IGES entity #158)

CYLINDER

  1. Surface of Revolution (IGES entity #120)
  2. B-Rep Shell (IGES entity #186) with Right Circular Cylindrical Surface (IGES entity #192)
  3. CSG Right Circular Cylinder (IGES entity #154)

CONE

  1. Surface of Revolution (IGES entity #120)
  2. B-Rep Shell (IGES entity #186) with Right Circular Conical Surface (IGES entity #194)
  3. Right Circular Cone Frustum (IGES entity #156)

RING

  1. Surface of Revolution (IGES entity #120)
  2. B-Rep Shell (IGES entity #186)

RING FLANGE

  1. Surface of Revolution (IGES entity #120)
  2. B-Rep Shell (IGES entity #186)

STAR FLANGE

  1. Surface of Revolution (IGES entity #120)
  2. B-Rep Shell (IGES entity #186)
  3. CSG Right Circular Cylinder (IGES entity #154)

IMPORTANT: The Surface of Revolution option uses a Composite Curve (IGES entity #102) as the generatrix; this makes for a much smaller IGES file and is supported by AutoCAD, FreeCAD, ShareCAD, MOI, IGS Viewer and others. However, if your IGES post-processor does not support Composite Curves, (eg CAD Exchanger), hubs will be absent after import: in this instance please use B-Rep Shell or CSG instead.

The CSG option remains untested as I am unable to find a program with an IGES importer that suppports it.

USE PARAMETRIC REFDIR VECTORS

US-Pro IGES 5.3 specification states that unparameterized versions of both the Right Circular Conical Surface (entity #194) and Right Circular Cylindrical Surface (entity #192) do not require a RefDir vector when using Form number 0. (The RefDir vector is a unit vector that is perpendicular to the entity axis). However, when using Form number 0 with AutoCAD’s online viewer, I discovered that entities fail to appear unless the RefDir vector is supplied. Clearly AutoCAD’s online viewer requires a RefDir vector, whether the surface is parameterized or not. Supplying the RefDir vector for a non-parametrized surface is contrary to the US-Pro IGES 5.3 specification but obvioulsy some applications require it. If B-Rep entities fail to import or become skewed, try using this option. It is ON as default.

Exported files have been tested with CAD Assistant, FreeCAD and AutoCAD online viewer. Examples: Star Flange Hubs + Struts (hub ingress was set at zero). The following screenshot shows the intersection measurements taken between the top edge of diamond struts and the spherical hub surfaces: Sphere Hubs and Diamond Struts.

Isolate Set Groups

Enitity grouping is not yet fully supported when exporting to IGES; however, if you elect to group by colour, objects are ordered sequentially in the file by their Isolate Set colours. Thus when you expand the entity tree in your CAD program, some semblance of order is preserved, with each entity labelled by its Object ID given in Geodesica’s Log. Be aware that exporting IGES groups is S L O W.