MeshSolver
- class compas_shapeop.meshsolver.MeshSolver(mesh)
Bases:
SolverCreate a solver from a COMPAS mesh.
This is a convenience method that allows you to initialize a solver directly from a COMPAS mesh.
- Attributes:
- mesh
compas.datastructures.Mesh A COMPAS mesh.
- pointsnumpy.ndarray
Direct reference to the solver’s points matrix in shape (n, 3).
- mesh
Methods
Add gravity to the mesh.
Add edge length constraints to all edges of a COMPAS mesh.
Add diagonal constraints to quads to prevent shearing.
Add plane constraints to all faces of a COMPAS mesh.
Add equalize face constraints to all faces of a COMPAS mesh.
Add bending constraints to all pairs of adjacent triangular faces in a COMPAS mesh.
Add closeness constraints to all vertices of a COMPAS mesh to the boundary edges.
Add closeness constraints to vertices of a COMPAS mesh.
Create a MeshSolver from a rectangular grid mesh.
Create a MeshSolver from an OBJ file.
Add inflation force to the mesh.
Solve the constraint problem.
Inherited Methods
Add a bending constraint between two neighboring triangles.
Add circle constraint to make vertices lie on a circle.
Add a closeness constraint to the solver.
Add a closeness constraint at a specific xyz coordinate.
Add closeness constraints to multiple vertices.
Add an edge strain constraint between two specific vertices.
Add a gravity force to all vertices in the system.
Add vertex forces to all vertices of a COMPAS mesh.
Add a normal force (inflation) using custom face topology.
Add a plane constraint to the solver.
Add constraint to make vertices form a regular polygon.
Add a unified shape constraint with different shape types.
Add a shrinking edge constraint to the solver.
Add similarity constraint to transform vertices to match a target shape.
Add a vertex force to a specific point.
Initialize the solver with simulation parameters.