BrepCurve
The BrepCurve class represents a curve within a brep structure, used to define boundaries or edges of a face in 3D geometry. It supports different types of curves such as outer, inner, which are essential for defining the perimeter or constraints of a face in a brep model.
#include <format/TellusimBrep.h>
Constructors
explicit BrepCurve(Type type = TypeUnknown)
explicit BrepCurve(Type type, BrepFace &face)
Methods
Clear curve.
void clear()
Curve type.
void setType(Type type)
Type getType() const
static const char *getTypeName(Type type)
const char *getTypeName() const
bool isUnknown() const
bool isOuter() const
bool isInner() const
bool isWrap() const
bool isBoundary() const
Curve face.
void setFace(BrepFace &face)
const BrepFace getFace() const
BrepFace getFace()
Curve vertices.
void clearVertices()
void setNumVertices(uint32_t num_vertices)
void reserveVertices(uint32_t num_vertices)
uint32_t getNumVertices() const
void setVertices(const Vector2d *vertices, uint32_t num_vertices)
const Vector2d *getVertices() const
Vector2d *getVertices()
void setVertex(uint32_t index, Vector2d vertex)
const Vector2d getVertex(uint32_t index) const
Vector2d getVertex(uint32_t index)
uint32_t addVertex(Vector2d vertex)
uint32_t addVertices(Vector2d v0, Vector2d v1)
uint32_t addVertices(Vector2d v0, Vector2d v1, Vector2d v2)
uint32_t addVertices(Vector2d v0, Vector2d v1, Vector2d v2, Vector2d v3)
Line indices.
void clearLineIndices()
void setNumLineIndices(uint32_t num_indices)
void reserveLineIndices(uint32_t num_indices)
uint32_t getNumLineIndices() const
bool hasLineIndices() const
void setLineIndices(const uint32_t *indices, uint32_t num_indices)
const uint32_t *getLineIndices() const
uint32_t *getLineIndices()
void setLineIndex(uint32_t index, uint32_t value)
uint32_t getLineIndex(uint32_t index) const
void addLineIndices(uint32_t i0, uint32_t i1)
void addLineVertices(Vector2d v0, Vector2d v1, float64_t epsilon = 1e-8)
void addLineSegment(Vector2d v0, Vector2d v1, float64_t x0, float64_t x1, float64_t epsilon = 1e-8)
const Vector2d getLineVertex(uint32_t index) const
Quadratic indices.
void clearQuadraticIndices()
void setNumQuadraticIndices(uint32_t num_indices)
void reserveQuadraticIndices(uint32_t num_indices)
uint32_t getNumQuadraticIndices() const
bool hasQuadraticIndices() const
void setQuadraticIndices(const uint32_t *indices, uint32_t num_indices)
const uint32_t *getQuadraticIndices() const
uint32_t *getQuadraticIndices()
void setQuadraticIndex(uint32_t index, uint32_t value)
uint32_t getQuadraticIndex(uint32_t index) const
void addQuadraticIndices(uint32_t i0, uint32_t i1, uint32_t i2)
void addQuadraticVertices(Vector2d v0, Vector2d v1, Vector2d v2, float64_t epsilon = 1e-8)
void addQuadraticSegment(Vector2d v0, Vector2d v1, Vector2d v2, float64_t x0, float64_t x1, float64_t epsilon = 1e-8)
const Vector2d getQuadraticVertex(uint32_t index) const
Cubic indices.
void clearCubicIndices()
void setNumCubicIndices(uint32_t num_indices)
void reserveCubicIndices(uint32_t num_indices)
uint32_t getNumCubicIndices() const
bool hasCubicIndices() const
void setCubicIndices(const uint32_t *indices, uint32_t num_indices)
const uint32_t *getCubicIndices() const
uint32_t *getCubicIndices()
void setCubicIndex(uint32_t index, uint32_t value)
uint32_t getCubicIndex(uint32_t index) const
void addCubicIndices(uint32_t i0, uint32_t i1, uint32_t i2, uint32_t i3)
void addCubicVertices(Vector2d v0, Vector2d v1, Vector2d v2, Vector2d v3, float64_t epsilon = 1e-8)
void addCubicSegment(Vector2d v0, Vector2d v1, Vector2d v2, Vector2d v3, float64_t x0, float64_t x1, float64_t epsilon = 1e-8)
const Vector2d getCubicVertex(uint32_t index) const
Curve transform.
void setTransform(Vector2d scale)
void setTransform(Matrix3x2d transform)
Trim curve vertices.
void trimCurve(Vector2d wrap_min, Vector2d wrap_max, float64_t border = 1e-3, float64_t epsilon = 1e-6)
Wrap curve vertices.
void wrapVertices(Vector2d wrap, float64_t epsilon = 1e-6)
Optimize vertices.
void optimizeVertices(float64_t epsilon = 1e-6)
Signed curve area.
float64_t getArea() const
Compare curves.
int32_t compare(const BrepCurve &curve, float64_t threshold = 1e-6) const
Curve bound rect.
BoundRectd getBoundRect() const
Curve bound circle.
BoundCircled getBoundCircle() const
Memory usage.
size_t getMemory() const