Operations
-
Shape formo::translate(const Shape &shape, const Vector &v)
Translate a shape.
- Parameters:
shape – Shape to translate
v – Translation vector
- Returns:
Translated shape
-
Shape formo::scale(const Shape &shape, double s)
Scale a shape.
- Parameters:
shape – Shape to scale
s – Scale factor
- Returns:
Scaled shape
-
Vector formo::scale(const Vector &vec, double s)
Scale a vector.
- Parameters:
vec – Vector to scale
s – Scale factor
- Returns:
Scaled vector
-
Shape formo::mirror(const Shape &shape, const Axis1 &axis)
Mirror a shape about an axis.
- Parameters:
shape – Shape to mirror
axis – Axis to mirror about
- Returns:
Resulting shape
-
Vector formo::mirror(const Vector &vector, const Axis1 &axis)
Mirror a vector about an axis.
- Parameters:
shape – Vector to mirror
axis – Axis to mirror about
- Returns:
Resulting vector
-
Vector formo::mirror(const Vector &vector, const Axis2 &axis)
Mirror a vector about an axis.
- Parameters:
shape – Vector to mirror
axis – Axis to mirror about
- Returns:
Resulting vector
-
Point formo::mirror(const Point &point, const Axis1 &axis)
Mirror a point about an axis.
- Parameters:
point – Point to mirror
axis – Axis to mirror about
- Returns:
Resulting point
-
Point formo::mirror(const Point &point, const Axis2 &axis)
Mirror a point about an axis.
- Parameters:
point – Point to mirror
axis – Axis to mirror about
- Returns:
Resulting point
-
Shape formo::fuse(const Shape &shape, const Shape &tool)
Fuse 2 shapes.
- Parameters:
shape – Shape
tool – Tool
- Returns:
Resulting fused shape
-
Shape formo::cut(const Shape &shape, const Shape &tool)
Cut a shape with a tool.
- Parameters:
shape – Shape to cut
tool – Cutting tool
- Returns:
Resulting shape
-
Shape formo::intersect(const Shape &shape, const Shape &tool)
Intersect 2 shapes.
- Parameters:
shape – Shape
tool – Tool
- Returns:
Resulting shape
-
Shape formo::fillet(const Shape &shape, const std::vector<Edge> &edges, double radius)
Fillet.
- Parameters:
shape – Shape to fillet
edges – List of edges to fillet
radius – Radius of the fillet
- Returns:
Resulting shape
-
Shape formo::hollow(const Shape &shape, const std::vector<Face> &faces_to_remove, double thickness, double tolerance)
Hollow the shape.
- Parameters:
shape – Shape to hollow
faces_to_remove – Faces to open
thickness – Desired wall thickness
tolerance – Tolerance
- Returns:
Hollowed out shape
-
Shape formo::revolve(const Shape &shape, const Axis1 &axis, double angle = 2. * M_PI)
Revolve shape about an axis.
- Parameters:
shape – Shape to revolve
axis – Axis to revolve about
angle – Angle to revolve
- Returns:
Resulting shape
-
Point formo::rotate(const Point &point, const Axis1 &axis, double angle)
Rotate point about an axis.
-
Vector formo::rotate(const Vector &vector, const Axis1 &axis, double angle)
Rotate vector about an axis.
- Parameters:
vector – Vector to rotate
axis – Axis to rotate about
angle – Rotation angle (in radians)
- Returns:
Resulting vector
-
Shape formo::rotate(const Shape &point, const Axis1 &axis, double angle)
Rotate a shape about an axis.
-
Wire formo::section(const Shape &shape, const Plane &plane)
Compute section between a shape and a plane.
-
Shape formo::draft(const Shape &shape, const Plane &pln, const std::vector<Face> &faces, double angle)
Taper-adding transformations on a shape.
The resulting shape is constructed by defining one face to be tapered after another one, as well as the geometric properties of their tapered transformation. Each tapered transformation is propagated along the series of faces which are tangential to one another and which contains the face to be tapered.
- Parameters:
shape – Shape to taper
pln – Neutral plane
faces – Faces to taper
angle – Tapering angle
- Returns:
Tapered shape
-
Shape formo::hole(const Shape &shape, const Axis1 &axis, double radius)
Make cylindrical hole on a shape.
- Parameters:
shape – Shape on which hole will be performed
axis – Axis of the hole
radius – Radius of the hole