Part Forme à partir d'un maillage

From FreeCAD Documentation
Revision as of 14:39, 19 September 2020 by David69 (talk | contribs) (Created page with "== Introduction ==")

Part Forme à partir du maillage

Emplacement du menu
Pièce → Créer la forme à partir d'un maillage...
Ateliers
Pièce
Raccourci par défaut
Aucun
Introduit dans la version
-
Voir aussi
Part Convertir en solide, Part Affiner la forme, Part Points à partir de maillage

Introduction

Introduction

Cette commande Part Forme à partir du maillage crée une forme à partir d'un Maillage. FreeCAD offre des possibilités d’édition limitées des maillages; les convertir en formes permettra leur usage par beaucoup plus d'outils de FreeCAD (Voir aussi Remarques) .

Usage

Utilisation

  1. Sélectionnez l'objet maillé.
  2. Choisissez Pièce → Créer une forme à partir d'un maillage ... dans le menu supérieur.
  3. Un menu contextuel demandera la tolérance pour la forme de couture (valeur par défaut: 0,1)
  4. Une forme de l'objet maillé est créée en tant que nouvel objet séparé.

Limitations

Il n'y aura ni analyse ni validation du maillage.

After creation of a Shape, it may be useful to use Convert to solid (necessary for boolean operations) and Refine shape.

Links

Script

Creating a Shape from a Mesh can be done by using the makeShapeFromMesh method from a Part TopoShape; you need to specify the source mesh and tolerance, and assign the result to a new Part Feature object.

Notice that the mesh must be recalculated before it is converted to a Shape, otherwise there won't be topology information, and the conversion won't be successful.

import FreeCAD as App
import Part

doc = App.newDocument()
mesh = doc.addObject("Mesh::Cube", "Mesh")
mesh.recompute()

solid = doc.addObject("Part::Feature", "Shape")
shape = Part.Shape()
shape.makeShapeFromMesh(mesh.Mesh.Topology, 0.1)

solid.Shape = shape
solid.Placement.Base = App.Vector(15, 0, 0)
solid.purgeTouched()
doc.recompute()