Skip to main content

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:

  1. h = step length
  2. num_steps = maximum iterations (steps)
  3. k = k nearest neighbours for interpolation
  4. collision_threshold = distance threshold
  5. snap_radius = radius in which snapping occurs for merging
  6. n_back = if merging is initiated how many steps back the connection is (to avoid 90° connections)
  7. sample_count = sampling of boundaries for edge connection
  8. k_edge = how many edge samples to check for when building the edge connection
  9. seed_points = manually selected seed points
  10. principal_vectors = vector field
  11. points = points of the structural mesh
  12. domain_surface = surface or brep
  13. 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:

  1. main_lines = traced PSL's
  2. Edge and merge connections

Tracer B

Tracer B takes one initial seed and generates a equally distributed PSL network automatically.

Inputs:

  1. h = step length
  2. num_steps = maximum iterations (steps)
  3. k = k nearest neighbours for interpolation
  4. collision_threshold = distance threshold
  5. snap_radius = radius in which snapping occurs for merging
  6. n_back = if merging is initiated how many steps back the connection is (to avoid 90° connections)
  7. offset_distance = distance for the offsetting of sample points/seeds
  8. sample_interval = sampling of PSL
  9. sample_count = sampling of boundaries for edge connection
  10. k_edge = how many edge samples to check for when building the edge connection
  11. ratio_minseed_coll = ratio for minimum seed distance based on collision threshold
  12. seed_point = manually selected seed point
  13. principal_vectors = vector field
  14. points = points of the structural mesh
  15. domain_surface = surface or brep
  16. 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:

  1. Traced PSL's
  2. Edge and merge connections
  3. 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:

  1. h = step length
  2. num_steps = maximum iterations (steps)
  3. k = k nearest neighbours for interpolation
  4. collision_threshold = distance threshold
  5. snap_radius = radius in which snapping occurs for merging
  6. n_back = if merging is initiated how many steps back the connection is (to avoid 90° connections)
  7. offset_distance = distance for the offsetting of sample points/seeds
  8. sample_interval = sampling of PSL
  9. sample_count = sampling of boundaries for edge connection
  10. k_edge = how many edge samples to check for when building the edge connection
  11. ratio_minseed_coll = ratio for minimum seed distance based on collision threshold
  12. seed_point = manually selected seed point
  13. principal_vectors = vector field
  14. points = points of the structural mesh
  15. domain_surface = surface or brep
  16. boundary_curves = edge curves of the surface (OBS: needs to be a list)

Outputs:

  1. Traced PSL's
  2. Edge and merge connections
  3. 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

psl_tracer-0.1.5.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

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

psl_tracer-0.1.5-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file psl_tracer-0.1.5.tar.gz.

File metadata

  • Download URL: psl_tracer-0.1.5.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

Hashes for psl_tracer-0.1.5.tar.gz
Algorithm Hash digest
SHA256 3497b77e5982a7f0033cd984b746b459bfad0dd94d5b7c362300b2894559002d
MD5 64ef1983882db6c994e4771931dee71f
BLAKE2b-256 29792449471f3e23460e5b3c1a2a3b8a2d7c244021c1b2168b8be0147bd6ed6c

See more details on using hashes here.

File details

Details for the file psl_tracer-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: psl_tracer-0.1.5-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

Hashes for psl_tracer-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ebc1ae6530a80181a56d875876cdb2f4ed24b88cf52774d767012735b8942dbe
MD5 ea6f0403781995e15fb33a9c4a7345c5
BLAKE2b-256 90fac28a5e87447f6e88ed3b672ac23d99b7ed013f83f2eac1b0af13fa5263a4

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