Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose TopoEntity coordinates and add query methods to TopoEntities #880

Open
dkowollik opened this issue Sep 10, 2024 · 0 comments
Open
Labels
aps Anything related to Ansys Prime Server enhancement New features or code improvements

Comments

@dkowollik
Copy link

📝 Description of the feature

Our models contain a lot of trimmed surfaces and breps that later need to be meshed with scaffold surface meshing. If I use CAD imports that do not provide all the necessary entitity names, I need to query the entities and give names within pyprime. I want to create zones and labels inside pyprime and be able to control the meshing through sizing in more detail. The labels are needed to be able to pass them on to PyACP.

I did not find such query methods and access to the underlying data structures of topo_entities. Access to only connectivities will not help, if I have to test point coordinates, etc. Therefore, I create this feature request.

This is a list of query methods and attributes that would be useful to identify the entitities:

TopoNode: TopoEntity representing points
o Properties

  • location (position coordinates) of this point

o Methods

  • geometry_equals: Determines if two geometries equal one another by a certain tolerance that can be provided
  • distance_to: Evaluate the distance to the provided point coordinates
  • get_labels: return list of labels that this node is grouped to, None if not grouped in any label

TopoEdge: TopoEntity representing curves
o Properties

  • point_at_start: either return TopoNode or point coordinates of TopoNode directly
  • point_at_endt: either return TopoNode or point coordinates of TopoNode directly

o Methods

  • closest_point(test_point, maximum_distance): find point on edge that is closest to test_point. maximum_distance might be an option to substantially speed up the search. Return closest point and if possible euclidean, lateral and normal distance
  • get_zones: return list of zones that this edge is grouped to, None if not grouped in any zone
  • get_labels: return list of labels that this edge is grouped to, None if not grouped in any label
  • geometry_equals: Determines if two geometries equal one another by a certain tolerance that can be provided
  • point_at_normalized_length: gets a point at a certain normalized length along the edge. The length must be between or including 0.0 and 1.0, where 0.0 equals the start of the edge and 1.0 the end of the edge

TopoFace: TopoEntity representing surfaces
o Properties

  • topo_edges

o Methods

  • closest_point(test_point, maximum_distance): find point on face that is closest to test_point. maximum_distance might be an option to substantially speed up the search. Return closest point and if possible euclidean, lateral and normal distance
  • topo_edge_equals_face_edge: Determines if a provided topo_edge lies on the edge of the face within a certian tolerance.
  • get_zones: return list of zones that this face is grouped to, None if not grouped in any zone
  • get_labels: return list of labels that this face is grouped to, None if not grouped in any label

Zones:
o Properties

  • topo_faces

o Methods

  • create_zone_from_topo_faces

Labels:
o Properties

  • topo_nodes
  • topo_edges
  • topo_faces

o Methods

  • create_label_from_topo_faces
  • create_label_from_topo_nodes
  • create_label_from_topo_edges
  • create_label_from_labels

💡 Steps for implementing the feature

No response

🔗 Useful links and references

No response

@dkowollik dkowollik added the enhancement New features or code improvements label Sep 10, 2024
@waltersma waltersma added the aps Anything related to Ansys Prime Server label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aps Anything related to Ansys Prime Server enhancement New features or code improvements
Projects
None yet
Development

No branches or pull requests

2 participants