Skip to main content

Map-first TPMS and graph lattices for OpenVCAD's version 3 attribute-modeling workflow, including CAD-face conformal maps and native mapped nodes.

Project description

pyvcad_metamaterials

pyvcad_metamaterials is OpenVCAD's map-first TPMS and graph-lattice package for the version 3 attribute model. Builders return ordinary pyvcad nodes and keep coordinate layout in an immutable CellMap.

import pyvcad as pv
import pyvcad_metamaterials as mm

cell_map = mm.rectangular_cell_map(
    (pv.Vec3(-15.0, -15.0, -15.0), pv.Vec3(15.0, 15.0, 15.0)),
    cells=(3, 3, 3),
)

gyroid = mm.gyroid(cell_map, wall_thickness=1.2)
octet = mm.octet(cell_map, beam_radius=0.7)

Solver-free geometric characterization is available for any final node and for ideal graph unit cells:

geometry = mm.properties.characterize(
    gyroid,
    voxel_size=0.4,
    periodic_axes="xyz",
)
graph = mm.properties.characterize_graph_cell(
    "octet",
    cell_size=10.0,
    beam_radius=0.7,
)

The reports include relative density, porosity, interface area, hydraulic diameter, directional cross-sections, connectivity, mesh topology, coordination, strut length, and slenderness metrics.

Different topology bodies can share the same conformal coordinates and be clipped into sharp regions with ordinary OpenVCAD Boolean intersections and unions.

CAD-face authoring uses the optional extra:

pip install "pyvcad-metamaterials[cad]"

CadQuery shapes cross into OpenVCAD through pyvcad.CADModel.from_cadquery(...), while raw OCP objects use the optional pyvcad_metamaterials.occ adapter. Both routes use in-memory ASCII BREP data.

See the OpenVCAD guides for rectangular maps, heterogeneous regions, conformal CAD-face maps, paired faces, field-driven warps, explicit world/cell fields, diagnostics, and cell-coordinate attributes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvcad_metamaterials-3.0.0-py3-none-any.whl (35.1 kB view details)

Uploaded Python 3

File details

Details for the file pyvcad_metamaterials-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyvcad_metamaterials-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29759c2959d984efeec3f0bd2c20e86fc07d870b4fc1e471472ff93b7dd2ce4e
MD5 99ff34a169312164db2eed8c0d3cb0f5
BLAKE2b-256 b853f25fabc192b30bfba69adc6c6a03be680463e6129b17200ebbf2a7c279bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page