54 #include "MeshRepairPlugin.hh" 65 emit log(
LOGERR,tr(
"updateFaceNormals: Unable to get object %1. ").arg(_objectId) );
73 emit createBackup( _objectId,
"Updated Face Normals",
UPDATE_ALL);
74 emit scriptInfo(
"updateFaceNormals(" + QString::number(_objectId) +
")" );
79 emit createBackup( _objectId,
"Updated Face Normals",
UPDATE_ALL);
80 emit scriptInfo(
"updateFaceNormals(" + QString::number(_objectId) +
")" );
82 emit log(
LOGERR,tr(
"updateFaceNormals: MeshRepair only works on triangle and poly meshes!") );
94 emit log(
LOGERR,tr(
"updateFaceNormals: Unable to get object %1. ").arg(_objectId) );
100 mesh->request_halfedge_normals();
103 emit createBackup( _objectId,
"Updated Face Normals",
UPDATE_ALL);
104 emit scriptInfo(
"updateFaceNormals(" + QString::number(_objectId) +
")" );
107 mesh->request_halfedge_normals();
110 emit createBackup( _objectId,
"Updated Face Normals",
UPDATE_ALL);
111 emit scriptInfo(
"updateFaceNormals(" + QString::number(_objectId) +
")" );
113 emit log(
LOGERR,tr(
"updateFaceNormals: MeshRepair only works on triangle and poly meshes!") );
126 emit log(
LOGERR,tr(
"updateVertexNormals: Unable to get object %1. ").arg(_objectId) );
134 emit createBackup( _objectId,
"Updated Vertex Normals",
UPDATE_ALL);
135 emit scriptInfo(
"updateVertexNormals(" + QString::number(_objectId) +
")" );
140 emit createBackup( _objectId,
"Updated Vertex Normals",
UPDATE_ALL);
141 emit scriptInfo(
"updateVertexNormals(" + QString::number(_objectId) +
")" );
143 emit log(
LOGERR,tr(
"updateVertexNormals: MeshRepair only works on triangle and poly meshes!") );
153 emit log(
LOGERR,tr(
"updateNormals: Unable to get object %1. ").arg(_objectId) );
160 emit scriptInfo(
"updateNormals(" + QString::number(_objectId) +
")" );
165 emit createBackup( _objectId,
"Updated All Normals",
UPDATE_ALL);
166 emit scriptInfo(
"updateNormals(" + QString::number(_objectId) +
")" );
168 emit log(
LOGERR,tr(
"updateNormals: MeshRepair only works on triangle and poly meshes!") );
void updateFaceNormals(int _objectId)
Recomputes the face normals of an object.
void update_normals()
Compute normals for all primitives.
bool getObject(int _identifier, BSplineCurveObject *&_object)
PolyMesh * polyMesh(BaseObjectData *_object)
Get a poly mesh from an object.
bool dataType(DataType _type) const
void update_halfedge_normals(const double _feature_angle=0.8)
Update normal vectors for all halfedges.
void updateHalfedgeNormals(int _objectId)
Recomputes the halfedge normals of an object.
void updateNormals(int _objectId)
Recomputes the face and vertex normals of an object.
void updateVertexNormals(int _objectId)
Recomputes the vertex normals of an object.
void update_face_normals()
Update normal vectors for all faces.
void update_vertex_normals()
Update normal vectors for all vertices.
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
#define DATA_TRIANGLE_MESH
TriMesh * triMesh(BaseObjectData *_object)
Get a triangle mesh from an object.