package org.jcae.opencascade.jni; import static org.junit.Assert.*; import org.junit.Test; import java.io.File; import java.util.ArrayList; /*import org.jcae.viewer3d.View; import org.jcae.viewer3d.cad.ViewableCAD; import org.jcae.viewer3d.cad.occ.OCCProvider;*/ /** Test circles, extrude, BRepTools_Quilt */ public class CircleExtrudeQuilt { /** Easy creation of faces */ private static TopoDS_Face createFace(TopoDS_Edge e1) { TopoDS_Wire wirePlate= (TopoDS_Wire) new BRepBuilderAPI_MakeWire(e1).shape(); return (TopoDS_Face) new BRepBuilderAPI_MakeFace(wirePlate, true).shape(); } private static TopoDS_Edge getLastEdge(TopoDS_Shape shape) { TopExp_Explorer exp=new TopExp_Explorer(shape, TopAbs_ShapeEnum.EDGE); TopoDS_Edge lastEdge=null; while(exp.more()) { lastEdge=(TopoDS_Edge) exp.current(); exp.next(); } return lastEdge; } private static TopoDS_Edge createCircle(double cx, double cy, double cz, double dx, double dy, double dz, double radius) { GP_Circ circleB=new GP_Circ(new double[]{cx, cy, cz, dx, dy, dz}, radius); return (TopoDS_Edge) new BRepBuilderAPI_MakeEdge(circleB).shape(); } private static TopoDS_Face createFace(TopoDS_Wire wire1, TopoDS_Wire wire2) { TopoDS_Face face=(TopoDS_Face) new BRepBuilderAPI_MakeFace(wire1, true).shape(); return (TopoDS_Face) new BRepBuilderAPI_MakeFace(face, wire2).shape(); } private static TopoDS_Shell[] createShell(TopoDS_Face[] faces) { BRepTools_Quilt quil=new BRepTools_Quilt(); for(int i=0; i