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, polyhedron, ...])

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.

Edges(shell)

Returns the edges of the input shell.

ExternalBoundary(shell[, tolerance, silent])

Returns the longest external/free boundary Wire 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[, silent])

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, ...])

Returns a planarized version of the input Shell while preserving curved Edge geometry whenever the active backend supports exact native projection.

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

Creates a rectangle.

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

Removes redundant collinear linear Edges from 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 a planar polyline Shell using the Douglas-Peucker 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[, deflection, ...])

Returns the intrinsic/geodesic Voronoi partition of the input Face.

Wires(shell)

Returns the wires of the input shell.

Delaunay

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: bool = False)

Creates a Shell from the input list of Faces.

Parameters
faceslist

The input list of Faces.

transferDictionariesbool , optional

If True, dictionaries from the input Faces are transferred to the corresponding Faces of the created Shell. Default is False.

tolerancefloat , optional

The desired tolerance. Default is 0.0001.

silentbool , optional

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

Returns
topologic_core.Shell

The created Shell, or None if construction fails.

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, silent: bool = False)

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, polyhedron: bool = True, tolerance: float = 0.0001, silent: bool = False)

Creates a Shell by lofting through the input Wires.

polyhedron=True preserves the historical faceted loft. When the active backend provides loft construction, this mode is delegated to it; otherwise the established public-API faceted fallback is retained.

polyhedron=False requests a genuine curve-preserving ruled Shell. A backend supporting exact lofting operates directly on the supplied section Wires so circular, B-spline, and NURBS Edges remain curved. If that capability is unavailable, the method returns None rather than silently faceting the geometry.

Parameters
wireslist

The ordered input list of Wires. At least two valid Wires are required.

triangulatebool , optional

If polyhedron is True, specifies whether each faceted side is triangulated. Default is True.

polyhedronbool , optional

If True, construct the historical faceted/polyhedral loft. If False, construct a curve-preserving ruled Shell. Default is True.

tolerancefloat , optional

The desired tolerance. Default is 0.0001.

silentbool , optional

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

Returns
topologic_core.Shell

The created Shell, or None when construction fails or exact lofting is requested on an unsupported backend.

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

Creates a shell by lofting through the input cluster of wires.

Parameters
clustertopologic_core.Cluster

The input cluster of wires.

triangulatebool , optional

If polyhedron is True, specifies whether the side faces are triangulated. Default is True.

polyhedronbool , optional

If True, uses the historical faceted/polyhedral loft. If False, requests an exact curve-preserving ruled shell from the active backend. 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 created 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, deflection: float = None, maxIterations: int = 5, convergence: float = 0.001, tolerance: float = 0.0001, silent: bool = False)
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 longest external/free boundary Wire 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.

Internal edges are edges that are shared by more than one face. Edges that separate the same set of faces are grouped together and self-merged.

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

A list of merged internal-edge groups. Each item is typically an Edge, Wire, Cluster, or another valid topology returned by Topology.SelfMerge.

static IsClosed(shell, silent: bool = False) → 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, silent: bool = False)

Returns a planarized version of the input Shell while preserving curved Edge geometry whenever the active backend supports exact native projection.

Plane inference is face-based rather than edge-sampling-based. This is essential for closed analytic and NURBS Edges, which may expose only one topological Vertex and for which direct curve sampling can be unsafe in some geometry backends.

Parameters
shelltopologic_core.Shell

The input Shell.

origintopologic_core.Vertex , optional

The desired origin of the target plane. If None, the centroid of the input Shell is used. Default is None.

mantissaint , optional

The number of decimal places used when deriving the best-fit plane. Default is 6.

tolerancefloat , optional

The desired geometric 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 planarized Shell, or None if the operation cannot be completed without approximating curved geometry.

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, polyhedron: bool = True, tolerance: float = 0.0001, silent: bool = False)

Removes redundant collinear linear Edges from the input Shell.

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, silent: bool = False)

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, silent: bool = False)

Simplifies a planar polyline Shell using the Douglas-Peucker algorithm.

This operation is intentionally limited to linear Edges. Curved Edges are rejected rather than silently replaced by chords. A tilted planar Shell is first rigidly flattened to XY, simplified there, and then restored.

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, deflection: float = None, maxIterations: int = 5, convergence: float = 0.001, tolerance: float = 0.0001, silent: bool = False)

Returns the intrinsic/geodesic Voronoi partition of the input Face.

The sites must lie on, or within tolerance of, the trimmed input Face. Distances are shortest-path distances constrained to that Face, including its outer and internal boundaries. UV-coordinate Euclidean distance is never used as the metric.

When supported by the active backend, intrinsic distances are approximated with the Kimmel-Sethian Fast Marching Method on successively refined triangulations of the trimmed Face. deflection is interpreted as the finest permitted triangulation target; refinement starts coarser and never goes below it. Converged triangle-local interfaces are chained and reconstructed as degree-1 B-spline curves on the original support surface before splitting, so the returned topology does not inherit one Edge per computational triangle. Analytic and NURBS surface geometry is retained. UV-coordinate Euclidean distance and mesh-edge Dijkstra are not used as the intrinsic metric.

static Wires(shell) → list

Returns the wires of the input shell.

Parameters
shelltopologic_core.Shell

The input shell.

Returns
list

The list of wires.