Example #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));
        }
Example #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));
        }
Example #3
0
 public static global::Topologic.Vertex InternalVertex(global::Topologic.Cell cell, double tolerance = 0.0001)
 {
     return(global::Topologic.Utilities.CellUtility.InternalVertex(cell, tolerance));
 }
Example #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));
 }
Example #5
0
 public static double Volume(global::Topologic.Cell cell)
 {
     return(global::Topologic.Utilities.CellUtility.Volume(cell));
 }
Example #6
0
 public static List <global::Topologic.Edge> SharedEdges(global::Topologic.Cell cell, global::Topologic.Cell otherCell)
 {
     return(cell.SharedEdges(otherCell));
 }
Example #7
0
 public static List <global::Topologic.Cell> AdjacentCells(global::Topologic.Cell cell)
 {
     return(cell.AdjacentCells);
 }
Example #8
0
 public static List <global::Topologic.Vertex> Vertices(global::Topologic.Cell cell)
 {
     return(cell.Vertices);
 }
Example #9
0
 public static global::Topologic.Shell ExternalBoundary(global::Topologic.Cell cellComplex)
 {
     return(cellComplex.ExternalBoundary);
 }
Example #10
0
 public static List <global::Topologic.Wire> Wires(global::Topologic.Cell cell)
 {
     return(cell.Wires);
 }
Example #11
0
 public static List <global::Topologic.Face> Faces(global::Topologic.Cell cell)
 {
     return(cell.Faces);
 }
Example #12
0
 public static List <global::Topologic.Shell> Shells(global::Topologic.Cell cell)
 {
     return(cell.Shells);
 }
Example #13
0
 public static List <global::Topologic.CellComplex> CellComplexes(global::Topologic.Cell cell)
 {
     return(cell.CellComplexes);
 }
Example #14
0
 internal static IGeometry BasicGeometry(global::Topologic.Cell cell)
 {
     return(BoundaryRepresentation(cell));
 }
Example #15
0
 public static List <global::Topologic.Shell> InternalBoundaries(global::Topologic.Cell cell)
 {
     return(cell.InternalBoundaries);
 }
Example #16
0
 public static List <global::Topologic.Edge> Edges(global::Topologic.Cell cell)
 {
     return(cell.Edges);
 }
Example #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");
        }
Example #18
0
 public static List <global::Topologic.Vertex> SharedVertices(global::Topologic.Cell cell, global::Topologic.Cell otherCell)
 {
     return(cell.SharedVertices(otherCell));
 }