From FreeCAD Documentation
Los objetos malla pueden ser manipulados añadiendo facetas, eliminando facetas, importando desde un archivo STL, transformando la malla y muchas opciones más. Para una descripción completa de lo que se puede hacer mira también la documentación del Módulo de malla. Un objeto malla no se puede añadir a un documento existente directamente. Por lo tanto el documento debe crear un objeto con clase apropiada que soporte las mallas. Por ejemplo:
m = Mesh.Mesh()
... # Manipulate the mesh
d = FreeCAD.activeDocument() # Get a reference to the actie document
f = d.addObject("Mesh::Feature", "Mesh") # Create a mesh feature
f.Mesh = m # Assign the mesh object to the internal property
d.recompute()
addFacet (
Facet )
Descripción: Adds a facet to the mesh
Devuelve:
addFacets (
list )
Descripción: Adds a list of facets to the mesh
Devuelve:
addMesh (
Mesh )
Descripción: Combines this mesh with another mesh.
Devuelve:
clear (
)
Descripción: Clears the mesh
Devuelve:
coarsen (
)
Descripción: Coarsens the mesh
Devuelve:
collapseEdge (
Edge )
Descripción: Removes an edge and both facets that share this edge
Devuelve:
collapseFacet (
Facet )
Descripción: Removes a facet
Devuelve:
collapseFacets (
list )
Descripción: Removes a list of facets
Devuelve:
copy (
)
Descripción: Creates a copy of this mesh
Devuelve: a Mesh object
countComponents (
)
Descripción: Get the number of topologic independent areas
Devuelve: an integer
countNonUniformOrientedFacets (
)
Descripción: Get the number of wrong oriented facets
Devuelve: an integer
countSegments (
)
Descripción: Get the number of segments which may also be 0
Devuelve: an integer
crossSections (
)
Descripción: Get cross-sections of the mesh through several planes
Devuelve:
difference (
Mesh )
Descripción: Difference of this and the given mesh object.
Devuelve:
fillupHoles (
)
Descripción: Fillup holes
Devuelve:
fixDeformations (
)
Descripción: Repair deformed facets
Devuelve:
fixDegenerations (
)
Descripción: Remove degenerated facets
Devuelve:
fixIndices (
)
Descripción: Repair any invalid indices
Devuelve:
fixSelfIntersections (
)
Descripción: Repair self-intersections
Devuelve:
flipNormals (
)
Descripción: Flip the mesh normals
Devuelve:
foraminate (
)
Descripción: Get a list of facet indices and intersection points
Devuelve:
getPlanes (
)
Descripción: Get all planes of the mesh as segment. In the worst case each triangle can be regarded as single plane if none of its neighours is coplanar.
Devuelve:
getSegment (
integer )
Descripción: Get a list of facet indices that describes a segment
Devuelve:
getSeparateComponents (
)
Descripción: Returns a list containing the different components (separated areas) of the mesh as separate meshes
Devuelve: a list
harmonizeNormals (
)
Descripción: Adjust wrong oriented facets
Devuelve:
hasNonManifolds (
)
Descripción: Check if the mesh has non-manifolds
Devuelve: a boolean
hasNonUniformOrientedFacets (
)
Descripción: Checks if the mesh has facets with inconsistent orientation
Devuelve:
hasSelfIntersections (
)
Descripción: Check if the mesh intersects itself
Devuelve:
inner (
)
Descripción: Get the part inside of the intersection
Devuelve:
insertVertex (
Vertex )
Descripción: Inserts a vertex into a facet
Devuelve:
intersect (
Mesh )
Descripción: Intersection of this and the given mesh object.
Devuelve:
isSolid (
)
Descripción: Check if the mesh is a solid
Devuelve:
meshFromSegment (
)
Descripción: Create a mesh from segment
Devuelve:
nearestFacetOnRay (
tuple, tuple )
Descripción: Get the index and intersection point of the nearest facet to a ray. The first parameter is a tuple of three floats the base point of the ray, the second parameter is ut uple of three floats for the direction. The result is a dictionary with an index and the intersection point or an empty dictionary if there is no intersection.
Devuelve: a dictionnary
offset (
float )
Descripción: Move the point along their normals
Devuelve:
offsetSpecial (
float )
Descripción: Move the point along their normals
Devuelve:
optimizeEdges (
)
Descripción: Optimize the edges to get nicer facets
Devuelve:
optimizeTopology (
)
Descripción: Optimize the edges to get nicer facets
Devuelve:
outer (
)
Descripción: Get the part outside the intersection
Devuelve:
printInfo (
)
Descripción: Get detailed information about the mesh
Devuelve:
read (
)
Descripción: Read in a mesh object from file.
Devuelve:
refine (
)
Descripción: Refine the mesh
Devuelve:
removeComponents (
integer )
Descripción: Remove components with less or equal to number of given facets
Devuelve:
removeDuplicatedFacets (
)
Descripción: Remove duplicated facets
Devuelve:
removeDuplicatedPoints (
)
Descripción: Remove duplicated points
Devuelve:
removeFacets (
list )
Descripción: Remove a list of facet indices from the mesh
Devuelve:
removeFoldsOnSurface (
)
Descripción: Remove folds on surfaces
Devuelve:
removeNonManifolds (
)
Descripción: Remove non-manifolds
Devuelve:
rotate (
)
Descripción: Apply a rotation to the mesh
Devuelve:
setPoint (
int, Vector )
Descripción: Sets the point at index.
Devuelve:
smooth (
)
Descripción: Smooth the mesh
Devuelve:
snapVertex (
)
Descripción: Insert a new facet at the border
Devuelve:
splitEdge (
)
Descripción: Split edge
Devuelve:
splitEdges (
)
Descripción: Split all edges
Devuelve:
splitFacet (
)
Descripción: Split facet
Devuelve:
swapEdge (
)
Descripción: Swap the common edge with the neighbour
Devuelve:
transform (
)
Descripción: Apply a transformation to the mesh
Devuelve:
transformToEigen (
)
Descripción: Transform the mesh to its eigenbase
Devuelve:
translate (
Vector )
Descripción: Apply a translation to the mesh
Devuelve:
unite (
Mesh )
Descripción: Union of this and the given mesh object.
Devuelve:
write (
string )
Descripción: Write the mesh object into file.
Devuelve:
writeInventor (
)
Descripción: Write the mesh in OpenInventor format to a string.
Devuelve: a string
Area
Devuelve: the area of the mesh object.
CountFacets
Devuelve: the number of facets of the mesh object.
CountPoints
Devuelve: the number of vertices of the mesh object.
Facets
Devuelve: A collection of facets; With this attribute it is possible to get access to the facets of the mesh: for p in mesh.Facets: print p
Points
Devuelve: A collection of the mesh points; With this attribute it is possible to get access to the points of the mesh: for p in mesh.Points: print p.x, p.y, p.z
Topology
Devuelve: the points and face indices as tuple.
Volume
Devuelve: the volume of the mesh object.
BoundBox
Devuelve: the BoundBox of the object
Matrix
Devuelve: the current transformation of the object as matrix
Placement
Devuelve: the current transformation of the object as placement
Traducciones disponibles: