]> gerrit.simantics Code Review - simantics/3d.git/blob - org.jcae.opencascade/src-java/org/jcae/opencascade/jni/BRep_Tool.java
Avoid extra write transactions when opening Plant3D editor
[simantics/3d.git] / org.jcae.opencascade / src-java / org / jcae / opencascade / jni / BRep_Tool.java
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 3.0.12
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8
9 package org.jcae.opencascade.jni;
10
11 public class BRep_Tool {
12   private transient long swigCPtr;
13   protected transient boolean swigCMemOwn;
14
15   protected BRep_Tool(long cPtr, boolean cMemoryOwn) {
16     swigCMemOwn = cMemoryOwn;
17     swigCPtr = cPtr;
18   }
19
20   protected static long getCPtr(BRep_Tool obj) {
21     return (obj == null) ? 0 : obj.swigCPtr;
22   }
23
24   protected void finalize() {
25     delete();
26   }
27
28   public synchronized void delete() {
29     if (swigCPtr != 0) {
30       if (swigCMemOwn) {
31         swigCMemOwn = false;
32         OccJavaJNI.delete_BRep_Tool(swigCPtr);
33       }
34       swigCPtr = 0;
35     }
36   }
37
38         public static double[] range(TopoDS_Edge edge)
39         {
40                 double[] toReturn=new double[2];
41                 range(edge, toReturn);
42                 return toReturn;
43         }
44
45         public static Geom2d_Curve curveOnSurface(TopoDS_Edge e, TopoDS_Face f, double[] range)
46         {
47                 double[] d2=new double[1];
48                 Geom2d_Curve toReturn=curveOnSurface(e, f, range, d2);
49                 range[1]=d2[0];
50                 return toReturn;
51         }
52
53         public static Geom_Curve curve(TopoDS_Edge e, double[] range)
54         {
55                 double[] d2=new double[1];
56                 Geom_Curve toReturn=curve(e, range, d2);
57                 range[1]=d2[0];
58                 return toReturn;
59         }
60
61   public static double[] pnt(TopoDS_Vertex V) {
62         return OccJavaJNI.BRep_Tool_pnt(TopoDS_Vertex.getCPtr(V), V);
63 }
64
65   public static double[] parameters(TopoDS_Vertex V, TopoDS_Face F) {
66         return OccJavaJNI.BRep_Tool_parameters(TopoDS_Vertex.getCPtr(V), V, TopoDS_Face.getCPtr(F), F);
67 }
68
69   public static double parameter(TopoDS_Vertex V, TopoDS_Edge E) {
70     return OccJavaJNI.BRep_Tool_parameter(TopoDS_Vertex.getCPtr(V), V, TopoDS_Edge.getCPtr(E), E);
71   }
72
73   public static boolean degenerated(TopoDS_Edge E) {
74         return OccJavaJNI.BRep_Tool_degenerated(TopoDS_Edge.getCPtr(E), E);
75 }
76
77   public static boolean hasContinuity(TopoDS_Edge E, TopoDS_Face F1, TopoDS_Face F2) {
78         return OccJavaJNI.BRep_Tool_hasContinuity(TopoDS_Edge.getCPtr(E), E, TopoDS_Face.getCPtr(F1), F1, TopoDS_Face.getCPtr(F2), F2);
79 }
80
81   public static GeomAbs_Shape continuity(TopoDS_Edge E, TopoDS_Face F1, TopoDS_Face F2) {
82     return GeomAbs_Shape.swigToEnum(OccJavaJNI.BRep_Tool_continuity(TopoDS_Edge.getCPtr(E), E, TopoDS_Face.getCPtr(F1), F1, TopoDS_Face.getCPtr(F2), F2));
83   }
84
85   public static double tolerance(TopoDS_Face F) {
86     return OccJavaJNI.BRep_Tool_tolerance__SWIG_0(TopoDS_Face.getCPtr(F), F);
87   }
88
89   public static double tolerance(TopoDS_Edge E) {
90     return OccJavaJNI.BRep_Tool_tolerance__SWIG_1(TopoDS_Edge.getCPtr(E), E);
91   }
92
93   public static double tolerance(TopoDS_Vertex V) {
94     return OccJavaJNI.BRep_Tool_tolerance__SWIG_2(TopoDS_Vertex.getCPtr(V), V);
95   }
96
97   public static Poly_Triangulation triangulation(TopoDS_Face F, TopLoc_Location L) {
98     long cPtr = OccJavaJNI.BRep_Tool_triangulation(TopoDS_Face.getCPtr(F), F, TopLoc_Location.getCPtr(L), L);
99     return (cPtr == 0) ? null : new Poly_Triangulation(cPtr, false);
100   }
101
102   public static void range(TopoDS_Edge E, double[] range) {
103     OccJavaJNI.BRep_Tool_range(TopoDS_Edge.getCPtr(E), E, range);
104   }
105
106   public static Geom_Curve curve(TopoDS_Edge E, double[] First, double[] Last) {
107     long cPtr = OccJavaJNI.BRep_Tool_curve(TopoDS_Edge.getCPtr(E), E, First, Last);
108     return (cPtr == 0) ? null : new Geom_Curve(cPtr, false);
109   }
110
111   public static Geom_Surface surface(TopoDS_Face F) {
112     long cPtr = OccJavaJNI.BRep_Tool_surface(TopoDS_Face.getCPtr(F), F);
113     return (cPtr == 0) ? null : new Geom_Surface(cPtr, false);
114   }
115
116   public static Geom2d_Curve curveOnSurface(TopoDS_Edge E, TopoDS_Face F, double[] First, double[] Last) {
117     long cPtr = OccJavaJNI.BRep_Tool_curveOnSurface(TopoDS_Edge.getCPtr(E), E, TopoDS_Face.getCPtr(F), F, First, Last);
118     return (cPtr == 0) ? null : new Geom2d_Curve(cPtr, false);
119   }
120
121   public BRep_Tool() {
122     this(OccJavaJNI.new_BRep_Tool(), true);
123   }
124
125 }