Part TopoShape/it: Difference between revisions
Renatorivo (talk | contribs) No edit summary |
Renatorivo (talk | contribs) (Created page with "In particolare, l'oggetto base che gestisce questi tipi di forme è la Part Feature (classe {{incode|Part::Feature}}). Tutti gli oggetti derivati da questa...") |
||
Line 16: | Line 16: | ||
TopoShape è un oggetto assegnato ad alcuni [[App_DocumentObject/it|App DocumentObjects]]. |
TopoShape è un oggetto assegnato ad alcuni [[App_DocumentObject/it|App DocumentObjects]]. |
||
In |
In particolare, l'oggetto base che gestisce questi tipi di forme è la [[Part_Feature/it|Part Feature]] (classe {{incode|Part::Feature}}). Tutti gli oggetti derivati da questa classe avranno accesso a una Part TopoShape. |
||
Some of the most important objects with Part TopoShape are the following: |
Some of the most important objects with Part TopoShape are the following: |
Revision as of 20:41, 2 June 2020
Introduzione
Una Part TopoShape, o formalmente una Part::TopoShape
, è una classe che definisce una "forma topologica" parametrica nel software. Gli oggetti del documento che mostrano qualcosa nella vista 3D normalmente hanno una TopoShape.
Le forme topologiche, così come i loro metodi, sono definiti dal kernel OpenCASCADE Technology (OCCT). FreeCAD usa queste forme e crea dei App DocumentObjects attorno ad esse.
Diagramma semplificato delle relazioni tra gli oggetti principali del programma. La classe Part::TopoShape
è incorporata nell'oggetto Part::Feature
e da lì viene propagata a tutti gli oggetti che ne derivano.
Utilizzo
TopoShape è un oggetto assegnato ad alcuni App DocumentObjects.
In particolare, l'oggetto base che gestisce questi tipi di forme è la Part Feature (classe Part::Feature
). Tutti gli oggetti derivati da questa classe avranno accesso a una Part TopoShape.
Some of the most important objects with Part TopoShape are the following:
- Any primitive solid created with the Part Workbench.
- Any PartDesign Body and PartDesign Feature created with the PartDesign Workbench.
- Any object derived from Part Part2DObject, like most objects created with the Draft Workbench.
- Any sketch, that is, Sketcher SketchObject, created with the Sketcher Workbench.
- Any object created by importing a STEP, BREP, and similar solid format files.
Scripting
See also: FreeCAD Scripting Basics, and scripted objects.
All objects derived from Part::Feature
will have a Part TopoShape, which is normally accessible from its Shape
attribute.
import FreeCAD as App
doc = App.newDocument()
obj = App.ActiveDocument.addObject("Part::Box", "Box")
print(obj.Shape)
A TopoShape has many attributes (variables) and methods that contain information about it, and which allow doing operations with it. These variables and methods can be tested in the Python console.
print(obj.Shape.Area)
print(obj.Shape.BoundBox)
print(obj.Shape.CenterOfMass)
print(obj.Shape.ShapeType)
obj.Shape.check()
obj.Shape.copy()
obj.Shape.exportStep("my_file.step")
obj.Shape.exportStl("my_file.stl")
For a full list of attributes and methods, consult the source documentation, and the Std PythonHelp tool.
- Primitives: Box, Cylinder, Sphere, Cone, Torus, Tube, Create primitives, Shape builder
- Creation and modification: Extrude, Revolve, Mirror, Fillet, Chamfer, Make face from wires, Ruled Surface, Loft, Sweep, Section, Cross sections, 3D Offset, 2D Offset, Thickness, Projection on surface, Attachment
- Boolean: Make compound, Explode Compound, Compound Filter, Boolean, Cut, Fuse, Common, Connect, Embed, Cutout, Boolean fragments, Slice apart, Slice, XOR
- Measure: Measure Linear, Measure Angular, Measure Refresh, Clear All, Toggle All, Toggle 3D, Toggle Delta
- Cuore: App DocumentObject
- Base: App FeaturePython, App GeoFeature, Part Feature, Mesh Feature, Fem FemMeshObject
- Forme interne: Part TopoShape, Mesh MeshObject, Fem FemMesh
- Struttura: App DocumentObjectGroup (Std Group), App Part (Std Part), App Link
- Derivate: Part Part2DObject, Sketcher SketchObject, PartDesign Body, PartDesign Feature
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub