47 #include "MeshRepairPlugin.hh" 58 emit log(
LOGERR,tr(
"updateFaceNormals: Unable to get object %1. ").arg(_objectId) );
66 emit createBackup( _objectId,
"Updated Face Normals",
UPDATE_ALL);
67 emit scriptInfo(
"updateFaceNormals(" + QString::number(_objectId) +
")" );
72 emit createBackup( _objectId,
"Updated Face Normals",
UPDATE_ALL);
73 emit scriptInfo(
"updateFaceNormals(" + QString::number(_objectId) +
")" );
75 emit log(
LOGERR,tr(
"updateFaceNormals: MeshRepair only works on triangle and poly meshes!") );
87 emit log(
LOGERR,tr(
"updateFaceNormals: Unable to get object %1. ").arg(_objectId) );
93 mesh->request_halfedge_normals();
96 emit createBackup( _objectId,
"Updated Face Normals",
UPDATE_ALL);
97 emit scriptInfo(
"updateFaceNormals(" + QString::number(_objectId) +
")" );
100 mesh->request_halfedge_normals();
103 emit createBackup( _objectId,
"Updated Face Normals",
UPDATE_ALL);
104 emit scriptInfo(
"updateFaceNormals(" + QString::number(_objectId) +
")" );
106 emit log(
LOGERR,tr(
"updateFaceNormals: MeshRepair only works on triangle and poly meshes!") );
119 emit log(
LOGERR,tr(
"updateVertexNormals: Unable to get object %1. ").arg(_objectId) );
127 emit createBackup( _objectId,
"Updated Vertex Normals",
UPDATE_ALL);
128 emit scriptInfo(
"updateVertexNormals(" + QString::number(_objectId) +
")" );
133 emit createBackup( _objectId,
"Updated Vertex Normals",
UPDATE_ALL);
134 emit scriptInfo(
"updateVertexNormals(" + QString::number(_objectId) +
")" );
136 emit log(
LOGERR,tr(
"updateVertexNormals: MeshRepair only works on triangle and poly meshes!") );
146 emit log(
LOGERR,tr(
"updateNormals: Unable to get object %1. ").arg(_objectId) );
153 emit scriptInfo(
"updateNormals(" + QString::number(_objectId) +
")" );
158 emit createBackup( _objectId,
"Updated All Normals",
UPDATE_ALL);
159 emit scriptInfo(
"updateNormals(" + QString::number(_objectId) +
")" );
161 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.
#define DATA_TRIANGLE_MESH
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
PolyMesh * polyMesh(BaseObjectData *_object)
Get a poly mesh from an object.
bool getObject(const int _identifier, BaseObject *&_object)
Get the object which has the given identifier.
TriMesh * triMesh(BaseObjectData *_object)
Get a triangle mesh from an object.
bool dataType(DataType _type) const
void updateVertexNormals(int _objectId)
Recomputes the vertex normals of an object.
void update_vertex_normals()
Update normal vectors for all vertices.
void update_normals()
Compute normals for all primitives.
void update_face_normals()
Update normal vectors for all faces.
void updateHalfedgeNormals(int _objectId)
Recomputes the halfedge normals of an object.
void update_halfedge_normals(const double _feature_angle=0.8)
Update normal vectors for all halfedges.
void updateFaceNormals(int _objectId)
Recomputes the face normals of an object.