Patterns

class Pattern

Base class for patterns.

Subclassed by formo::CircularPattern, formo::HexagonalPattern, formo::LinearPattern

Public Functions

const std::vector<Point> &points() const

Return the point generated by the pattern.

Returns:

The point generated by the pattern

class CircularPattern : public formo::Pattern

Circular pattern.

Public Functions

CircularPattern(const Axis2 &center, double radius, int divisions, double start_angle = 0.)

Create circular pattern over full circle.

Parameters:
  • center – Center of the pattern

  • radius – Radius of the pattern

  • divisions – Number of segments around the circle

double radius() const

Get radius.

class HexagonalPattern : public formo::Pattern

Hexagonal pattern.

Public Functions

double flat_to_flat() const

Get flat to flat distance.

class LinearPattern : public formo::Pattern

Linear pattern.

Public Functions

double nx() const

Number of points in x-direction.

double ny() const

Number of points in y-direction.

double dx() const

Distance between 2 points in x-direction.

double dy() const

Distance between 2 points in y-direction.