54 #include "MeshRepairPlugin.hh"
65 emit log(
LOGERR,tr(
"updateFaceNormals: Unable to get object %1. ").arg(_objectId) );
71 mesh->update_face_normals();
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();
101 mesh->update_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) );
132 mesh->update_vertex_normals();
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) );
159 mesh->update_normals();
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 updateNormals(int _objectId)
Recomputes the face and vertex normals of an object.
void updateVertexNormals(int _objectId)
Recomputes the vertex normals of an object.
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
bool getObject(int _identifier, BSplineCurveObject *&_object)
PolyMesh * polyMesh(BaseObjectData *_object)
Get a poly mesh from an object.
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.
bool dataType(DataType _type) const
TriMesh * triMesh(BaseObjectData *_object)
Get a triangle mesh from an object.
void update_vertex_normals()
Update normal vectors for all vertices.
void update_face_normals()
Update normal vectors for all faces.
void updateFaceNormals(int _objectId)
Recomputes the face normals of an object.
void update_normals()
Compute normals for all primitives.
#define DATA_TRIANGLE_MESH