org.jcae.opencascade
Class Utilities

java.lang.Object
  extended by org.jcae.opencascade.Utilities

public class Utilities
extends java.lang.Object

Useful toolbox. Note that this methods are not Open CASCADE binding and should probably not be used outside of the jCAE project, as compatibility between versions won't be garanty.


Constructor Summary
Utilities()
           
 
Method Summary
static void dumpTopology(TopoDS_Shape shape)
          Dump the topology of a shape (for debugging)
static void dumpTopology(TopoDS_Shape shape, java.io.PrintStream out)
          Dump the topology of a shape (for debugging)
static TopoDS_Face getFace(TopoDS_Shape shape, int id)
          Return the face whose order is id in the given shape
static TopoDS_Vertex getVertex(TopoDS_Shape shape, int id)
          Return the vertex whose order is id in the given shape
static boolean isShapeInShape(TopoDS_Shape parent, TopoDS_Shape child)
          Test if a shape is part of another one
static int numberOfShape(TopoDS_Shape shape, int type)
          Return the number of shapes in one shape
static TopoDS_Shape readFile(java.lang.String fileName)
          Read a file guessing the format with the file extension Only .step, .igs and .brep are supported.
static double tolerance(TopoDS_Shape shape)
          Compute the tolerance of shapes by selecting the highest tolerance of the give child shapes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utilities

public Utilities()
Method Detail

dumpTopology

public static void dumpTopology(TopoDS_Shape shape)
Dump the topology of a shape (for debugging)


dumpTopology

public static void dumpTopology(TopoDS_Shape shape,
                                java.io.PrintStream out)
Dump the topology of a shape (for debugging)


numberOfShape

public static int numberOfShape(TopoDS_Shape shape,
                                int type)
Return the number of shapes in one shape


isShapeInShape

public static boolean isShapeInShape(TopoDS_Shape parent,
                                     TopoDS_Shape child)
Test if a shape is part of another one


readFile

public static TopoDS_Shape readFile(java.lang.String fileName)
Read a file guessing the format with the file extension Only .step, .igs and .brep are supported.


getFace

public static TopoDS_Face getFace(TopoDS_Shape shape,
                                  int id)
Return the face whose order is id in the given shape


getVertex

public static TopoDS_Vertex getVertex(TopoDS_Shape shape,
                                      int id)
Return the vertex whose order is id in the given shape


tolerance

public static double tolerance(TopoDS_Shape shape)
Compute the tolerance of shapes by selecting the highest tolerance of the give child shapes