我正在解析 STEP 文件 ISO-10303-21;在java中使用Part21Parser 以下是文件结构
标题;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();
}
但是当我运行时,它给出了无法找到架构汽车设计的异常,我不确定它期望什么样的架构以及应该是什么有效架构,因为在线上没有关于此异常的帮助。任何处理 STEP/EXPRESS 文件的人都可以帮忙
以下是堆栈跟踪
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