STEP Files Parsing

1.8k views Asked by At

I am working to parse STEP files ISO-10303-21; using Part21Parser in java Following is file structure

HEADER; FILE_DESCRIPTION(('STEP AP214'),'1'); FILE_NAME('s25552_b159_a1_13.stp','2016-10-04T07:52:56',(' '),(' '),'Spatial InterOp 3D',' ',' '); FILE_SCHEMA(('automotive_design')); ENDSEC;

 static Model read_file (String filename) throws STDevException, IOException {
           Part21Parser parser = new Part21Parser();
           return parser.parse(filename);
        }

public static void main(String[] args) {

        try {
            Part21Parser parser = new Part21Parser();
            try {
                Model m1 = read_file("D:/Braunschweig_board.stp");

            } catch (IOException e) {

                e.printStackTrace();
            }
        } catch (STDevException e1) {

            e1.printStackTrace();
        }

But when I run, it gives exception that Cannot find schema automotive_design I am not sure what kind of schema is it expecting and what should be the valid schema as there is no help regarding this exception online. Any one who worked on STEP/EXPRESS files could please help

Following is stacktrace

com.steptools.stdev.SchemaNotFoundException: Cannot find schema automotive_design
    at com.steptools.stdev.SchemaBase.forName(SchemaBase.java:61)
    at com.steptools.stdev.p21.Part21Parser.getSchema(Part21Parser.java:693)
    at com.steptools.stdev.p21.Part21Parser.getSchema(Part21Parser.java:673)
    at com.steptools.stdev.p21.Part21Parser.getPopulation(Part21Parser.java:547)
    at com.steptools.stdev.p21.Part21Parser.parse_DATA_SECTION(Part21Parser.java:561)
    at com.steptools.stdev.p21.Part21Parser.parse_EXCHANGE_FILE(Part21Parser.java:302)
    at com.steptools.stdev.p21.Part21Parser.parse(Part21Parser.java:230)
    at com.steptools.stdev.p21.Part21Parser.parse(Part21Parser.java:112)
    at com.steptools.stdev.p21.Part21Parser.parse(Part21Parser.java:92)
    at com.steptools.stdev.p21.Part21Parser.parse(Part21Parser.java:80)
    at CadParser.read_file(CadParser.java:26)
    at CadParser.main(CadParser.java:35)
Caused by: java.lang.ClassNotFoundException: com.steptools.schemas.automotive_design.Schema
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)`enter code here`
    at java.lang.Class.forName(Unknown Source)
    at com.steptools.stdev.SchemaBase.forName(SchemaBase.java:59)
    ... 11 more
0

There are 0 answers