hoops_ai.cadaccess.hoops_exchange.hoops_brep
Classes
|
- class hoops_ai.cadaccess.hoops_exchange.hoops_brep.HOOPSBrep(body)
Bases:
BrepAccess- Parameters:
body (Any)
- build_face_adjacency_graph()
Builds and returns the face adjacency graph.
- Returns:
The face adjacency graph.
- Return type:
nx.Graph
- get_bounding_box()
Returns the bounding box of the CAD model as (xmin, ymin, zmin, xmax, ymax, zmax).
- get_diagonal_length()
Computes the diagonal length of the model’s bounding box.
- Returns:
Diagonal length.
- Return type:
- get_edge_attributes(edge_idx, attributes_specification)
Computes the edge attributes for a given edge index.
- get_edge_indices_map()
Returns a mapping from edge indices to edges (if needed).
- get_face_attributes(face_idx, attributes_specification)
Computes the face attributes for a given face index.
- get_face_centroids()
Computes and returns the centroids of the faces.
- Returns:
Mapping from face indices to their centroid coordinates.
- Return type:
Dict[int, np.ndarray]
- sample_points_on_face(face_index, num_points=512)
Samples points on a face given its index.
- sample_points_on_faces(face_indices, num_points=512)
Samples points on all faces and returns a list.
- ugrid(edge_index, num_u=10, us=False, method='point', reverse_order_with_edge=True)
Creates a 1D grid of samples from the given edge index in the shape.
- uvgrid(face_index, num_u=10, num_v=10, uvs=False, method='point', reverse_order_with_face=True)
Creates a 2D UV-grid of samples from the given face index in the shape.