topologicpy.Shell module

class topologicpy.Shell.Shell

Bases: object

Methods

ByDisjointFaces(externalBoundary, faces[, ...])

Creates a shell from an input list of disjointed faces.

ByFaces(faces[, transferDictionaries, ...])

Creates a shell from the input list of faces.

ByFacesCluster(cluster[, ...])

Creates a shell from the input cluster of faces.

ByThickenedWire(wire[, offsetA, offsetB, ...])

Creates a shell by thickening the input wire.

ByWires(wires[, triangulate, tolerance, silent])

Creates a shell by lofting through the input wires

ByWiresCluster(cluster[, triangulate, ...])

Creates a shell by lofting through the input cluster of wires

Circle([origin, radius, sides, fromAngle, ...])

Creates a circle.

Delaunay(vertices[, face, mantissa, tolerance])

Returns a delaunay partitioning of the input vertices.

Edges(shell)

Returns the edges of the input shell.

ExternalBoundary(shell[, tolerance, silent])

Returns the external boundary of the input shell.

Faces(shell)

Returns the faces of the input shell.

GoldenRectangle([width, maxIterations, ...])

Creates a "golden rectangle" with an optional "golden spiral".

HyperbolicParaboloidCircularDomain([origin, ...])

Creates a hyperbolic paraboloid with a circular domain.

HyperbolicParaboloidRectangularDomain([...])

Creates a hyperbolic paraboloid with a rectangular domain.

InternalBoundaries(shell[, tolerance, silent])

Returns the internal boundaries (holes) of the input shell.

InternalEdges(shell[, tolerance, silent])

Returns the internal edges of the input shell.

IsClosed(shell)

Returns True if the input shell is closed.

IsOnBoundary(shell, vertex[, tolerance])

Returns True if the input vertex is on the boundary of the input shell.

MobiusStrip([origin, radius, height, ...])

Creates a Möbius strip.

Paraboloid([origin, focalLength, width, ...])

Creates a paraboloid.

Pie([origin, radiusA, radiusB, sides, ...])

Creates a pie shape.

Planarize(shell[, origin, mantissa, tolerance])

Returns a planarized version of the input shell.

Rectangle([origin, width, length, uSides, ...])

Creates a rectangle.

RemoveCollinearEdges(shell[, angTolerance, ...])

Removes any collinear edges in the input shell.

Roof(face[, angle, epsilon, mantissa, tolerance])

Creates a hipped roof through a straight skeleton. This method is contributed by 高熙鹏 xipeng gao <gaoxipeng1998@gmail.com>

SelfMerge(shell[, angTolerance, tolerance])

Creates a face by merging the faces of the input shell.

Simplify(shell[, simplifyBoundary, ...])

Simplifies the input shell edges based on the Douglas Peucker algorithm. See https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm

Skeleton(face[, tolerance])

Creates a shell through a straight skeleton. This method is contributed by 高熙鹏 xipeng gao <gaoxipeng1998@gmail.com>

Square([origin, size, uSides, vSides, ...])

Creates a square.

Vertices(shell)

Returns the vertices of the input shell.

Voronoi(vertices[, face, mantissa, tolerance])

Returns a voronoi partitioning of the input face based on the input vertices.

Wires(shell)

Returns the wires of the input shell.

static ByDisjointFaces(externalBoundary, faces, maximumGap: float = 0.5, mergeJunctions: bool = False, threshold: float = 0.5, uSides: int = 1, vSides: int = 1, transferDictionaries: bool = False, mantissa: int = 6, tolerance: float = 0.0001)

Creates a shell from an input list of disjointed faces. THIS IS STILL EXPERIMENTAL

Parameters
externalBoundarytopologic_core.Face

The input external boundary of the faces. This resembles a ribbon (face with hole) where its interior boundary touches the edges of the input list of faces.

faceslist

The input list of faces.

maximumGapfloat , optional

The length of the maximum gap between the faces. Default is 0.5.

mergeJunctionsbool , optional

If set to True, the interior junctions are merged into a single vertex. Otherwise, diagonal edges are added to resolve transitions between different gap distances.

thresholdfloat , optional

The desired threshold under which vertices are merged into a single vertex. Default is 0.5.

uSidesint , optional

The desired number of sides along the X axis for the grid that subdivides the input faces to aid in processing. Default is 1.

vSidesint , optional

The desired number of sides along the Y axis for the grid that subdivides the input faces to aid in processing. Default is 1.

transferDictionariesbool, optional.

If set to True, the dictionaries in the input list of faces are transfered to the faces of the resulting shell. 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.

Returns
topologic_core.Shell

The created Shell.

static ByFaces(faces: list, transferDictionaries: bool = False, tolerance: float = 0.0001, silent=False)

Creates a shell from the input list of faces.

Parameters
faceslist

The input list of faces.

transferDictionariesbool , optional

If set to True, any dictionaries in the faces are transferred to the faces of the created Shell. 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.Shell

The created Shell.

static ByFacesCluster(cluster, transferDictionaries: bool = False, tolerance: float = 0.0001, silent: bool = False)

Creates a shell from the input cluster of faces.

Parameters
clustertopologic_core.Cluster

The input cluster of faces.

transferDictionariesbool , optional

If set to True, any dictionaries in the faces are transferred to the faces of the created Shell. 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.Shell

The created shell.

static ByThickenedWire(wire, offsetA: float = 1.0, offsetB: float = 1.0, tolerance: float = 0.0001)

Creates a shell by thickening the input wire. This method assumes the wire is manifold and planar.

Parameters
wiretopologic_core.Wire

The input wire to be thickened.

offsetAfloat , optional

The desired offset to the exterior of the wire. Default is 1.0.

offsetBfloat , optional

The desired offset to the interior of the wire. Default is 1.0.

tolerancefloat , optional

The desired tolerance. Default is 0.0001.

Returns
topologic_core.Shell

The created shell.

static ByWires(wires: list, triangulate: bool = True, tolerance: float = 0.0001, silent: bool = False)

Creates a shell by lofting through the input wires

Parameters
wireslist

The input list of wires.

triangulatebool , optional

If set to True, the faces will be triangulated. Default is True.

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 creates shell.

static ByWiresCluster(cluster, triangulate: bool = True, tolerance: float = 0.0001, silent: bool = False)

Creates a shell by lofting through the input cluster of wires

Parameters
wirestopologic_core.Cluster

The input cluster of wires.

triangulatebool , optional

If set to True, the faces will be triangulated. Default is True.

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 creates shell.

static Circle(origin=None, radius: float = 0.5, sides: int = 32, fromAngle: float = 0.0, toAngle: float = 360.0, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001)

Creates a circle.

Parameters
origintopologic_core.Vertex , optional

The location of the origin of the circle. Default is None which results in the circle being placed at (0, 0, 0).

radiusfloat , optional

The radius of the circle. Default is 0.5.

sidesint , optional

The number of sides of the circle. Default is 32.

fromAnglefloat , optional

The angle in degrees from which to start creating the arc of the circle. Default is 0.

toAnglefloat , optional

The angle in degrees at which to end creating the arc of the circle. Default is 360.

directionlist , optional

The vector representing the up direction of the circle. Default is [0, 0, 1].

placementstr , optional

The description of the placement of the origin of the pie. This can be “center”, or “lowerleft”. It is case insensitive. Default is “center”.

tolerancefloat , optional

The desired tolerance. Default is 0.0001.

Returns
topologic_core.Shell

The created circle.

static Delaunay(vertices: list, face=None, mantissa: int = 6, tolerance: float = 0.0001)

Returns a delaunay partitioning of the input vertices. The vertices must be coplanar. See https://en.wikipedia.org/wiki/Delaunay_triangulation.

Parameters
verticeslist

The input list of vertices.

facetopologic_core.Face , optional

The input face. If specified, the delaunay triangulation is clipped to the face.

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
shell

A shell representing the delaunay triangulation of the input vertices.

static Edges(shell) list

Returns the edges of the input shell.

Parameters
shelltopologic_core.Shell

The input shell.

Returns
list

The list of edges.

static ExternalBoundary(shell, tolerance: float = 0.0001, silent: bool = False)

Returns the external boundary of the input shell.

Parameters
shelltopologic_core.Shell

The input shell.

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.Wire or topologic_core.Cluster

The external boundary of the input shell.

static Faces(shell) list

Returns the faces of the input shell.

Parameters
shelltopologic_core.Shell

The input shell.

Returns
list

The list of faces.

static GoldenRectangle(width: float = 1.0, maxIterations: int = 10, clockwise: bool = False, includeSpiral=True, sides=96, origin=None, placement: str = 'center', direction: list = [0, 0, 1], mantissa: int = 6, tolerance: float = 0.0001, silent: bool = False)

Creates a “golden rectangle” with an optional “golden spiral”. See https://en.wikipedia.org/wiki/Golden_rectangle and https://en.wikipedia.org/wiki/Golden_spiral.

Parameters
widthfloat

The desired long side of the outer golden rectangle. Height is width/phi.

maxIterationsint

Number of subdivision squares to generate.

clockwisebool , optional

Controls the square “peel” progression (affects which side each next square is taken from). Default is False.

includeSpiralbool , optional

If set to True, the golden spiral is included in the resulting shell. Default is True.

sidesint , optional

The number of sides of the golden spiral (if included). Notes: If you set sides to be equal to maxIterations, you get the diagonals. It is best if the number of sides is a multiple of maxIterations. Default is 96.

origintopologic_core.Vertex, optional

The location of the origin of the rectangle. Default is None which results in the rectangle being placed at (0, 0, 0).

directionlist , optional

The vector representing the up direction of the rectangle. Default is [0, 0, 1].

placementstr , optional

The description of the placement of the origin of the rectangle. This can be “center”, “lowerleft”, “upperleft”, “lowerright”, “upperright”. 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.

silentbool , optional

If set to True, error and warning messages are suppressed. Default is False.

Returns
topologic_core.Shell

A shell made from the faces of all subdivision squares (multiple loops).

static HyperbolicParaboloidCircularDomain(origin=None, radius: float = 0.5, sides: int = 36, rings: int = 10, A: float = 2.0, B: float = -2.0, direction: list = [0, 0, 1], placement: str = 'center', mantissa: int = 6, tolerance: float = 0.0001)

Creates a hyperbolic paraboloid with a circular domain. See https://en.wikipedia.org/wiki/Compactness_measure_of_a_shape

Parameters
origintopologic_core.Vertex , optional

The origin of the hyperbolic parabolid. If set to None, it will be placed at the (0, 0, 0) origin. Default is None.

radiusfloat , optional

The desired radius of the hyperbolic paraboloid. Default is 0.5.

sidesint , optional

The desired number of sides of the hyperbolic parabolid. Default is 36.

ringsint , optional

The desired number of concentric rings of the hyperbolic parabolid. Default is 10.

Afloat , optional

The A constant in the equation z = A*x^2^ + B*y^2^. Default is 2.0.

Bfloat , optional

The B constant in the equation z = A*x^2^ + B*y^2^. Default is -2.0.

directionlist , optional

The vector representing the up direction of the hyperbolic paraboloid. Default is [0, 0, 1].

placementstr , optional

The description of the placement of the origin of the circle. This can be “center”, “lowerleft”, “bottom”. 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.Shell

The created hyperbolic paraboloid.

static HyperbolicParaboloidRectangularDomain(origin=None, llVertex=None, lrVertex=None, ulVertex=None, urVertex=None, uSides: int = 10, vSides: int = 10, direction: list = [0, 0, 1], placement: str = 'center', mantissa: int = 6, tolerance: float = 0.0001)

Creates a hyperbolic paraboloid with a rectangular domain.

Parameters
origintopologic_core.Vertex , optional

The origin of the hyperbolic paraboloid. If set to None, it will be placed at the (0, 0, 0) origin. Default is None.

llVertextopologic_core.Vertex , optional

The lower left corner of the hyperbolic paraboloid. If set to None, it will be set to (-0.5, -0.5, -0.5).

lrVertextopologic_core.Vertex , optional

The lower right corner of the hyperbolic paraboloid. If set to None, it will be set to (0.5, -0.5, 0.5).

ulVertextopologic_core.Vertex , optional

The upper left corner of the hyperbolic paraboloid. If set to None, it will be set to (-0.5, 0.5, 0.5).

urVertextopologic_core.Vertex , optional

The upper right corner of the hyperbolic paraboloid. If set to None, it will be set to (0.5, 0.5, -0.5).

uSidesint , optional

The number of segments along the X axis. Default is 10.

vSidesint , optional

The number of segments along the Y axis. Default is 10.

directionlist , optional

The vector representing the up direction of the hyperbolic paraboloid. Default is [0, 0, 1].

placementstr , optional

The description of the placement of the origin of the hyperbolic paraboloid. This can be “center”, “lowerleft”, “bottom”. 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.Shell

The created hyperbolic paraboloid.

static InternalBoundaries(shell, tolerance: float = 0.0001, silent: bool = False)

Returns the internal boundaries (holes) of the input shell.

Parameters
shelltopologic_core.Shell

The input shell.

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
list

The list of internal boundaries (holes) of the input shell.

static InternalEdges(shell, tolerance=0.0001, silent: bool = False)

Returns the internal edges of the input shell.

Parameters
shelltopologic_core.Shell

The input shell.

groupKeystr , optional

The edge dictionary key under which to save the edge group number. The default is “group”. Edges that separate the same faces belong to the same group.

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
list

The list of internal boundaries

static IsClosed(shell) bool

Returns True if the input shell is closed. Returns False otherwise.

Parameters
shelltopologic_core.Shell

The input shell.

Returns
bool

True if the input shell is closed. False otherwise.

static IsOnBoundary(shell, vertex, tolerance: float = 0.0001) bool

Returns True if the input vertex is on the boundary of the input shell. Returns False otherwise. On the boundary is defined as being on the boundary of one of the shell’s external or internal boundaries

Parameters
shelltopologic_core.Shell

The input shell.

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 shell. Returns False otherwise.

static MobiusStrip(origin=None, radius: float = 0.5, height: float = 1, uSides=32, vSides=1, twists: int = 1, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001, silent: bool = False)

Creates a Möbius strip. See: https://en.wikipedia.org/wiki/M%C3%B6bius_strip

Parameters
origintopologic_core.Vertex , optional

The location of the origin of the Möbius strip. Default is None which results in the Möbius strip being placed at (0, 0, 0).

radiusfloat , optional

The radius of the Möbius strip. Default is 0.5.

heightfloat , optional

The height of the Möbius strip. Default is 1.

uSidesint , optional

The number of circle segments of the Möbius strip. Default is 16.

vSidesint , optional

The number of vertical segments of the Möbius strip. Default is 1.

twistsint , optional

The number of twists (multiples of a 180 degree rotation) of the Möbius strip. Default is 1.

directionlist , optional

The vector representing the up direction of the Möbius strip. Default is [0, 0, 1].

placementstr , optional

Not implemented. The description of the placement of the origin of the Möbius strip. This can be “bottom”, “center”, or “lowerleft”. It is case insensitive. Default is “bottom”.

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 Paraboloid(origin=None, focalLength=0.125, width: float = 1, length: float = 1, uSides: int = 16, vSides: int = 16, direction: list = [0, 0, 1], placement: str = 'center', mantissa: int = 6, tolerance: float = 0.0001, silent: bool = False)

Creates a paraboloid. 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 1.

widthfloat , optional

The width of the parabolic surface. Default is 1.

lengthfloat , optional

The length of the parabolic surface. Default is 1.

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 Pie(origin=None, radiusA: float = 0.5, radiusB: float = 0.0, sides: int = 32, rings: int = 1, fromAngle: float = 0.0, toAngle: float = 360.0, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001)

Creates a pie shape.

Parameters
origintopologic_core.Vertex , optional

The location of the origin of the pie. Default is None which results in the pie being placed at (0, 0, 0).

radiusAfloat , optional

The outer radius of the pie. Default is 0.5.

radiusBfloat , optional

The inner radius of the pie. Default is 0.25.

sidesint , optional

The number of sides of the pie. Default is 32.

ringsint , optional

The number of rings of the pie. Default is 1.

fromAnglefloat , optional

The angle in degrees from which to start creating the arc of the pie. Default is 0.

toAnglefloat , optional

The angle in degrees at which to end creating the arc of the pie. Default is 360.

directionlist , optional

The vector representing the up direction of the pie. Default is [0, 0, 1].

placementstr , optional

The description of the placement of the origin of the pie. This can be “center”, or “lowerleft”. It is case insensitive. Default is “center”.

tolerancefloat , optional

The desired tolerance. Default is 0.0001.

Returns
topologic_core.Shell

The created pie.

static Planarize(shell, origin=None, mantissa: int = 6, tolerance: float = 0.0001)

Returns a planarized version of the input shell.

Parameters
shelltopologic_core.Shell

The input shell.

origintopologic_core.Vertex , optional

The desired origin of the plane unto which the planar shell will be projected. If set to None, the centroid of the input shell will be chosen. Default is None.

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.Shell

The planarized shell.

static Rectangle(origin=None, width: float = 1.0, length: float = 1.0, uSides: int = 2, vSides: int = 2, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001)

Creates a rectangle.

Parameters
origintopologic_core.Vertex , optional

The location of the origin of the rectangle. Default is None which results in the rectangle being placed at (0, 0, 0).

widthfloat , optional

The width of the rectangle. Default is 1.0.

lengthfloat , optional

The length of the rectangle. Default is 1.0.

uSidesint , optional

The number of sides along the width. Default is 2.

vSidesint , optional

The number of sides along the length. Default is 2.

directionlist , optional

The vector representing the up direction of the rectangle. Default is [0, 0, 1].

placementstr , optional

The description of the placement of the origin of the rectangle. This can be “center”, or “lowerleft”. It is case insensitive. Default is “center”.

tolerancefloat , optional

The desired tolerance. Default is 0.0001.

Returns
topologic_core.Shell

The created shell.

static RemoveCollinearEdges(shell, angTolerance: float = 0.1, tolerance: float = 0.0001, silent: bool = False)

Removes any collinear edges in the input shell.

Parameters
shelltopologic_core.Shell

The input shell.

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.Shell

The created shell without any collinear edges.

static Roof(face, angle: float = 45, epsilon: float = 0.01, mantissa: int = 6, 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 , optioal

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)

mantissaint , optional

The number of decimal places to round the result to. Default is 6.

tolerancefloat , optional

The desired tolerance. Default is 0.001. (This is set to a larger number as it was found to work better)

Returns
topologic_core.Shell

The created roof.

static SelfMerge(shell, angTolerance: float = 0.1, tolerance: float = 0.0001)

Creates a face by merging the faces of the input shell. The shell must be planar within the input angular tolerance.

Parameters
shelltopologic_core.Shell

The input shell.

angTolerancefloat , optional

The desired angular tolerance. Default is 0.1.

tolerancefloat , optional

The desired tolerance. Default is 0.0001.

Returns
topologic_core.Face

The created face.

static Simplify(shell, simplifyBoundary: bool = True, mantissa: int = 6, tolerance: float = 0.0001)

Simplifies the input shell edges based on the Douglas Peucker algorithm. See https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm Part of this code was contributed by gaoxipeng. See https://github.com/wassimj/topologicpy/issues/35

Parameters
shelltopologic_core.Shell

The input shell.

simplifyBoundarybool , optional

If set to True, the external boundary of the shell will be simplified as well. Otherwise, it will not be simplified. Default is True.

mantissaint , optional

The desired length of the mantissa. Default is 6

tolerancefloat , optional

The desired tolerance. Default is 0.0001. Edges shorter than this length will be removed.

Returns
topologic_core.Shell

The simplified shell.

static Skeleton(face, tolerance: float = 0.001)

Creates a shell 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.

tolerancefloat , optional

The desired tolerance. Default is 0.001. (This is set to a larger number as it was found to work better)

Returns
topologic_core.Shell

The created straight skeleton.

static Square(origin=None, size: float = 1.0, uSides: int = 2, vSides: int = 2, direction: list = [0, 0, 1], placement: str = 'center', tolerance: float = 0.0001)

Creates a square.

Parameters
origintopologic_core.Vertex , optional

The location of the origin of the square. Default is None which results in the square being placed at (0, 0, 0).

sizefloat , optional

The size of the square. Default is 1.0.

lengthfloat , optional

The length of the square. Default is 1.0.

uSidesint , optional

The number of sides along the width. Default is 2.

vSidesint , optional

The number of sides along the length. Default is 2.

directionlist , optional

The vector representing the up direction of the square. Default is [0, 0, 1].

placementstr , optional

The description of the placement of the origin of the square. This can be “center”, or “lowerleft”. It is case insensitive. Default is “center”.

tolerancefloat , optional

The desired tolerance. Default is 0.0001.

Returns
topologic_core.Shell

The created shell square.

static Vertices(shell) list

Returns the vertices of the input shell.

Parameters
shelltopologic_core.Shell

The input shell.

Returns
list

The list of vertices.

static Voronoi(vertices: list, face=None, mantissa: int = 6, tolerance: float = 0.0001)

Returns a voronoi partitioning of the input face based on the input vertices. The vertices must be coplanar and within the face. See https://en.wikipedia.org/wiki/Voronoi_diagram.

Parameters
verticeslist

The input list of vertices.

facetopologic_core.Face , optional

The input face. If the face is not set an optimised bounding rectangle of the input vertices is used instead. Default is None.

mantissaint , optional

The desired length of the mantissa. Default is 6

tolerancefloat , optional

The desired tolerance. Default is 0.0001.

Returns
shell

A shell representing the voronoi partitioning of the input face.

static Wires(shell) list

Returns the wires of the input shell.

Parameters
shelltopologic_core.Shell

The input shell.

Returns
list

The list of wires.