Skip to main content

Package to extract and trace the topological skeleton of a 2-order stress tensor field

Project description

Introduction

This package includes 2 python functions that together are able to extract the topological skeleton of the stress tensor field in the GH/Rhino environment.

Theory

Topo_Tracer_1

This function locates degenerate points and calculates the separating direction for each of them.

import package in GH component: from Topo_Tracer import Topo_Tracer_1

Inputs:

  1. neighbors = for partial derivative
  2. tol_deg = Tolerance for degeneracy
  3. offset_eps = For partial derivative
  4. cluster_threshold = distance threshold for clustering
  5. seed_amplitude = distance of the new seed points from the degenerate points
  6. index_radius = radius of the jordan curve used for index calculation
  7. n_sep_merged = the number of separating streamlines for higher order degeneracies (saddles)
  8. domain_surface = surface or brep
  9. points = points from the structural mesh in karamba (points where stress values are defined)
  10. stress_values_1 = stress values from first principal direction
  11. stress_values_2 = stress values from secondary principal direction
  12. vectors_1 = first principal stress trajectories as vectors
  13. vectors_2 = first principal stress trajectories as vectors

Outputs:

  1. singularities = degenerate points
  2. seed_vectors_field_1 = separating directions for first principal stress field given as 3D vectors
  3. seed_vectors_field_2 = separating directions for secondary principal stress field given as 3D vectors
  4. new_seeds_1 = new seed for each separating direction slighlty offsetted from the degenerate point for first principal stress field
  5. new_seeds_2 = new seed for each separating direction slighlty offsetted from the degenerate point for first principal stress field
  6. dege_index = tensor index of the degenerate points measured by eigenvector rotations
  7. dege_type = classification/type of degenerate point (wedge, trisector or merged singualrity)

Call function in GH: singularities, seed_vectors_field_1, seed_vectors_field_2, new_seeds_1, new_seeds_2, dege_index, dege_type = Topo_Tracer_1.main(domain_surface, points, stress_values_1, vectors_1, stress_values_2, vectors_2,tol_deg, offset_eps, neighbors, cluster_threshold, seed_amplitude, index_radius, n_sep_merged)

Topo_Tracer_2

This function takes the calculated separating directions and the new seed points and traces the separatrices.

import package in GH component: from Topo_Tracer import Topo_Tracer_2

Inputs:

  1. points = points from the structural mesh in karamba (points where stress values are defined)
  2. principal_vectors = principal stress trajectories/vectors for chosen field
  3. seed_points = the new seed points from Topo_Tracer_1
  4. seed_vectors = the new seed vectors / separating direction from Topo_Tracer_1
  5. boundary_curves = the curves that form the boundary of the design
  6. domain_surface = surface or brep
  7. k = k nearest neighbours for interpolation
  8. h = step length
  9. num_steps = max iterations
  10. step_sign = 1
  11. boundary_tolerance = from what distance boundaries are detected
  12. collision_threshold = threshold for when a PSL merges into anotehr psl
  13. n_back = how many traced points to go back when merging
  14. seed_dist = distance at what snapping to other seed points occurs.

Outputs:

  1. separatrices = traced separatrices
  2. connecting_points = lists with start and end point of connecting lines

Call function in GH: separatrices, connecting_points = Topo_Tracer_2.main(points, principal_vectors, seed_points, seed_vectors,boundary_curves, domain_surface, k, h, num_steps, step_sign , boundary_tolerance, collision_threshold, n_back, seed_dist)

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

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

topo_tracer-0.1.11.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

topo_tracer-0.1.11-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file topo_tracer-0.1.11.tar.gz.

File metadata

  • Download URL: topo_tracer-0.1.11.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.1

File hashes

Hashes for topo_tracer-0.1.11.tar.gz
Algorithm Hash digest
SHA256 2ad869034c1e24fbc5201e33d327d57ac5947c09a83416d1d493fd7a523fa8a6
MD5 1b7c7d9e05a0455a23c89cf69359c88d
BLAKE2b-256 1a8e21cbca7123036c35464f435357d179385a1054abc5b3b1523799e6abe6ae

See more details on using hashes here.

File details

Details for the file topo_tracer-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: topo_tracer-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.1

File hashes

Hashes for topo_tracer-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 f625e23d5e598db9e464e8307e1fffd63da03b2b748edde916b39316dd5a0e0c
MD5 a9b4e7274574e0c6dd535b46dcf8f06b
BLAKE2b-256 8e6a42f21ce1744989930fcac54b6637b97bfe1f9ebf3ecf9b021887c05a504c

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