topologicpy.Cell module
- class topologicpy.Cell.Cell
Bases:
objectMethods
Area(cell[, mantissa])Returns the surface area of the input cell.
Box([origin, width, length, height, uSides, ...])Creates a box.
ByFaces(faces[, planarize, ...])Creates a cell from the input list of faces.
ByFacesCluster(cluster[, planarize, ...])Creates a cell by merging the faces within the input cluster.
ByOffset(cell[, offset, tolerance])Creates an offset cell from the input cell.
ByShell(shell[, planarize, tolerance, silent])Creates a cell from the input shell.
ByShells(externalBoundary[, ...])Creates a cell from the input external boundary (closed shell) and the input list of internal boundaries (closed shells).
ByThickenedFace(face[, thickness, ...])Creates a cell by thickening the input face.
ByThickenedShell(shell[, direction, ...])Creates a cell by thickening the input shell.
ByWires(wires[, close, triangulate, ...])Creates a cell by lofting through the input list of wires.
ByWiresCluster(cluster[, close, ...])Creates a cell by lofting through the input cluster of wires.
CHS([origin, radius, height, thickness, ...])Creates a circular hollow section (CHS).
CShape([origin, width, length, height, ...])Creates a C-shape.
Capsule([origin, radius, height, uSides, ...])Creates a capsule shape.
Compactness(cell[, reference, mantissa])Returns the compactness measure of the input cell.
Cone([origin, baseRadius, topRadius, ...])Creates a cone.
ContainmentStatus(cell, vertex[, tolerance])Returns the containment status of the input vertex in relationship to the input cell
CrossShape([origin, width, length, height, ...])Creates a Cross-shape.
Cube([origin, size, uSides, vSides, wSides, ...])Creates a cube.
Cylinder([origin, radius, height, uSides, ...])Creates a cylinder.
Decompose(cell[, tiltAngle, tolerance])Decomposes the input cell into its logical components.
Dodecahedron([origin, radius, direction, ...])Creates a dodecahedron.
Edges(cell)Returns the edges of the input cell.
Egg([origin, height, uSides, vSides, ...])Creates an egg-shaped cell.
ExternalBoundary(cell[, tolerance, silent])Returns the external boundary of the input cell.
Faces(cell)Returns the faces of the input cell.
Hyperboloid([origin, baseRadius, topRadius, ...])Creates a hyperboloid.
IShape([origin, width, length, height, ...])Creates an I-shape cell.
Icosahedron([origin, radius, direction, ...])Creates an icosahedron.
InternalBoundaries(cell)Returns the internal boundaries of the input cell.
InternalVertex(cell[, tolerance, silent])Creates a vertex that is guaranteed to be inside the input cell.
IsOnBoundary(cell, vertex[, tolerance])Returns True if the input vertex is on the boundary of the input cell.
LShape([origin, width, length, height, ...])Creates an L-shape.
Noperthedron([origin, radius, direction, ...])Creates a Noperthedron.
Octahedron([origin, radius, direction, ...])Creates an octahedron.
Paraboloid([origin, focalLength, width, ...])Creates a paraboloid cell.
Pipe(edge[, profile, radius, sides, ...])Creates a pipe along the input edge.
Prism([origin, width, length, height, ...])Creates a prism.
RHS([origin, width, length, height, ...])Creates a rectangluar hollow section (RHS).
RemoveCollinearEdges(cell[, angTolerance, ...])Removes any collinear edges in the input cell.
Roof(face[, angle, epsilon, tolerance])Creates a hipped roof through a straight skeleton. This method is contributed by 高熙鹏 xipeng gao <gaoxipeng1998@gmail.com>
SHS([origin, size, height, thickness, ...])Creates a square hollow section (SHS).
Sets(cells, superCells[, tolerance])Classifies the input cells into sets based on their enclosure within the input list of super cells. The order of the sets follows the order of the input list of super cells.
Shells(cell)Returns the shells of the input cell.
Sphere([origin, radius, uSides, vSides, ...])Creates an approximation of a sphere using a UV grid of triangular faces.
SurfaceArea(cell[, mantissa])Returns the surface area of the input cell.
TShape([origin, width, length, height, ...])Creates a T-shape cell.
Tetrahedron([origin, length, depth, ...])Creates a recursive tetrahedron cell.
Torus([origin, majorRadius, minorRadius, ...])Creates a torus.
Torus_old([origin, majorRadius, ...])Creates a torus.
Tube([origin, radius, height, thickness, ...])Creates a Tube.
Vertices(cell)Returns the vertices of the input cell.
Volume(cell[, mantissa])Returns the volume of the input cell.
Wedge([origin, width, length, height, ...])Creates a Wedge.
Wires(cell)Returns the wires of the input cell.
- static Area(cell, mantissa: int = 6)
Returns the surface area of the input cell.
- Parameters
- celltopologic_core.Cell
The cell.
- mantissaint , optional
The number of decimal places to round the result to. Default is 6.
- Returns
- float
The surface area of the input cell.
- static Box(origin=None, width: float = 1, length: float = 1, height: float = 1, uSides: int = 1, vSides: int = 1, wSides: int = 1, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001)
Creates a box.
- Parameters
- origintopologic_core.Vertex , optional
The origin location of the box. Default is None which results in the box being placed at (0, 0, 0).
- widthfloat , optional
The width of the box. Default is 1.
- lengthfloat , optional
The length of the box. Default is 1.
- heightfloat , optional
The height of the box.
- uSidesint , optional
The number of sides along the width. Default is 1.
- vSidesint , optional
The number of sides along the length. Default is 1.
- wSidesint , optional
The number of sides along the height. Default is 1.
- directionlist , optional
The vector representing the up direction of the box. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the box. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created box.
- static ByFaces(faces: list, planarize: bool = False, transferDictionaries: bool = False, tolerance: float = 0.0001, silent: bool = False)
Creates a cell from the input list of faces.
- Parameters
- faceslist
The input list of faces.
- planarizebool, optional
If set to True, the input faces are planarized before building the cell. Otherwise, they are not. Default is False.
- transferDictionariesbool , optional
If set to True, any dictionaries in the faces are transferred to the faces of the created Cell. Otherwise, they are not. Default is False.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created cell.
- static ByFacesCluster(cluster, planarize: bool = False, transferDictionaries: bool = False, tolerance: float = 0.0001, silent: bool = False)
Creates a cell by merging the faces within the input cluster.
- Parameters
- clustertopologic_core.Cluster
The input cluster of faces.
- planarizebool, optional
If set to True, the input faces are planarized before building the cell. Otherwise, they are not. Default is False.
- transferDictionariesbool , optional
If set to True, any dictionaries in the faces are transferred to the faces of the created cell. Otherwise, they are not. Default is False.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created cell.
- static ByOffset(cell, offset: float = 1.0, tolerance: float = 0.0001)
Creates an offset cell from the input cell.
- Parameters
- celltopologic_core.Cell
The input cell.
- offsetfloat , optional
The desired offset distance. Default is 1.0.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- Topology
The created offset topology. WARNING: This method may fail to create a cell if the offset creates self-intersecting faces. Always check the type being returned by this method.
- static ByShell(shell, planarize: bool = False, tolerance: float = 0.0001, silent: bool = False)
Creates a cell from the input shell.
- Parameters
- shelltopologic_core.Shell
The input shell. The shell must be closed for this method to succeed.
- planarizebool, optional
If set to True, the input faces of the input shell are planarized before building the cell. Otherwise, they are not. Default is False.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created cell.
- static ByShells(externalBoundary, internalBoundaries: list = [], tolerance: float = 0.0001, silent: bool = False)
Creates a cell from the input external boundary (closed shell) and the input list of internal boundaries (closed shells).
- Parameters
- externalBoundarytopologic_core.Shell
The input external boundary.
- internalBoundarieslist , optional
The input list of internal boundaries (closed shells). Default is an empty list.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created cell.
- static ByThickenedFace(face, thickness: float = 1.0, bothSides: bool = True, wSides: int = 1, reverse: bool = False, tolerance: float = 0.0001, silent: bool = False)
Creates a cell by thickening the input face.
Behaviour: - Only the bottom and top faces are used as horizontal faces. - wSides controls the number of vertical segments along the thickness. Intermediate offset layers are used only to build side faces and are not included as horizontal faces in Cell.ByFaces.
- Parameters
- facetopologic_core.Face
The input face to be thickened.
- thicknessfloat , optional
The desired thickness. Default is 1.0.
- bothSidesbool
If True, the thickening is symmetric about the original face (i.e. from -thickness/2 to +thickness/2). If False, the thickening is from 0 to +thickness along the face normal. Default is True.
- reversebool
If True, the extrusion direction is flipped (normal is negated). Default is False.
- wSides: int, optional
The number of segments along the thickness direction. This is the same definition regardless of bothSides. Default is 1.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created cell, or None on failure.
- static ByThickenedShell(shell, direction: list = [0, 0, 1], thickness: float = 1.0, bothSides: bool = True, reverse: bool = False, planarize: bool = False, tolerance: float = 0.0001, silent: bool = False)
Creates a cell by thickening the input shell. The shell must be open.
- Parameters
- shelltopologic_core.Shell
The input shell to be thickened.
- thicknessfloat , optional
The desired thickness. Default is 1.0.
- bothSidesbool
If True, the cell will be lofted to each side of the shell. Otherwise, it will be lofted along the input direction. Default is True.
- reversebool
If True, the cell will be lofted along the opposite of the input direction. Default is False.
- planarizebool, optional
If set to True, the input faces of the input shell are planarized before building the cell. Otherwise, they are not. Default is False.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created cell.
- static ByWires(wires: list, close: bool = False, triangulate: bool = True, planarize: bool = False, mantissa: int = 6, tolerance: float = 0.0001, silent: bool = False)
Creates a cell by lofting through the input list of wires.
Unlike the older implementation, this version does NOT require corresponding wires to have the same number of edges. Each pair of wires is re-parameterized by normalized perimeter length and resampled at a common set of breakpoints before side faces are created.
- Parameters
- wireslist
The input list of wires.
- closebool , optional
If set to True, the last wire is also connected to the first wire. Default is False.
- triangulatebool , optional
If set to True, side and cap faces are triangulated where needed. Default is True.
- planarizebool, optional
If set to True, the created faces are planarized before building the cell. Otherwise, they are not. Default is False.
- mantissaint , optional
The number of decimal places to round the result to. Default is 6.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created cell.
- static ByWiresCluster(cluster, close: bool = False, triangulate: bool = True, planarize: bool = False, tolerance: float = 0.0001)
Creates a cell by lofting through the input cluster of wires.
- Parameters
- clusterCluster
The input Cluster of wires.
- closebool , optional
If set to True, the last wire in the cluster of input wires will be connected to the first wire in the cluster of input wires. Default is False.
- triangulatebool , optional
If set to True, the faces will be triangulated. Default is True.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created cell.
- Raises
- Exception
Raises an exception if the two wires in the list do not have the same number of edges.
- static CHS(origin=None, radius: float = 1.0, height: float = 1.0, thickness: float = 0.25, sides: int = 16, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001, silent: bool = False)
Creates a circular hollow section (CHS).
- Parameters
- origintopologic_core.Vertex, optional
The location of the origin of the CHS. Default is None which results in the CHS being placed at (0, 0, 0).
- radiusfloat , optional
The outer radius of the CHS. Default is 1.0.
- thicknessfloat , optional
The thickness of the CHS. Default is 0.25.
- heightfloat , optional
The height of the CHS. Default is 1.0.
- sidesint , optional
The desired number of sides of the CSH. Default is 16.
- directionlist , optional
The vector representing the up direction of the RHS. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the RHS. This can be “center”, “bottom”, “top”, “lowerleft”, “upperleft”, “lowerright”, “upperright”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created cell.
- static CShape(origin=None, width=1, length=1, height=1, wSides=1, a=0.25, b=0.25, c=0.25, flipHorizontal=False, flipVertical=False, direction=[0, 0, 1], placement='center', mantissa=6, tolerance=0.0001, silent=False)
Creates a C-shape.
- Parameters
- origintopologic_core.Vertex , optional
The location of the origin of the C-shape. Default is None which results in the C-shape being placed at (0, 0, 0).
- widthfloat , optional
The overall width of the C-shape. Default is 1.0.
- lengthfloat , optional
The overall length of the C-shape. Default is 1.0.
- heightfloat , optional
The overall height of the C-shape. Default is 1.0.
- wSidesint , optional
The desired number of sides along the Z-axis. Default is 1.
- afloat , optional
The hortizontal thickness of the vertical arm of the C-shape. Default is 0.25.
- bfloat , optional
The vertical thickness of the bottom horizontal arm of the C-shape. Default is 0.25.
- cfloat , optional
The vertical thickness of the top horizontal arm of the C-shape. Default is 0.25.
- flipHorizontalbool , optional
if set to True, the shape is flipped horizontally. Default is False.
- flipVerticalbool , optional
if set to True, the shape is flipped vertically. Default is False.
- directionlist , optional
The vector representing the up direction of the C-shape. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the C-shape. This can be “center”, “lowerleft”, “upperleft”, “lowerright”, “upperright”. It is case insensitive. Default is “center”.
- mantissa: int , optional
The number of decimal places to round the result to. Default is 6.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created C-shape cell.
- static Capsule(origin=None, radius: float = 0.25, height: float = 1, uSides: int = 16, vSidesEnds: int = 8, vSidesMiddle: int = 1, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001)
Creates a capsule shape. A capsule is a cylinder with hemispherical ends.
- Parameters
- origintopologic_core.Vertex , optional
The location of the origin of the cylinder. Default is None which results in the cylinder being placed at (0, 0, 0).
- radiusfloat , optional
The radius of the capsule. Default is 0.25.
- heightfloat , optional
The height of the capsule. Default is 1.
- uSidesint , optional
The number of circle segments of the capsule. Default is 16.
- vSidesEndsint , optional
The number of vertical segments of the end hemispheres. Default is 8.
- vSidesMiddleint , optional
The number of vertical segments of the middle cylinder. Default is 1.
- directionlist , optional
The vector representing the up direction of the capsule. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the capsule. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “bottom”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created cell.
- static Compactness(cell, reference='sphere', mantissa: int = 6) float
Returns the compactness measure of the input cell. If the reference is “sphere”, this is also known as ‘sphericity’ (https://en.wikipedia.org/wiki/Sphericity).
- Parameters
- celltopologic_core.Cell
The input cell.
- referencestr , optional
The desired reference to which to compare this compactness. The options are “sphere” and “cube”. It is case insensitive. Default is “sphere”.
- mantissaint , optional
The number of decimal places to round the result to. Default is 6.
- Returns
- float
The compactness of the input cell.
- static Cone(origin=None, baseRadius: float = 0.5, topRadius: float = 0, height: float = 1, uSides: int = 16, vSides: int = 1, direction: list = [0, 0, 1], dirZ: float = 1, placement: str = 'center', mantissa: int = 6, tolerance: float = 0.0001)
Creates a cone.
- Parameters
- origintopologic_core.Vertex , optional
The location of the origin of the cone. Default is None which results in the cone being placed at (0, 0, 0).
- baseRadiusfloat , optional
The radius of the base circle of the cone. Default is 0.5.
- topRadiusfloat , optional
The radius of the top circle of the cone. Default is 0.
- heightfloat , optional
The height of the cone. Default is 1.
- uSidesint , optional
The number of circle segments of the cylinder. Default is 16.
- vSidesint , optional
The number of vertical segments of the cylinder. Default is 1.
- directionlist , optional
The vector representing the up direction of the cone. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the cone. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- mantissaint , optional
The desired length of the mantissa. Default is 6
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created cone.
- static ContainmentStatus(cell, vertex, tolerance: float = 0.0001) int
Returns the containment status of the input vertex in relationship to the input cell
- Parameters
- celltopologic_core.Cell
The input cell.
- vertextopologic_core.Vertex
The input vertex.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- int
Returns 0 if the vertex is inside, 1 if it is on the boundary of, and 2 if it is outside the input cell.
- static CrossShape(origin=None, width=1, length=1, height=1, a=0.25, b=0.25, c=None, d=None, flipHorizontal=False, flipVertical=False, direction=[0, 0, 1], placement='center', tolerance=0.0001, silent=False)
Creates a Cross-shape.
- Parameters
- origintopologic_core.Vertex , optional
The location of the origin of the T-shape. Default is None which results in the Cross-shape being placed at (0, 0, 0).
- widthfloat , optional
The overall width of the Cross-shape. Default is 1.0.
- lengthfloat , optional
The overall length of the Cross-shape. Default is 1.0.
- heightfloat , optional
The overall height of the C-shape. Default is 1.0.
- afloat , optional
The hortizontal thickness of the vertical arm of the Cross-shape. Default is 0.25.
- bfloat , optional
The vertical thickness of the horizontal arm of the Cross-shape. Default is 0.25.
- cfloat , optional
The distance of the vertical symmetry axis measured from the left side of the Cross-shape. Default is None which results in the Cross-shape being symmetrical on the Y-axis.
- dfloat , optional
The distance of the horizontal symmetry axis measured from the bottom side of the Cross-shape. Default is None which results in the Cross-shape being symmetrical on the X-axis.
- directionlist , optional
The vector representing the up direction of the Cross-shape. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the Cross-shape. This can be “center”, “lowerleft”, “upperleft”, “lowerright”, “upperright”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created Cross-shape cell.
- static Cube(origin=None, size: float = 1, uSides: int = 1, vSides: int = 1, wSides: int = 1, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001)
Creates a cube.
- Parameters
- origintopologic_core.Vertex , optional
The origin location of the cube. Default is None which results in the cube being placed at (0, 0, 0).
- sizefloat , optional
The size of the cube. Default is 1.
- uSidesint , optional
The number of sides along the width. Default is 1.
- vSidesint , optional
The number of sides along the length. Default is 1.
- wSidesint , optional
The number of sides along the height. Default is 1.
- directionlist , optional
The vector representing the up direction of the cube. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the cube. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created cube.
- static Cylinder(origin=None, radius: float = 0.5, height: float = 1, uSides: int = 16, vSides: int = 1, direction: list = [0, 0, 1], placement: str = 'center', mantissa: int = 6, tolerance: float = 0.0001)
Creates a cylinder.
- Parameters
- origintopologic_core.Vertex , optional
The location of the origin of the cylinder. Default is None which results in the cylinder being placed at (0, 0, 0).
- radiusfloat , optional
The radius of the cylinder. Default is 0.5.
- heightfloat , optional
The height of the cylinder. Default is 1.
- uSidesint , optional
The number of circle segments of the cylinder. Default is 16.
- vSidesint , optional
The number of vertical segments of the cylinder. Default is 1.
- directionlist , optional
The vector representing the up direction of the cylinder. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the cylinder. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “bottom”.
- mantissaint , optional
The number of decimal places to round the result to. Default is 6.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created cell.
- static Decompose(cell, tiltAngle: float = 10, tolerance: float = 0.0001) dict
Decomposes the input cell into its logical components. This method assumes that the positive Z direction is UP.
- Parameters
- celltopologic_core.Cell
the input cell.
- tiltAnglefloat , optional
The threshold tilt angle in degrees to determine if a face is vertical, horizontal, or tilted. The tilt angle is measured from the nearest cardinal direction. Default is 10.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- dictionary
A dictionary with the following keys and values: 1. “verticalFaces”: list of vertical faces 2. “topHorizontalFaces”: list of top horizontal faces 3. “bottomHorizontalFaces”: list of bottom horizontal faces 4. “inclinedFaces”: list of inclined faces 5. “verticalApertures”: list of vertical apertures 6. “topHorizontalApertures”: list of top horizontal apertures 7. “bottomHorizontalApertures”: list of bottom horizontal apertures 8. “inclinedApertures”: list of inclined apertures
- static Dodecahedron(origin=None, radius: float = 0.5, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001)
Creates a dodecahedron. See https://en.wikipedia.org/wiki/Dodecahedron.
- Parameters
- origintopologic_core.Vertex , optional
The origin location of the dodecahedron. Default is None which results in the dodecahedron being placed at (0, 0, 0).
- radiusfloat , optional
The radius of the dodecahedron’s circumscribed sphere. Default is 0.5.
- directionlist , optional
The vector representing the up direction of the dodecahedron. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the dodecahedron. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created dodecahedron.
- static Edges(cell) list
Returns the edges of the input cell.
- Parameters
- celltopologic_core.Cell
The input cell.
- Returns
- list
The list of edges.
- static Egg(origin=None, height: float = 1.0, uSides: int = 16, vSides: int = 8, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001)
Creates an egg-shaped cell.
- Parameters
- origintopologic_core.Vertex , optional
The origin location of the sphere. Default is None which results in the egg-shaped cell being placed at (0, 0, 0).
- heightfloat , optional
The desired height of of the egg-shaped cell. Default is 1.0.
- uSidesint , optional
The desired number of sides along the longitude of the egg-shaped cell. Default is 16.
- vSidesint , optional
The desired number of sides along the latitude of the egg-shaped cell. Default is 8.
- directionlist , optional
The vector representing the up direction of the egg-shaped cell. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the egg-shaped cell. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created egg-shaped cell.
- static ExternalBoundary(cell, tolerance: float = 0.0001, silent: bool = False)
Returns the external boundary of the input cell.
- Parameters
- celltopologic_core.Cell
The input cell.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Shell
The external boundary of the input cell.
- static Faces(cell) list
Returns the faces of the input cell.
- Parameters
- celltopologic_core.Cell
The input cell.
- Returns
- list
The list of faces.
- static Hyperboloid(origin=None, baseRadius: float = 0.5, topRadius: float = 0.5, height: float = 1, sides: int = 24, direction: list = [0, 0, 1], twist: float = 60, placement: str = 'center', mantissa: int = 6, tolerance: float = 0.0001)
Creates a hyperboloid.
- Parameters
- origintopologic_core.Vertex , optional
The location of the origin of the hyperboloid. Default is None which results in the hyperboloid being placed at (0, 0, 0).
- baseRadiusfloat , optional
The radius of the base circle of the hyperboloid. Default is 0.5.
- topRadiusfloat , optional
The radius of the top circle of the hyperboloid. Default is 0.5.
- heightfloat , optional
The height of the cone. Default is 1.
- sidesint , optional
The number of sides of the cone. Default is 24.
- directionlist , optional
The vector representing the up direction of the hyperboloid. Default is [0, 0, 1].
- twistfloat , optional
The angle to twist the base cylinder. Default is 60.
- placementstr , optional
The description of the placement of the origin of the hyperboloid. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- mantissaint , optional
The desired length of the mantissa. Default is 6
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created hyperboloid.
- static IShape(origin=None, width: float = 1, length: float = 1, height: float = 1, wSides: int = 1, a: float = 0.25, b: float = 0.25, c: float = 0.25, flipHorizontal: bool = False, flipVertical: bool = False, direction: list = [0, 0, 1], placement: str = 'center', mantissa: int = 6, tolerance: float = 0.0001, silent: bool = False)
Creates an I-shape cell.
- Parameters
- origintopologic_core.Vertex , optional
The location of the origin of the I-shape. Default is None which results in the I-shape being placed at (0, 0, 0).
- widthfloat , optional
The overall width of the I-shape. Default is 1.0.
- lengthfloat , optional
The overall length of the I-shape. Default is 1.0.
- heightfloat , optional
The overall height of the I-shape. Default is 1.0.
- wSidesint , optional
The desired number of sides along the Z-Axis. Default is 1.
- afloat , optional
The hortizontal thickness of the central vertical arm of the I-shape. Default is 0.25.
- bfloat , optional
The vertical thickness of the bottom horizontal arm of the I-shape. Default is 0.25.
- cfloat , optional
The vertical thickness of the top horizontal arm of the I-shape. Default is 0.25.
- flipHorizontalbool , optional
if set to True, the shape is flipped horizontally. Default is False.
- flipVerticalbool , optional
if set to True, the shape is flipped vertically. Default is False.
- directionlist , optional
The vector representing the up direction of the I-shape. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the I-shape. This can be “center”, “bottom”, “top”, “lowerleft”, “upperleft”, “lowerright”, “upperright”. It is case insensitive. Default is “center”.
- mantissaint , optional
The number of decimal places to round the result to. Default is 6.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created I-shape cell.
- static Icosahedron(origin=None, radius: float = 0.5, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001)
Creates an icosahedron. See https://en.wikipedia.org/wiki/Icosahedron.
- Parameters
- origintopologic_core.Vertex , optional
The origin location of the icosahedron. Default is None which results in the icosahedron being placed at (0, 0, 0).
- radiusfloat , optional
The radius of the icosahedron’s circumscribed sphere. Default is 0.5.
- directionlist , optional
The vector representing the up direction of the icosahedron. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the icosahedron. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created icosahedron.
- static InternalBoundaries(cell) list
Returns the internal boundaries of the input cell.
- Parameters
- celltopologic_core.Cell
The input cell.
- Returns
- list
The list of internal boundaries ([topologic_core.Shell]).
- static InternalVertex(cell, tolerance: float = 0.0001, silent: bool = False)
Creates a vertex that is guaranteed to be inside the input cell.
- Parameters
- celltopologic_core.Cell
The input cell.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Vertex
The internal vertex.
- static IsOnBoundary(cell, vertex, tolerance: float = 0.0001) bool
Returns True if the input vertex is on the boundary of the input cell. Returns False otherwise.
- Parameters
- celltopologic_core.Cell
The input cell.
- vertextopologic_core.Vertex
The input vertex.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- bool
Returns True if the input vertex is inside the input cell. Returns False otherwise.
- static LShape(origin=None, width=1, length=1, height=1, wSides=1, a=0.25, b=0.25, flipHorizontal=False, flipVertical=False, direction=[0, 0, 1], placement='center', mantissa=6, tolerance=0.0001, silent=False)
Creates an L-shape.
- Parameters
- origintopologic_core.Vertex , optional
The location of the origin of the L-shape. Default is None which results in the L-shape being placed at (0, 0, 0).
- widthfloat , optional
The overall width of the L-shape. Default is 1.0.
- lengthfloat , optional
The overall length of the L-shape. Default is 1.0.
- heightfloat , optional
The overall height of the L-shape. Default is 1.0.
- wSidesint , optional
The desired number of sides along the Z-axis. Default is 1.
- afloat , optional
The hortizontal thickness of the vertical arm of the L-shape. Default is 0.25.
- bfloat , optional
The vertical thickness of the horizontal arm of the L-shape. Default is 0.25.
- flipHorizontalbool , optional
if set to True, the shape is flipped horizontally. Default is False.
- flipVerticalbool , optional
if set to True, the shape is flipped vertically. Default is False.
- directionlist , optional
The vector representing the up direction of the L-shape. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the L-shape. This can be “center”, “bottom”, “top”, “lowerleft”, “upperleft”, “lowerright”, “upperright”. It is case insensitive. Default is “center”.
- manitssaint , optional
The number of decimal places to round the result to. Default is 6.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created L-shape cell.
- static Noperthedron(origin=None, radius: float = 0.5, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001, silent: bool = False)
Creates a Noperthedron. A noperthedron is a convex polyhedron without Rupert’s property. See: https://arxiv.org/pdf/2508.18475
- Parameters
- origintopologic_core.Vertex , optional
The origin location of the sphere. Default is None which results in the sphere being placed at (0, 0, 0).
- radiusfloat , optional
The radius of the sphere. Default is 0.5.
- uSidesint , optional
The number of sides along the longitude of the sphere. Default is 16.
- vSidesint , optional
The number of sides along the latitude of the sphere. Default is 8.
- directionlist , optional
The vector representing the up direction of the sphere. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the sphere. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool, optional
If set to True, suppresses warning and error messages. Default is False.
- Returns
- topologic_core.Cell
The created Noperthedron polyhedron.
- static Octahedron(origin=None, radius: float = 0.5, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001)
Creates an octahedron. See https://en.wikipedia.org/wiki/Octahedron.
- Parameters
- origintopologic_core.Vertex , optional
The origin location of the octahedron. Default is None which results in the octahedron being placed at (0, 0, 0).
- radiusfloat , optional
The radius of the octahedron’s circumscribed sphere. Default is 0.5.
- directionlist , optional
The vector representing the up direction of the octahedron. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the octahedron. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created octahedron.
- static Paraboloid(origin=None, focalLength=0.125, width: float = 1, length: float = 1, height: float = 0, uSides: int = 16, vSides: int = 16, direction: list = [0, 0, 1], placement: str = 'center', mantissa: int = 6, tolerance: float = 0.0001, silent=False)
Creates a paraboloid cell. See https://en.wikipedia.org/wiki/Paraboloid
- Parameters
- origintopologic_core.Vertex , optional
The origin location of the parabolic surface. Default is None which results in the parabolic surface being placed at (0, 0, 0).
- focalLengthfloat , optional
The focal length of the parabola. Default is 0.125.
- widthfloat , optional
The width of the parabolic surface. Default is 1.
- lengthfloat , optional
The length of the parabolic surface. Default is 1.
- heightfloat , optional
The additional height of the parabolic surface. Please note this is not the height from the spring point to the apex. It is in addition to that to form a base. Default is 0.
- uSidesint , optional
The number of sides along the width. Default is 16.
- vSidesint , optional
The number of sides along the length. Default is 16.
- directionlist , optional
The vector representing the up direction of the parabolic surface. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the parabolic surface. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- mantissaint , optional
The number of decimal places to round the result to. Default is 6.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
- If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Shell
The created paraboloid.
- static Pipe(edge, profile=None, radius: float = 0.5, sides: int = 16, startOffset: float = 0, endOffset: float = 0, endcapA=None, endcapB=None, mantissa: int = 6) dict
Creates a pipe along the input edge.
- Parameters
- edgetopologic_core.Edge
The centerline of the pipe.
- profiletopologic_core.Wire , optional
The profile of the pipe. It is assumed that the profile is in the XY plane. If set to None, a circle of radius 0.5 will be used. Default is None.
- radiusfloat , optional
The radius of the pipe. Default is 0.5.
- sidesint , optional
The number of sides of the pipe. Default is 16.
- startOffsetfloat , optional
The offset distance from the start vertex of the centerline edge. Default is 0.
- endOffsetfloat , optional
The offset distance from the end vertex of the centerline edge. Default is 0.
- endcapA, optional
The topology to place at the start vertex of the centerline edge. The positive Z direction of the end cap will be oriented in the direction of the centerline edge.
- endcapB, optional
The topology to place at the end vertex of the centerline edge. The positive Z direction of the end cap will be oriented in the inverse direction of the centerline edge.
- mantissaint , optional
The desired length of the mantissa. Default is 6
- Returns
- dict
A dictionary containing the pipe, the start endcap, and the end endcap if they have been specified. The dictionary has the following keys: ‘pipe’ ‘endcapA’ ‘endcapB’
- static Prism(origin=None, width: float = 1, length: float = 1, height: float = 1, uSides: int = 1, vSides: int = 1, wSides: int = 1, direction: list = [0, 0, 1], placement: str = 'center', mantissa: int = 6, tolerance: float = 0.0001)
Creates a prism.
- Parameters
- origintopologic_core.Vertex , optional
The origin location of the prism. Default is None which results in the prism being placed at (0, 0, 0).
- widthfloat , optional
The width of the prism. Default is 1.
- lengthfloat , optional
The length of the prism. Default is 1.
- heightfloat , optional
The height of the prism.
- uSidesint , optional
The number of sides along the width. Default is 1.
- vSidesint , optional
The number of sides along the length. Default is 1.
- wSidesint , optional
The number of sides along the height. Default is 1.
- directionlist , optional
The vector representing the up direction of the prism. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the prism. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- mantissaint , optional
The number of decimal places to round the result to. Default is 6.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created prism.
- static RHS(origin=None, width: float = 1.0, length: float = 1.0, height: float = 1.0, thickness: float = 0.25, outerFillet: float = 0.0, innerFillet: float = 0.0, sides: int = 16, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001, silent: bool = False)
Creates a rectangluar hollow section (RHS).
- Parameters
- origintopologic_core.Vertex, optional
The location of the origin of the RHS. Default is None which results in the RHS being placed at (0, 0, 0).
- widthfloat , optional
The width of the RHS. Default is 1.0.
- lengthfloat , optional
The length of the RHS. Default is 1.0.
- thicknessfloat , optional
The thickness of the RHS. Default is 0.25.
- heightfloat , optional
The height of the RHS. Default is 1.0.
- outerFilletfloat , optional
The outer fillet multiplication factor based on the thickness (e.g. 1t). Default is 0.
- innerFilletfloat , optional
The inner fillet multiplication factor based on the thickness (e.g. 1.5t). Default is 0.
- sidesint , optional
The desired number of sides of the fillets. Default is 16.
- directionlist , optional
The vector representing the up direction of the RHS. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the RHS. This can be “center”, “bottom”, “top”, “lowerleft”, “upperleft”, “lowerright”, “upperright”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created cell.
- static RemoveCollinearEdges(cell, angTolerance: float = 0.1, tolerance: float = 0.0001, silent: bool = False)
Removes any collinear edges in the input cell.
- Parameters
- celltopologic_core.Cell
The input cell.
- angTolerancefloat , optional
The desired angular tolerance. Default is 0.1.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created cell without any collinear edges.
- static Roof(face, angle: float = 45, epsilon: float = 0.01, tolerance: float = 0.001)
Creates a hipped roof through a straight skeleton. This method is contributed by 高熙鹏 xipeng gao <gaoxipeng1998@gmail.com> This algorithm depends on the polyskel code which is included in the library. Polyskel code is found at: https://github.com/Botffy/polyskel
- Parameters
- facetopologic_core.Face
The input face.
- anglefloat , optional
The desired angle in degrees of the roof. Default is 45.
- epsilonfloat , optional
The desired epsilon (another form of tolerance for distance from plane). Default is 0.01. (This is set to a larger number as it was found to work better)
- tolerancefloat , optional
The desired tolerance. Default is 0.001. (This is set to a larger number as it was found to work better)
- Returns
- cell
The created roof.
- static SHS(origin=None, size: float = 1.0, height: float = 1.0, thickness: float = 0.25, outerFillet: float = 0.0, innerFillet: float = 0.0, sides: int = 16, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001, silent: bool = False)
Creates a square hollow section (SHS).
- Parameters
- origintopologic_core.Vertex, optional
The location of the origin of the SHS. Default is None which results in the SHS being placed at (0, 0, 0).
- sizefloat , optional
The size of the SHS. Default is 1.0.
- lengthfloat , optional
The length of the SHS. Default is 1.0.
- thicknessfloat , optional
The thickness of the SHS. Default is 0.25.
- heightfloat , optional
The height of the SHS. Default is 1.0.
- outerFilletfloat , optional
The outer fillet multiplication factor based on the thickness (e.g. 1t). Default is 0.
- innerFilletfloat , optional
The inner fillet multiplication factor based on the thickness (e.g. 1.5t). Default is 0.
- sidesint , optional
The desired number of sides of the fillets. Default is 16.
- directionlist , optional
The vector representing the up direction of the SHS. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the RHS. This can be “center”, “bottom”, “top”, “lowerleft”, “upperleft”, “lowerright”, “upperright”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created cell.
- static Sets(cells: list, superCells: list, tolerance: float = 0.0001) list
Classifies the input cells into sets based on their enclosure within the input list of super cells. The order of the sets follows the order of the input list of super cells.
- Parameters
- inputCellslist
The list of input cells.
- superCellslist
The list of super cells.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- list
The classified list of input cells based on their enclosure within the input list of super cells.
- static Shells(cell) list
Returns the shells of the input cell.
- Parameters
- celltopologic_core.Cell
The input cell.
- Returns
- list
The list of shells.
- static Sphere(origin=None, radius: float = 0.5, uSides: int = 16, vSides: int = 8, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001, silent: bool = False)
Creates an approximation of a sphere using a UV grid of triangular faces.
- Parameters
- origintopologic_core.Vertex , optional
The origin location of the sphere. Default is None which results in the sphere being placed at (0, 0, 0).
- radiusfloat , optional
The radius of the sphere. Default is 0.5.
- uSidesint , optional
The number of sides along the longitude of the sphere. Default is 16.
- vSidesint , optional
The number of sides along the latitude of the sphere. Default is 8.
- directionlist , optional
The vector representing the up direction of the sphere. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the sphere. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool, optional
If set to True, suppresses warning and error messages. Default is False.
- Returns
- topologic_core.Cell
The created sphere.
- static SurfaceArea(cell, mantissa: int = 6) float
Returns the surface area of the input cell.
- Parameters
- celltopologic_core.Cell
The cell.
- mantissaint , optional
The number of decimal places to round the result to. Default is 6.
- Returns
- areafloat
The surface area of the input cell.
- static TShape(origin=None, width=1, length=1, height=1, wSides=1, a=0.25, b=0.25, flipHorizontal=False, flipVertical=False, direction=[0, 0, 1], placement='center', mantissa=6, tolerance=0.0001, silent=False)
Creates a T-shape cell.
- Parameters
- origintopologic_core.Vertex , optional
The location of the origin of the T-shape. Default is None which results in the T-shape being placed at (0, 0, 0).
- widthfloat , optional
The overall width of the T-shape. Default is 1.0.
- lengthfloat , optional
The overall length of the T-shape. Default is 1.0.
- heightfloat , optional
the overall height of the T-shape. Default is 1.0.
- wSidesint , optional
The desired number of sides along the Z-axis. Default is 1.
- afloat , optional
The hortizontal thickness of the vertical arm of the T-shape. Default is 0.25.
- bfloat , optional
The vertical thickness of the horizontal arm of the T-shape. Default is 0.25.
- flipHorizontalbool , optional
if set to True, the shape is flipped horizontally. Default is False.
- flipVerticalbool , optional
if set to True, the shape is flipped vertically. Default is False.
- directionlist , optional
The vector representing the up direction of the T-shape. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the T-shape. This can be “center”, “lowerleft”, “upperleft”, “lowerright”, “upperright”. It is case insensitive. Default is “center”.
- mantissa: int , optional
The number of decimal places to round the result to. Default is 6.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Face
The created T-shape.
- static Tetrahedron(origin=None, length: float = 1, depth: int = 1, direction=[0, 0, 1], placement='center', mantissa: int = 6, tolerance: float = 0.0001, silent: bool = False)
Creates a recursive tetrahedron cell.
- Parameters
- origintopologic_core.Vertex , optional
The origin location of the tetrahedron. Default is None which results in the tetrahedron being placed at (0, 0, 0).
- lengthfloat , optional
The length of the edge of the tetrahedron. Default is 1.
- depthint , optional
The desired maximum number of recrusive subdivision levels.
- directionlist , optional
The vector representing the up direction of the tetrahedron. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the tetrahedron. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- mantissaint , optional
The number of decimal places to round the result to. Default is 6.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.CellComplex
The created tetrahedron.
- static Torus(origin=None, majorRadius: float = 0.5, minorRadius: float = 0.125, uSides: int = 16, vSides: int = 8, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001)
Creates a torus.
- Parameters
- origintopologic_core.Vertex , optional
The origin location of the torus. Default is None which results in the torus being placed at (0, 0, 0).
- majorRadiusfloat , optional
The major radius of the torus. Default is 0.5.
- minorRadiusfloat , optional
The minor radius of the torus. Default is 0.125.
- uSidesint , optional
The number of sides along the longitude of the torus (around the hole). Default is 16.
- vSidesint , optional
The number of sides along the latitude of the torus (tube direction). Default is 8.
- directionlist , optional
The vector representing the up direction of the torus. Default is [0, 0, 1].
- placementstr , optional
Placement of the input origin relative to the torus. One of: - “center”: origin is at the torus’ geometric center (default) - “bottom”: origin lies on the lowest point along the up direction - “lowerleft”: origin is at x/y lower-left and bottom in z of the torus’ local bbox Comparison is case-insensitive.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created torus.
- static Torus_old(origin=None, majorRadius: float = 0.5, minorRadius: float = 0.125, uSides: int = 16, vSides: int = 8, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001)
Creates a torus.
- Parameters
- origintopologic_core.Vertex , optional
The origin location of the torus. Default is None which results in the torus being placed at (0, 0, 0).
- majorRadiusfloat , optional
The major radius of the torus. Default is 0.5.
- minorRadiusfloat , optional
The minor radius of the torus. Default is 0.1.
- uSidesint , optional
The number of sides along the longitude of the torus. Default is 16.
- vSidesint , optional
The number of sides along the latitude of the torus. Default is 8.
- directionlist , optional
The vector representing the up direction of the torus. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the torus. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- Returns
- topologic_core.Cell
The created torus.
- static Tube(origin=None, radius: float = 1.0, height: float = 1.0, thickness: float = 0.25, sides: int = 16, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001, silent: bool = False)
Creates a Tube. This method is an alias for the circular hollow section (CHS).
- Parameters
- origintopologic_core.Vertex, optional
The location of the origin of the CHS. Default is None which results in the CHS being placed at (0, 0, 0).
- radiusfloat , optional
The outer radius of the CHS. Default is 1.0.
- thicknessfloat , optional
The thickness of the CHS. Default is 0.25.
- heightfloat , optional
The height of the CHS. Default is 1.0.
- sidesint , optional
The desired number of sides of the CSH. Default is 16.
- directionlist , optional
The vector representing the up direction of the RHS. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the RHS. This can be “center”, “bottom”, “top”, “lowerleft”, “upperleft”, “lowerright”, “upperright”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created cell.
- static Vertices(cell) list
Returns the vertices of the input cell.
- Parameters
- celltopologic_core.Cell
The input cell.
- Returns
- list
The list of vertices.
- static Volume(cell, mantissa: int = 6) float
Returns the volume of the input cell.
- Parameters
- celltopologic_core.Cell
The input cell.
- manitssa: int , optional
The number of decimal places to round the result to. Default is 6.
- Returns
- float
The volume of the input cell.
- static Wedge(origin=None, width=1, length=1, height=1, flipHorizontal=False, flipVertical=False, direction=[0, 0, 1], placement='center', tolerance=0.0001, silent=False)
Creates a Wedge.
- Parameters
- origintopologic_core.Vertex , optional
The location of the origin of the Wedge. Default is None which results in the Wedge being placed at (0, 0, 0).
- widthfloat , optional
The overall width of the Wedge. Default is 1.0.
- lengthfloat , optional
The overall length of the Wedge. Default is 1.0.
- heightfloat , optional
The overall height of the Wedge. Default is 1.0.
- directionlist , optional
The vector representing the up direction of the Wedge. Default is [0, 0, 1].
- placementstr , optional
The description of the placement of the origin of the Wedge. This can be “center”, “lowerleft”, “upperleft”, “lowerright”, “upperright”. It is case insensitive. Default is “center”.
- tolerancefloat , optional
The desired tolerance. Default is 0.0001.
- silentbool , optional
If set to True, error and warning messages are suppressed. Default is False.
- Returns
- topologic_core.Cell
The created Wedge.
- static Wires(cell) list
Returns the wires of the input cell.
- Parameters
- celltopologic_core.Cell
The input cell.
- Returns
- list
The list of wires.