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)
a, b = Tracer_A.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 (a)
- Edge and merge connections (b)
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)
a, b, c = Tracer_B.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 (a)
- Edge and merge connections (b)
- Valid seeds (c)
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:
- ghenv = global GH variable "ghenv"
- 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)
- max_offset_distance = max 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)
- strength = strength value for inlay
- stress_values = stress values from fx Karamba3D (for each point of the points input)
a, b ,c = Tracer_C.main(ghenv,h,num_steps,k,collision_threshold,snap_radius,n_back,max_offset_distance,sample_interval,sample_count,ratio_minseed_coll,seed_point,principal_vectors,points,domain_surface,boundary_curves,strength,stress_values)
Outputs:
- Traced PSL's (a)
- Edge and merge connections (b)
- Valid seeds (c)
Example files
A GH example file can be found on: https://github.com/Brandes21/PyPa/tree/main/Example_files
For any questions or in case of bugs feel free to contact me on: niclasbrandt97@gmail.com
Metadata
Release files for PSL-Tracer 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| psl_tracer-0.1.8.tar.gz | 25.2 kB | Without provenance | Details for psl_tracer-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| psl_tracer-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for psl_tracer-0.1.8-py3-none-any.whl |
Total release size: 52.7 kB
Release files / psl_tracer-0.1.8.tar.gz
| Download URL | psl_tracer-0.1.8.tar.gz |
|---|---|
| Size | 25.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad20ce5c431f0515d0af8cf6c051123bc8d43b6de45c5a8425a3e5dc60097214
|
|
BLAKE2b-256 checksum How to use checksums |
ecdadbd0d507cddea6ef720cbffcf1e4be30b584f27d11d1a27d7b45bd383ffa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.1
|
Release files / psl_tracer-0.1.8-py3-none-any.whl
| Download URL | psl_tracer-0.1.8-py3-none-any.whl |
|---|---|
| Size | 27.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9313d4e34b50ca364e0a65fb34fdea9f622349f26ae86b7fa57ba2a46d1ecc3
|
|
BLAKE2b-256 checksum How to use checksums |
719dff6d0c682e9a2c6a9ba3d15e124f6a8987a885189f1859386867d37f2f6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.1
|
Security for PSL-Tracer 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.