Skip to content

Import parameters by CAD format

Hugues Delorme edited this page Feb 7, 2022 · 1 revision

STEP

Long name of this format is STEP(ISO 10303).
Acceptable file suffix: *.step, *.stp
Reading files of this format is provided by class Mayo::IO::OccStepReader

Product Context

Key Type Default value
productContext Enumeration Both

When reading AP 209 STEP files, allows selecting either only design or analysis, or both types of products for translation Note that in AP 203 and AP214 files all products should be marked as design, so if this mode is set to analysis, nothing will be read

List of enumerated values:

  • Both - Translates all products
  • Design - Translate only products that have PRODUCT_DEFINITION_CONTEXT with field life_cycle_stage set to design
  • Analysis - Translate only products that have PRODUCT_DEFINITION_CONTEXT with field life_cycle_stage set to analysis

Assembly Level

Key Type Default value
assemblyLevel Enumeration All

Specifies which data should be read for the products found in the STEP file

List of enumerated values:

  • All - Translate both the assembly structure and all associated shapes. If both shape and sub-assemblies are associated with the same product, all of them are read and put in a single compound
  • Assembly - Translate the assembly structure and shapes associated with parts only(not with sub-assemblies)
  • Structure - Translate only the assembly structure without shapes(a structure of empty compounds). This mode can be useful as an intermediate step in applications requiring specialized processing of assembly parts
  • Shape - Translate only shapes associated with the product, ignoring the assembly structure (if any). This can be useful to translate only a shape associated with specific product, as a complement to assembly mode

Preferred Shape Representation

Key Type Default value
preferredShapeRepresentation Enumeration All

Specifies preferred type of representation of the shape of the product, in case if a STEP file contains more than one representation (i.e. multiple PRODUCT_DEFINITION_SHAPE entities) for a single product

List of enumerated values:

  • All - Translate all representations(if more than one, put in compound)
  • AdvancedBRep
  • ManifoldSurface
  • GeometricallyBoundedSurface
  • FacettedBRep
  • EdgeBasedWireframe
  • GeometricallyBoundedWireframe

Read Shape Aspect

Key Type Default value
readShapeAspect Bool true

Defines whether shapes associated with the PRODUCT_DEFINITION_SHAPE entity of the product via SHAPE_ASPECT should be translated. This kind of association was used for the representation of hybrid models (i.e. models whose shape is composed of different types of representations) in AP 203 files before 1998, but it is also used to associate auxiliary information with the sub-shapes of the part. Though STEP translator tries to recognize such cases correctly, this parameter may be useful to avoid unconditionally translation of shapes associated via SHAPE_ASPECT entities.

Read Names of sub Shapes

Key Type Default value
readSubShapesNames Bool false

Indicates whether to read sub-shape names from 'Name' attributes of STEP Representation Items

Encoding

Key Type Default value
encoding Enumeration UTF8

No description

List of enumerated values:

  • Shift_JIS - Shift Japanese Industrial Standards
  • EUC - EUC(Extended Unix Code), multi-byte encoding primarily for Japanese, Korean, and simplified Chinese
  • ANSI
  • GB - GB(Guobiao) encoding for Simplified Chinese
  • UTF8
  • CP_1250
  • CP_1251
  • CP_1252
  • CP_1253
  • CP_1254
  • CP_1255
  • CP_1256
  • CP_1257
  • CP_1258
  • ISO_8859_1
  • ISO_8859_2
  • ISO_8859_3
  • ISO_8859_4
  • ISO_8859_5
  • ISO_8859_6
  • ISO_8859_7
  • ISO_8859_8
  • ISO_8859_9

IGES

Long name of this format is IGES(ASME Y14.26M).
Acceptable file suffix: *.iges, *.igs
Reading files of this format is provided by class Mayo::IO::OccIgesReader

BSpline Continuity

Key Type Default value
bsplineContinuity Enumeration BreakIntoC1Pieces

Manages the continuity of BSpline curves (IGES entities 106, 112 and 126) after translation to Open CASCADE (it requires that the curves in a model be at least C1 continuous; no such requirement is made by IGES).This parameter does not change the continuity of curves that are used in the construction of IGES BRep entities. In this case, the parameter does not influence the continuity of the resulting Open CASCADE curves (it is ignored).

List of enumerated values:

  • NoChange - Curves are taken as they are in the IGES file. C0 entities of Open CASCADE may be produced
  • BreakIntoC1Pieces - If an IGES BSpline, Spline or CopiousData curve is C0 continuous, it is broken down into pieces of C1 continuous Geom_BSplineCurve
  • BreakIntoC2Pieces - IGES Spline curves are broken down into pieces of C2 continuity. If C2 cannot be ensured, the Spline curves will be broken down into pieces of C1 continuity

Surface Curve Mode

Key Type Default value
surfaceCurveMode Enumeration Default

Preference for the computation of curves in case of 2D/3D inconsistency in an entity which has both 2D and 3D representations.

Concerned entity types are 141 (Boundary), 142 (CurveOnSurface) and 508 (Loop). These are entities representing a contour lying on a surface, which is translated to a TopoDS_Wire, formed by TopoDS_Edges. Each TopoDS_Edge must have a 3D curve and a 2D curve that reference the surface.

The processor also decides to re-compute either the 3D or the 2D curve even if both curves are translated successfully and seem to be correct, in case there is inconsistency between them. The processor considers that there is inconsistency if any of the following conditions is satisfied:

  • the number of sub-curves in the 2D curve is different from the number of sub-curves in the 3D curve. This can be either due to different numbers of sub-curves given in the IGES file or because of splitting of curves during translation
  • 3D or 2D curve is a Circular Arc (entity type 100) starting and ending in the same point (note that this case is incorrect according to the IGES standard)

List of enumerated values:

  • Force3D - The 3D is always used to rebuild the 2D (even if 2D is present in the file)
  • Force2D - The 2D is always used to rebuild the 3D (even if 3D is present in the file)
  • Default - Use the preference flag value in the entity's Parameter Data section
  • Prefer2D - The 2D is used to rebuild the 3D in case of their inconsistency
  • Prefer3D - The 3D is used to rebuild the 2D in case of their inconsistency

Read Faulty Entities

Key Type Default value
readFaultyEntities Bool false

Read failed entities

Read Only Visible Entities

Key Type Default value
readOnlyVisibleEntities Bool false

No description

GLTF

Long name of this format is glTF(GL Transmission Format).
Acceptable file suffix: *.gltf, *.glb
Reading files of this format is provided by class Mayo::IO::OccGltfReader

Root Prefix

Key Type Default value
rootPrefix String

Prefix for generating root labels name

System Coordinates Converter

Key Type Default value
systemCoordinatesConverter Enumeration Undefined

No description

List of enumerated values:

  • Undefined
  • posYfwd_posZup
  • negZfwd_posYup

System Length Unit

Key Type Default value
systemLengthUnit Enumeration Undefined

System length units to convert into while reading files

List of enumerated values:

  • Undefined
  • Micrometer
  • Millimeter
  • Centimeter
  • Meter
  • Kilometer
  • Inch
  • Foot
  • Mile

Skip Empty Nodes

Key Type Default value
skipEmptyNodes Bool true

Ignore nodes without geometry(Yes by default)

Use Mesh Name As Fallback

Key Type Default value
useMeshNameAsFallback Bool true

Use mesh name in case if node name is empty(Yes by default)

OBJ

Long name of this format is Wavefront OBJ.
Acceptable file suffix: *.obj
Reading files of this format is provided by class Mayo::IO::OccObjReader

Root Prefix

Key Type Default value
rootPrefix String

Prefix for generating root labels name

System Coordinates Converter

Key Type Default value
systemCoordinatesConverter Enumeration Undefined

No description

List of enumerated values:

  • Undefined
  • posYfwd_posZup
  • negZfwd_posYup

System Length Unit

Key Type Default value
systemLengthUnit Enumeration Undefined

System length units to convert into while reading files

List of enumerated values:

  • Undefined
  • Micrometer
  • Millimeter
  • Centimeter
  • Meter
  • Kilometer
  • Inch
  • Foot
  • Mile

Single Precision For Vertex Coordinates

Key Type Default value
singlePrecisionVertexCoords Bool false

Single precision flag for reading vertex data(coordinates)

DXF

Long name of this format is Drawing Exchange Format.
Acceptable file suffix: *.dxf
Reading files of this format is provided by class Mayo::IO::DxfReader

Scaling

Key Type Default value
scaling Double 1.000000

Scale entities according some factor

Import annotations

Key Type Default value
importAnnotations Bool true

Import text/dimension objects

Group objects by layer

Key Type Default value
groupLayers Bool true

Group all objects within a layer into a single coumpound shape

Font for TEXT objects

Key Type Default value
fontNameForTextObjects Enumeration Arial

Name of the font to be used when creating shape for text objects