]> gerrit.simantics Code Review - simantics/3d.git/blob - org.jcae.opencascade/src-java/org/jcae/opencascade/jni/BRepTools.java
Include old 64-bit versions of org.jcae.opencascade and vtk bundles
[simantics/3d.git] / org.jcae.opencascade / src-java / org / jcae / opencascade / jni / BRepTools.java
1 /* ----------------------------------------------------------------------------\r
2  * This file was automatically generated by SWIG (http://www.swig.org).\r
3  * Version 2.0.4\r
4  *\r
5  * Do not make changes to this file unless you know what you are doing--modify\r
6  * the SWIG interface file instead.\r
7  * ----------------------------------------------------------------------------- */\r
8 \r
9 package org.jcae.opencascade.jni;\r
10 \r
11 /** Provides various utilities for BRep. */\r
12 public class BRepTools {\r
13   private long swigCPtr;\r
14   protected boolean swigCMemOwn;\r
15 \r
16   public BRepTools(long cPtr, boolean cMemoryOwn) {\r
17     swigCMemOwn = cMemoryOwn;\r
18     swigCPtr = cPtr;\r
19   }\r
20 \r
21   public static long getCPtr(BRepTools obj) {\r
22     return (obj == null) ? 0 : obj.swigCPtr;\r
23   }\r
24 \r
25   protected void finalize() {\r
26     delete();\r
27   }\r
28 \r
29   private synchronized void delete() {}\r
30 \r
31         /**\r
32          * Read a shape from a file.\r
33          * This is an helper method. It do not exists in Opencascade.\r
34          * @param file the file to read\r
35          * @param builder the builder which will be used to create the shape (i.e. <code>new BRep_Builder()</code>).\r
36          */\r
37         public static TopoDS_Shape read(String file, BRep_Builder builder)\r
38         {\r
39                 TopoDS_Shape toReturn=new TopoDS_Shape();\r
40                 if(read(toReturn, file, builder))\r
41                         return TopoDS_Shape.downcast(toReturn);\r
42                 else\r
43                         return null;\r
44         }\r
45 \r
46   \r
47         /**\r
48          * Reads a shape from a file.\r
49          * @param shape an empty shape created with <code>new TopoDS_Shape()</code>\r
50          * @param builder used to build the shape (i.e. <code>new BRep_Builder()</code>).\r
51          * @return false on IO or file format errors.\r
52          */\r
53         public static boolean read(TopoDS_Shape shape, String file, BRep_Builder builder) {\r
54         return OccJavaJNI.BRepTools_read__SWIG_0(TopoDS_Shape.getCPtr(shape), shape, file, BRep_Builder.getCPtr(builder), builder);\r
55 }\r
56 \r
57   \r
58         /**\r
59          * Write a shape to a file.\r
60          * @param shape the shape to write\r
61          * @param file the file where to write the shape\r
62          * @return false on IO error.\r
63          */\r
64         public static boolean write(TopoDS_Shape shape, String file) {\r
65         return OccJavaJNI.BRepTools_write__SWIG_0(TopoDS_Shape.getCPtr(shape), shape, file);\r
66 }\r
67 \r
68   public static void write(TopoDS_Shape Sh, java.nio.channels.WritableByteChannel S) {\r
69     OccJavaJNI.BRepTools_write__SWIG_1(TopoDS_Shape.getCPtr(Sh), Sh, S);\r
70   }\r
71 \r
72   public static void clean(TopoDS_Shape S) {\r
73     OccJavaJNI.BRepTools_clean(TopoDS_Shape.getCPtr(S), S);\r
74   }\r
75 \r
76   public static boolean read(TopoDS_Shape shape, java.nio.channels.ReadableByteChannel input, BRep_Builder builder) {\r
77         return OccJavaJNI.BRepTools_read__SWIG_1(TopoDS_Shape.getCPtr(shape), shape, input, BRep_Builder.getCPtr(builder), builder);\r
78 }\r
79 \r
80 }\r