Skip to content
Simon Dietz edited this page Nov 19, 2024 · 22 revisions
  • The ScaleModifier has the potential for parallelism.
  • The ScaleModifier does not need to scale if scale = 1
  • Provide seed for the NoiseModifier -> testing
  • The TranslateModifier does not need to translate if deltaX == deltaY == deltaZ == 0

Refactoring Plan: Mesh3D Class

  • Goal To improve the extensibility, maintainability, and testability of the Mesh3D class by applying the Open-Closed Principle.

  • Approach Identify Modification Operations: Identify all operations that modify the mesh, such as rotation, scaling, translation, smoothing, subdivision, etc.

  • Refactor Existing Operations: Convert existing modification methods (e.g., rotateX, scale) into MeshModifier classes. Remove these methods from the Mesh3D class.

Modifiers

  • BendModifier
  • BevelEdgesModifier
  • BevelFacesModifier
  • BevelVerticesModifier
  • CenterAtModifier
  • CrocodileModifier
  • ExtrudeModifier
  • FitToAABBModifier
  • FlipFacesModifier
  • HolesModifier
  • InsetModifier
  • NoiseModifier
  • PushPullModifier
  • RemoveDoubleVerticesModifier (Needs rework)
  • RotateXModifier
  • RotateYModifier
  • RotateZModifier
  • ScaleModifier
  • SmoothModifier
  • SolidifyModifier
  • SpherifyModifier
  • TranslateModifier
  • WireframeModifier

Subdivision Modifiers

  • CatmullClarkModifier
  • DooSabinModifier
  • LinearSubdivisionModifier
  • PlanarMidEdgeCenterModifier
  • PlanarMidEdgeModifier
  • PlanarVertexCenterModifier
  • PlanarVertexMidEdgeCenterModifier
  • PokeFacesModifier
  • QuadsToTrianglesModifier

Mesh Modifier Descriptions

Basic Modifiers

  • BendModifier: Bends the mesh along a specified axis.
  • BevelEdgesModifier: Creates a bevel along the edges of the mesh.
  • BevelFacesModifier: Creates a bevel around the faces of the mesh.
  • BevelVerticesModifier: Creates a bevel around the vertices of the mesh.
  • CenterAtModifier: Centers the mesh at a specific point.
  • CrocodileModifier:
  • ExtrudeModifier: Extrudes the faces of the mesh along their normals.
  • FitToAABBModifier: Scales and /translates???/ the mesh to fit within an axis-aligned bounding box.
  • FlipFacesModifier: Flips the orientation of the faces of the mesh.
  • HolesModifier: Creates holes in the mesh.
  • InsetModifier: Insets the faces of the mesh inward.
  • NoiseModifier: Adds noise to the vertex positions of the mesh. Normals!
  • PushPullModifier: Pushes or pulls the faces of the mesh along their normals.
  • RemoveDoubleVerticesModifier: Removes duplicate vertices from the mesh.
  • RotateXModifier: Rotates the mesh around the X-axis.
  • RotateYModifier: Rotates the mesh around the Y-axis.
  • RotateZModifier: Rotates the mesh around the Z-axis.
  • ScaleModifier: Scales the mesh uniformly or non-uniformly.
  • SmoothModifier: Smoothes the mesh by averaging vertex positions. ???
  • SolidifyModifier: Adds thickness to the faces of the mesh.
  • SpherifyModifier: Spherifies the mesh.
  • TranslateModifier: Translates the mesh.
  • WireframeModifier: Converts the mesh to a wireframe representation. ???

Subdivision Modifiers

  • CatmullClarkModifier: Subdivides the mesh using the Catmull-Clark subdivision scheme.
  • DooSabinModifier: Subdivides the mesh using the Doo-Sabin subdivision scheme.
  • LinearSubdivisionModifier: Subdivides the mesh using a linear subdivision scheme.
  • PlanarMidEdgeCenterModifier: Subdivides the mesh by splitting edges and connecting their midpoints.
  • PlanarMidEdgeModifier: Subdivides the mesh by splitting edges and connecting their midpoints to the face centroids.
  • PlanarVertexCenterModifier: Subdivides the mesh by connecting vertices to face centroids.
  • PlanarVertexMidEdgeCenterModifier: Subdivides the mesh by connecting vertices, edge midpoints, and face centroids.
  • PokeFacesModifier: Adds a vertex to the center of each face.
  • QuadsToTrianglesModifier: Converts quad faces to triangles.
Clone this wiki locally