Mesh Generation¶
- Utilities.meshgen.generate_boudin(left_width, right_width, height, thickness, arc_resolution, cap_resolution, fill_resolution)[source]¶
- Utilities.meshgen.generate_disc_density(density, outer_radius=1.0, inner_radius=0.0)[source]¶
Generate points on a disc with constant surfacic density.
- Parameters
- Returns
Tensor of points representing the disc on the plane.
- Return type
- Utilities.meshgen.generate_mesh_grid(aabb, resolution, dtype=None)[source]¶
Generates a grid on the plane.
- Parameters
aabb (Utilities.AABB) – Boundaries of the resulting grid.
resolution (Iterable) – Side resolution of the resulting grid.
dtype (torch.dtype, default=None) – Type of the output points. If None, dtype is set to torch.get_default_dtype().
- Returns
2-tuple of tensor representing the grid.
- Return type
- Utilities.meshgen.generate_rectangle(aabb, points_density, dtype=None)[source]¶
Generates a rectangle on the plane.
- Parameters
aabb (Utilities.AABB) – Boundaries of the resulting rectangle.
points_density (float) – Linear point density of the resulting rectangle.
dtype (torch.dtype, default=None) – Type of the output points. If None, dtype is set to torch.get_default_dtype().
- Returns
Points of the output rectangle.
- Return type
- Utilities.meshgen.generate_unit_circle(angular_resolution, dtype=None)[source]¶
Generates an unit circle on the plane. The generated circle is not closed, i.e. first and last point are not the same.
- Parameters
angular_resolution (int) – Angular resolution of the circle.
dtype (torch.dtype, default=None) – Type of the output points. If None, dtype is set to torch.get_default_dtype().
- Returns
Points of the output circle
- Return type
- Utilities.meshgen.generate_unit_square(points_per_side, dtype=None)[source]¶
Generates an unit square on the plane.
- Parameters
points_per_side (int) – Number of points that will be generated for each side of the square.
dtype (torch.dtype, default=None) – Type of the output points. If None, dtype is set to torch.get_default_dtype().
- Returns
Points of the output square.
- Return type