2 * Project Info: http://jcae.sourceforge.net
4 * This program is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License as published by the Free
6 * Software Foundation; either version 2.1 of the License, or (at your option)
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18 * (C) Copyright 2008, by EADS France
21 package org.jcae.opencascade.jni;
25 import static org.junit.Assert.*;
26 import org.junit.Test;
29 * Example which dump the label from the edges of a STEP file
30 * @author Jerome Robert
32 public class STEPLabel
34 @Test public void reader()
36 String testDir = System.getProperty("test.dir", "test");
37 String file = testDir + File.separator + "input" + File.separator + "cube.stp";
38 STEPControl_Reader aReader = new STEPControl_Reader();
39 aReader.readFile(file.getBytes());
40 aReader.nbRootsForTransfer();
41 aReader.transferRoots();
42 TopoDS_Shape s = aReader.oneShape();
43 TopExp_Explorer ex = new TopExp_Explorer(s, TopAbs_ShapeEnum.EDGE);
48 System.out.println(i+ " " + aReader.getLabel(ex.current()));