Skip to content

ChristopherVoltl/VoxelizeGeometry

Repository files navigation

VoxelizeGeometry

A.K.A. Cube-a-Saurus

Cube-a-Saurus provides tools to voxelize 3D geometries into uniformly sized cubic Breps (voxels) and evaluate their spatial relationship with reference geometries and points. The component is ideal for applications in 3D modeling, architecture, computational design, and manufacturing, where discrete representations of complex geometries are needed.

This work is an ongoing PhD research project at the University of Michigan. This component was initially used to translate FEA load data to color-informed voxels that were then converted into 3D printing toolpaths. Cube-a-Saurus

What does this component do?

Features

  1. Voxelization:
  • Generates cubic Breps (voxels) with a specified size to represent the input Brep geometry.
  1. Containment Analysis:
  • Tests each voxel to determine whether it is entirely inside, intersecting, or outside a reference Brep.
  1. Boolean Splitting:
  • Splits voxelized Breps using the input Brep as a splitting boundary.
  • Filters resulting Breps to include only those inside or on the surface of the reference Brep.
  1. Point Influence:
  • Accepts a list of points to influence the color or categorization of the generated voxels.
  1. Interior Voxel Extraction:
  • Separates and outputs voxels that are fully contained within the reference Brep.
  1. Customizability:
  • Includes parameters for voxel size, Brep input, and influencing points for flexibility in various design scenarios.

Inputs

  1. Brep (B):
  • The geometry to be voxelized.
  1. Voxel Size (V):
  • The uniform size of the cubic voxels.
  1. Points (P):
  • A list of points used to influence voxel properties (e.g., color).

Outputs

  1. All Voxels (V):
  • A list of all generated voxels as cubic Breps.
  1. Colors (C):
  • Corresponding colors for each voxel based on point influence or other criteria.
  1. Split Breps (SB):
  • Voxels that have been split and filtered using the reference Brep.
  1. Interior Voxels (SB):
  • Voxels entirely contained within the input Brep geometry.

Internal Logic

  1. Voxel Generation:
  • A bounding box is computed for the input Brep.
  • Based on the specified size, the bounding box is divided into a grid of uniform cubes (voxels).
  • Each voxel is checked for intersection or containment within the input Brep.
  1. Boolean Splitting:
  • Uses Rhino’s Brep.CreateBooleanSplit method to split voxels that intersect the input Brep.
  • Filters the resulting Breps to include only those entirely within or on the boundary of the input Brep.
  1. Interior Filtering:
  • Extracts voxels that are fully inside the Brep using a robust containment check (IsFullyInside).
  1. Containment Check:
  • Evaluates Breps based on their vertices, centroid, and optionally sampled surface points to ensure comprehensive containment analysis.

Component Features

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages