MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.Laplacian Class Reference

Classes

class  EdgeWeights
 
class  RememberShape
 

Public Member Functions

None __init__ (self, Mesh mesh)
 
None apply (self)
 
None applyToScalar (self, VertScalars scalarField)
 
VertBitSet firstLayerFixedVerts (self)
 
None fixVertex (self, VertId v, bool smooth=True)
 
None fixVertex (self, VertId v, Vector3f fixedPos, bool smooth=True)
 
VertBitSet freeVerts (self)
 
None init (self, VertBitSet freeVerts, EdgeWeights weights, Laplacian.RememberShape rem='Laplacian::RememberShape::Yes')
 
VertBitSet region (self)
 
None updateSolver (self)
 

Static Protected Member Functions

 _pybind11_conduit_v1_ (*args, **kwargs)
 

Detailed Description

Generated from:  MR::Laplacian

Laplacian to smoothly deform a region preserving mesh fine details.
How to use:
1. Initialize Laplacian for the region being deformed, here region properties are remembered.
2. Change positions of some vertices within the region and call fixVertex for them.
3. Optionally call updateSolver()
4. Call apply() to change the remaining vertices within the region
Then steps 1-4 or 2-4 can be repeated.

Constructor & Destructor Documentation

◆ __init__()

None mrmeshpy.Laplacian.__init__ ( self,
Mesh mesh )

Member Function Documentation

◆ _pybind11_conduit_v1_()

mrmeshpy.Laplacian._pybind11_conduit_v1_ ( * args,
** kwargs )
staticprotected

◆ apply()

None mrmeshpy.Laplacian.apply ( self)
given fixed vertices, computes positions of remaining region vertices

◆ applyToScalar()

None mrmeshpy.Laplacian.applyToScalar ( self,
VertScalars scalarField )
given a pre-resized scalar field with set values in fixed vertices, computes the values in free vertices

◆ firstLayerFixedVerts()

VertBitSet mrmeshpy.Laplacian.firstLayerFixedVerts ( self)
return fixed vertices from the first layer around free vertices

◆ fixVertex() [1/2]

None mrmeshpy.Laplacian.fixVertex ( self,
VertId v,
bool smooth = True )
notify Laplacian that given vertex has changed after init and must be fixed during apply;
\\param smooth whether to make the surface smooth in this vertex (sharp otherwise)

◆ fixVertex() [2/2]

None mrmeshpy.Laplacian.fixVertex ( self,
VertId v,
Vector3f fixedPos,
bool smooth = True )
sets position of given vertex after init and it must be fixed during apply (THIS METHOD CHANGES THE MESH);
\\param smooth whether to make the surface smooth in this vertex (sharp otherwise)

◆ freeVerts()

VertBitSet mrmeshpy.Laplacian.freeVerts ( self)
return currently free vertices

◆ init()

None mrmeshpy.Laplacian.init ( self,
VertBitSet freeVerts,
EdgeWeights weights,
Laplacian.RememberShape rem = 'Laplacian::RememberShape::Yes' )
initialize Laplacian for the region being deformed, here region properties are remembered and precomputed;
\\param freeVerts must not include all vertices of a mesh connected component

◆ region()

VertBitSet mrmeshpy.Laplacian.region ( self)
return all initially free vertices and the first layer of vertices around them

◆ updateSolver()

None mrmeshpy.Laplacian.updateSolver ( self)
if you manually call this method after initialization and fixing vertices then next apply call will be much faster

The documentation for this class was generated from the following file: