BrepNode
The BrepNode class represents a single node in a 3D brep hierarchy, serving as a container for geometries, attachments, transformation data, and hierarchical relationships. It supports parent-child connections, allowing for the creation of complex scene graph structures. Each node can be associated with a brep, named for identification, and optionally contain geometries.
#include <format/TellusimBrep.h>
Constructors
explicit BrepNode(const char *name = nullptr)
explicit BrepNode(Brep &brep, const char *name = nullptr)
explicit BrepNode(BrepNode *parent, const char *name = nullptr)
explicit BrepNode(Brep &brep, BrepNode *parent, const char *name = nullptr)
Methods
Clear node.
void clear()
Clone node.
BrepNode clone(Brep &brep) const
Node name.
void setName(const char *name)
String getName() const
Node index.
uint32_t getIndex() const
Node brep.
void setBrep(Brep &brep, bool check = true)
const Brep getBrep() const
Brep getBrep()
Node parent.
uint32_t setParent(BrepNode &parent, bool check = true)
const BrepNode getParent() const
BrepNode getParent()
bool isRoot() const
Node children.
void reserveChildren(uint32_t num_children)
uint32_t addChild(BrepNode &child, bool check = true)
bool removeChild(BrepNode &child)
void releaseChildren()
uint32_t findChild(const BrepNode &child) const
uint32_t findChild(const char *name) const
uint32_t getNumChildren() const
const Array<BrepNode> getChildren() const
Array<BrepNode> getChildren()
const BrepNode getChild(uint32_t index) const
const BrepNode getChild(const char *name) const
BrepNode getChild(uint32_t index)
BrepNode getChild(const char *name)
Node geometries.
void clearGeometries()
void reserveGeometries(uint32_t num_geometries)
uint32_t addGeometry(BrepGeometry &geometry, bool check = true)
bool removeGeometry(BrepGeometry &geometry)
bool replaceGeometry(BrepGeometry &old_geometry, BrepGeometry &geometry)
uint32_t findGeometry(const BrepGeometry &geometry) const
uint32_t getNumGeometries() const
const Array<BrepGeometry> getGeometries() const
Array<BrepGeometry> getGeometries()
const BrepGeometry getGeometry(uint32_t index) const
BrepGeometry getGeometry(uint32_t index)
Node attachments.
void clearAttachments()
void reserveAttachments(uint32_t num_attachments)
uint32_t addAttachment(BrepAttachment &attachment, bool check = true)
bool removeAttachment(BrepAttachment &attachment)
bool replaceAttachment(BrepAttachment &old_attachment, BrepAttachment &attachment)
uint32_t findAttachment(const BrepAttachment &attachment) const
uint32_t findAttachment(const char *name) const
uint32_t getNumAttachments() const
const Array<BrepAttachment> getAttachments() const
Array<BrepAttachment> getAttachments()
const BrepAttachment getAttachment(uint32_t index) const
BrepAttachment getAttachment(uint32_t index)
Local transform.
void setLocalTransform(Matrix4x3d transform)
const Matrix4x3d getLocalTransform() const
Global transform.
void setGlobalTransform(Matrix4x3d transform)
const Matrix4x3d getGlobalTransform() const
Pivot transform.
void setPivotTransform(Matrix4x3d transform)
const Matrix4x3d getPivotTransform() const
Create transforms.
void createLocalTransforms(Matrix4x3d itransform = Matrix4x3d::identity)
void createGlobalTransforms(Matrix4x3d transform = Matrix4x3d::identity)
Apply transform.
void setTransform(float64_t scale)
Memory usage.
size_t getMemory() const