Implement a Volume
Summary
There should be an abstract representation for Volumes (==> a "Volume" class with children "V_Sphere", "V_Cylinder", "V_Box" similar to the geometry classes. They can be used in Tolerances, but also implement more abstract methods such as "sample" (sample uniformly / grid / ... within the volume).
Expected behavior
A Volume class that can be loaded/defined in the same manner as the current tolerance classes, but with a more generic implementation.
What's it needed for?
- Tolerances
- Uniform sampling within Volumes for automatic task generation
Relevant logs, links, or screenshots
- There is a previous attempt to implement uniform sampling for partial spheres, cylinders and boxes written by @JonathanKuelz - reach out before starting to work on this issue.
Roadmap
Implement a volume class with:
- A transformation property (a single volume has a defined origin and orientation in SE(3))
- A volume property (the actual volume of the object) (this can be taken from the SpatialSampler)
- A "contains(point)" check (this can be taken from the Tolerance implementations)
- A "distance(other_volume)"
- A "sample_uniform" method that returns a single point from the volume, sampled uniformly
Also, there should not only be sphere, cylinder or box volumes but also a "union of volumes" class (e.g. ComposedVolume)
Edited by Jonathan Külz