KShell Analysis

Repackaging STEP Part 21 files

site and software by
Vincent Marchetti
vmarchetti@kshell.com
repackage web application
A STEP Part 21 file is uploaded via standard HTTP protocol techniques. After upload, a web page allows the user to enter additional product data and to select one of the shape representations in the uploaded file. A result Part 21 file incorporating the chosen shape and the entered product data is downloaded, again via HTTP protocol.
This server-side application is composed of code written in the Python scripting language, of the SWI-Prolog interpreter, and a Part 21 to Prolog translation application written in C++.

Introduction

This is a server-side application with a web interface whose function is to read a STEP Part 21 exchange file, extract a geometric model, apply edited or additional product data, and generate a new Part 21 file containing the selected geometric model and supplied product data. The application produces a STEP AP 203 (configuration-controlled design) and is reads such files as input; because the overall structure of the STEP standard uses common resources it is likely that the geometric models in other schema's files will be readable as well. There are two envisioned use cases:

  • A user generates a solid model and exports to a STEP file from a CAD system which supplies incomplete or inapplicable value for the product data. This application allows a STEP file to be generated using the CAD-generated geometry and user supplied product data.
  • A user has a file which contains geometric models for multiple parts; multiple versions of the same product, or multiple representations of a version; this application allows a selected geometric representation (model) to be singly output to a STEP Part 21 file.

The file output from this application will contain one shape representation for one version of one product; the product and version information as specified in STEP AP 203 (id, name, and description) may be supplied. The user can also set security level and approval status for the design elements of the output file; in this release of the application the security and approval information are applied uniformly over all elements but this is done merely to simplify the user interface and is not a fundamental limitation of the tools used to implement this application.

Implementation

This application was developed as a proof-of-utility of the tools developed for handling STEP data files with scripting tools. For this application the two significant processing tasks were identified to be:
  • From a Part 21 file identifying the shape representations present in the file and for each shape extracting the product and version information required to present this shape to the user for selection.
  • Given a selected shape in a Part 21 file, identify those components (the instances) which need to be copied into a new file in order to completely define the shape model.

These tasks are performed by Prolog language scripts run under the SWI-Prolog interpreter after the content of the uploaded files is translated into a file of Prolog clauses. The translation is performed by the read_exchange_structure application; the translation to Prolog clauses is discussed here.

Upload to repackage application

webmaster@kshell.com

Dec 18, 2007