Custom PSL Tracers for Grasshopper
Project description
Introduction
This package includes 3 PSL tracing functions that can trace a layout of principal stress lines with custom features inside the GH/Rhino environment. In total there are three functions inside the package ranging from manual seeds point selection, to automated selction and finally to automated force-based selection all tracing a principal stress line field (vector field).
Theory
All tracers are based on the same tracing logic. They are based on biderctional tracing where the RK4 method is utilized to approximate the next point. The interpolation between points in the discrete structured mesh is done using k-nearest neighbours IDW. Additional to the logic all tracers incorporate custom features such as: Edge detection, loop detection, distance thresholds, and optional merging with snapping. This ensures a tool that can be informed by user defined constraints generating a custom layout adhering to geometric rules. It works for 3D shapes and uses projection to stay on the surface.
Tracer A
Tracer A takes a manual selection of seed points as an input and traces those bidirectionally. The order of the seed point list defines the order in which the seeds are traced.
Inputs:
- h = step length
- num_steps = maximum iterations (steps)
- k = k nearest neighbours for interpolation
- collision_threshold = distance threshold
- snap_radius = radius in which snapping occurs for merging
- n_back = if merging is initiated how many steps back the connection is (to avoid 90° connections)
- sample_count = sampling of boundaries for edge connection
- k_edge = how many edge samples to check for when building the edge connection
- seed_points = manually selected seed points
- principal_vectors = vector field
- points = points of the structural mesh
- domain_surface = surface or brep
- boundary_curves = edge curves of the surface (OBS: needs to be a list)
def main(h,num_steps,k,collision_threshold,snap_radius,n_back,sample_count,k_edge,seed_points,principal_vectors,points,domain_surface,boundary_curves):
Outputs:
- main_lines = traced PSL's
- Edge and merge connections
Tracer B
Tracer B takes one initial seed and generates a equally distributed PSL network automatically.
Inputs:
- h = step length
- num_steps = maximum iterations (steps)
- k = k nearest neighbours for interpolation
- collision_threshold = distance threshold
- snap_radius = radius in which snapping occurs for merging
- n_back = if merging is initiated how many steps back the connection is (to avoid 90° connections)
- offset_distance = distance for the offsetting of sample points/seeds
- sample_interval = sampling of PSL
- sample_count = sampling of boundaries for edge connection
- k_edge = how many edge samples to check for when building the edge connection
- ratio_minseed_coll = ratio for minimum seed distance based on collision threshold
- seed_point = manually selected seed point
- principal_vectors = vector field
- points = points of the structural mesh
- domain_surface = surface or brep
- boundary_curves = edge curves of the surface (OBS: needs to be a list)
def main(h,num_steps,k,collision_threshold,snap_radius,n_back,offset_distance,sample_interval,sample_count,k_edge,ratio_minseed_coll,seed_point,principal_vectors,points,domain_surface,boundary_curves):
Outputs:
- Traced PSL's
- Edge and merge connections
- Valid seeds
Tracer C
Tracer C takes one initial seed and generates a equally distributed PSL network automatically based on the forces in the design domain.
Inputs:
- h = step length
- num_steps = maximum iterations (steps)
- k = k nearest neighbours for interpolation
- collision_threshold = distance threshold
- snap_radius = radius in which snapping occurs for merging
- n_back = if merging is initiated how many steps back the connection is (to avoid 90° connections)
- offset_distance = distance for the offsetting of sample points/seeds
- sample_interval = sampling of PSL
- sample_count = sampling of boundaries for edge connection
- k_edge = how many edge samples to check for when building the edge connection
- ratio_minseed_coll = ratio for minimum seed distance based on collision threshold
- seed_point = manually selected seed point
- principal_vectors = vector field
- points = points of the structural mesh
- domain_surface = surface or brep
- boundary_curves = edge curves of the surface (OBS: needs to be a list)
Outputs:
- Traced PSL's
- Edge and merge connections
- Valid seeds
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file psl_tracer-0.1.7.tar.gz.
File metadata
- Download URL: psl_tracer-0.1.7.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec467a6717284563f50321398dde1e85e4eb33950420246cf9c9d3f9c9865b6e
|
|
| MD5 |
94d50b0cf293bde75542fbd3e611d155
|
|
| BLAKE2b-256 |
cefa4e3ed12c79fbeb64cca21590917989bd55c99c6a9c5a600de426fb96eda4
|
File details
Details for the file psl_tracer-0.1.7-py3-none-any.whl.
File metadata
- Download URL: psl_tracer-0.1.7-py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e819829186dea4c2b86efb7098787dac9499637a52a5cf2b71cb941dc7e5ad6c
|
|
| MD5 |
a6b98d22d05840d256324de1c70419ae
|
|
| BLAKE2b-256 |
e5a2ea5164fa53d4bd2085f17f71a9e38e6beb6d4fba27955bc57cb754590924
|