예제 #1
0
        internal static BoundaryRepresentation BoundaryRepresentation(global::Topologic.Cell cell)
        {
            List <global::Topologic.Face> faces = cell.Faces;
            List <ISurface> bhomSurfaces        = new List <ISurface>();

            foreach (global::Topologic.Face face in faces)
            {
                bhomSurfaces.Add(Convert.PlanarSurface(face));
            }
            return(new BoundaryRepresentation(bhomSurfaces));
        }
예제 #2
0
        public static global::Topologic.Topology ToTopologic(this ISAMGeometry3D sAMGeometry)
        {
            if (sAMGeometry is Shell)
            {
                global::Topologic.Cell cell = ((Shell)sAMGeometry).ToTopologic_Cell();
                if (cell != null)
                {
                    return(cell);
                }

                return(((Shell)sAMGeometry).ToTopologic());
            }

            return(ToTopologic(sAMGeometry as dynamic));
        }
예제 #3
0
 public static global::Topologic.Vertex InternalVertex(global::Topologic.Cell cell, double tolerance = 0.0001)
 {
     return(global::Topologic.Utilities.CellUtility.InternalVertex(cell, tolerance));
 }
예제 #4
0
 public static bool Contains(global::Topologic.Cell cell, global::Topologic.Vertex vertex, bool allowOnBoundary = false, double tolerance = 0.0001)
 {
     return(global::Topologic.Utilities.CellUtility.Contains(cell, vertex, allowOnBoundary, tolerance));
 }
예제 #5
0
 public static double Volume(global::Topologic.Cell cell)
 {
     return(global::Topologic.Utilities.CellUtility.Volume(cell));
 }
예제 #6
0
 public static List <global::Topologic.Edge> SharedEdges(global::Topologic.Cell cell, global::Topologic.Cell otherCell)
 {
     return(cell.SharedEdges(otherCell));
 }
예제 #7
0
 public static List <global::Topologic.Cell> AdjacentCells(global::Topologic.Cell cell)
 {
     return(cell.AdjacentCells);
 }
예제 #8
0
 public static List <global::Topologic.Vertex> Vertices(global::Topologic.Cell cell)
 {
     return(cell.Vertices);
 }
예제 #9
0
 public static global::Topologic.Shell ExternalBoundary(global::Topologic.Cell cellComplex)
 {
     return(cellComplex.ExternalBoundary);
 }
예제 #10
0
 public static List <global::Topologic.Wire> Wires(global::Topologic.Cell cell)
 {
     return(cell.Wires);
 }
예제 #11
0
 public static List <global::Topologic.Face> Faces(global::Topologic.Cell cell)
 {
     return(cell.Faces);
 }
예제 #12
0
 public static List <global::Topologic.Shell> Shells(global::Topologic.Cell cell)
 {
     return(cell.Shells);
 }
예제 #13
0
 public static List <global::Topologic.CellComplex> CellComplexes(global::Topologic.Cell cell)
 {
     return(cell.CellComplexes);
 }
예제 #14
0
 internal static IGeometry BasicGeometry(global::Topologic.Cell cell)
 {
     return(BoundaryRepresentation(cell));
 }
예제 #15
0
 public static List <global::Topologic.Shell> InternalBoundaries(global::Topologic.Cell cell)
 {
     return(cell.InternalBoundaries);
 }
예제 #16
0
 public static List <global::Topologic.Edge> Edges(global::Topologic.Cell cell)
 {
     return(cell.Edges);
 }
예제 #17
0
        internal static IGeometry BasicGeometry(global::Topologic.Topology topology)
        {
            if (topology == null)
            {
                return(null);
            }

            global::Topologic.Vertex vertex = topology as global::Topologic.Vertex;
            if (vertex != null)
            {
                return(Convert.BasicGeometry(vertex));
            }

            global::Topologic.Edge edge = topology as global::Topologic.Edge;
            if (edge != null)
            {
                return(Convert.BasicGeometry(edge));
            }

            global::Topologic.Wire wire = topology as global::Topologic.Wire;
            if (wire != null)
            {
                return(Convert.BasicGeometry(wire));
            }

            global::Topologic.Face face = topology as global::Topologic.Face;
            if (face != null)
            {
                return(Convert.BasicGeometry(face));
            }

            global::Topologic.Shell shell = topology as global::Topologic.Shell;
            if (shell != null)
            {
                return(Convert.BasicGeometry(shell));
            }

            global::Topologic.Cell cell = topology as global::Topologic.Cell;
            if (cell != null)
            {
                return(Convert.BasicGeometry(cell));
            }

            global::Topologic.CellComplex cellComplex = topology as global::Topologic.CellComplex;
            if (cellComplex != null)
            {
                return(Convert.BasicGeometry(cellComplex));
            }

            global::Topologic.Cluster cluster = topology as global::Topologic.Cluster;
            if (cluster != null)
            {
                return(Convert.BasicGeometry(cluster));
            }

            //global::Topologic.Aperture aperture = topology as global::Topologic.Aperture;
            //if (aperture != null)
            //{
            //    return Aperture.Convert.BasicGeometry(aperture);
            //}

            throw new NotImplementedException("Geometry for this shape is not supported yet");
        }
예제 #18
0
 public static List <global::Topologic.Vertex> SharedVertices(global::Topologic.Cell cell, global::Topologic.Cell otherCell)
 {
     return(cell.SharedVertices(otherCell));
 }