Solid🍋
Solid
🍋
Bases: Surface
Object representing a 3D triangulated solid, consisting of a 3D triangulated surface where each edge of the surface is connected to exactly 2 faces.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
object name. |
required |
xyz |
Optional[Data]
|
geometry data, respectively X, Y and Z. |
None
|
triangles |
Optional[Data]
|
topological data, one triangle per element, matching geometry index. |
None
|
automatic_hole_fix |
bool
|
boolean indicator to whether perform a fix if needed or raise an error. |
False
|
Raises:
Type | Description |
---|---|
ValueError
|
|
Example
import geolime as geo
import numpy as np
xyz = np.array([
[0., 0., 0.],
[1., 0., 0.],
[0., 1., 0.],
[0., 0., 1]
])
trgls = np.array([
[1, 3, 0],
[3, 2, 0],
[2, 3, 1],
[1, 0, 2]
])
surf = geo.Solid("MySolid", xyz, trgls)
contains(other)
🍋
Check if a Solid contains coordinates of a GeoRefObject.
A new region on the GeoRefObject is created informing for each coordinate whether it is inside or outside the Solid.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
GeoRefObject
|
GeoRefObject to check if points are in or outside the Solid. |
required |
Last update:
2023-05-10