Link Search Menu Expand Document

Package CAD Converter: cve.util.converter.stepconverter.step2asm

Import instruction :

import cve.util.converter.stepconverter.step2asm

About :

Copyright (c) 2012 G-SCOP Fr. Noel. All rights reserved. A step 2 cve converter through open cascade

Usage:

python step2asm.py stepdirectory output resolution scale

Example:

python step2asm.py . VR 0.0001 1.

CAD converter is a utility for converting manufacturing CAD models in STEP Iso 10203 AP 203 or 214 format into a dedicated file for virtual reality processing. STEP is a very accurate and complete model, but it does not allow the exhaustive exchange of data from CAD software. It is, however, an international standard, recognised by all CAD software publishers who all offer an export in STEP format.

In STEP the model of a mechanism is recursively decomposed into Assemblies, sub-assemblies, …, until the definition of parts which are the sheets of a mechanical product nomenclature. The parts are represented by topological surfaces, i.e. a set of bi-parametric, connected and possibly restricted surfaces. This is called a B-Rep model. The surface elements are very varied but allow the representation of canonical surfaces (spheres, torus, cylinders, etc.), as well as any other surfaces. Certain characteristics such as the colours of the parts are also stored in these STEP models.

In many industrial CAD tools (parametric CAD), the tool also models the geometrical construction tree of the parts, positional constraints and other system features that are currently not saveable or saved in STEP format. While colours are managed by STEP, texture association is not currently accessible. STEP therefore records accurate and important geometric information from CAD but remains incomplete.

Virtual reality tools use geometrical representations based essentially on polyhedra. Most of the time the conversion of CAD data for VR converts the geometry by polyhedral tessellation and returns a set of well-positioned polyhedral objects. CAD CONVERTER starts in the same mode but recognises the higher level semantic information in the STEP file. The product nomenclature (assembly, sub-assembly, …, part) is maintained in relation to the polyhedra produced. The position of the objects is made in reference to their parent assembly. Colour properties are also saved, and geometry reduction properties for dynamic analysis (centre of gravity, volume, inertia) are calculated and associated with each part. The polyhedra are decomposed into subgroups which allow to associate to each group the canonical geometrical characteristics (axis, radius, of a cylinder, etc). The colour of each part is also known and the whole is saved in an ascii format that is easily reusable, therefore more complete (volume reduction feature) and more manageable than the STEP format.

It therefore provides an advantage for manipulating CAD data directly in VR or AR applications (thanks to the polyhedral representation exported in wavefront (obj) format) while preserving the semantics existing in the CAD codes. Finally, the use of STEP as a bridge between CAD and the VR/AR world ensures interoperability with the majority of computer-aided design tools used in mechanical design.

Functions

Function summury
step2asm(indir, output, resolution, scale=1.0) Convert a step file to asm/json ascii file (more…)

Functions details

step2asm

def step2asm(indir, output, resolution, scale=1.0)

Convert a step file to asm/json ascii file

  • → indir: where are step files to convert
  • → output: where to store output files
  • → resolution: chord resolution to create polyhedrons (in meters : 0.001 for 1 mm)
  • → scale: a scale factor (may be 1.)