Il Drawing Exchange Format (DXF) è un formato di dati CAD proprietario sviluppato da Autodesk per consentire lo scambio di file tra il prodotto di punta AutoCAD e altri software. Esistono numerose buone librerie software per leggere/scrivere il formato DXF.
Esistono molte versioni del formato DXF. Si sentirà parlare di alcune versioni chiave, come R12 (del 1992) o R14 (del 1997 che aveva le spline). Le versioni successive di DXF hanno elementi 3D, ma questi vengono utilizzati o implementati raramente. Il modo in cui si utilizza DXF per condividere i dati CAD tra programmi dipende principalmente dalle limitazioni e dai bug nei corrispondenti lettori/importatori e scrittori/esportatori. Questi raramente sono completamente documentati e possono essere una grande fonte di frustrazione.
Se si sta modificando dei file DXF e si desidera che rimangano quasi gli stessi quando vengono salvati, consigliamo di utilizzare LibreCAD o /wiki/QCad QCad perché le strutture dati interne di questi programmi sono compatibili con gli oggetti nel file DXF.
In FreeCAD i lettori DXF devono tradurre la geometria (ad esempio una forma spline) dal file DXF nelle specifiche rappresentazioni interne dell'ambiente di lavoro.
Se avete intenzione di rivedere le impostazioni frequentemente, vi consigliamo di andare su Modifica → Preferenze → Import-Export → DXF e spuntare la casella "[] Mostra questa finestra di dialogo durante l'importazione e l'esportazione".
Maggiori informazioni si trovano sulle pagine Draft - File DXF e Importare i file DXF in FreeCAD.
Se state utilizzando la geometria importata per creare forme 3D in Part Design, provate a Convalidare lo schizzo dopo aver importato il DXF in uno schizzo.
Questa implementazione è un'implementazione veloce, ma ignora le funzioni che non riconosce, come le spline DXF. Inoltre, può importare la geometria in Draft solo come singole voci nell'albero del modello. Le geometrie possono avere i colori letti dal file se si attiva questa opzione. Per ulteriori informazioni, vedere questo post nel forum.
Questo importatore deve essere scaricato e installato prima di poter essere utilizzato. Usare l'opzione "[] Consenti a FreeCAD di scaricare e aggiornare automaticamente le librerie DXF".
Questo importatore ha più funzioni (come l'implementazione delle spline) e ha la possibilità di caricare le forme DXF nell'Ambiente Sketcher. Tuttavia, tenere presente che tutti gli elementi dello schizzo vengono visualizzati singolarmente una seconda volta nell'albero del modello, il che può creare confusione. È possibile eliminare tutti questi singoli oggetti e conservare il singolo schizzo (che appare come la seconda voce nell'elenco di nuovi elementi).
Sfortunatamente, l'Ambiente Sketcher non implementa i colori, quindi tutta la geometria appare sullo stesso livello, il che è un problema se il file contiene molte linee di costruzione. Una soluzione consiste nell'aprire il disegno in LibreCAD ed eliminare tutte le geometrie che non si desidera visualizzare prima di salvare un file che contiene esattamente la geometria che si desidera caricare.
Dare uno sguardo al forum di FreeCAD o alla Raccolta di macro per implementazioni alternative dell'importazione e della pulizia dei DXF man mano che si sviluppano.
Oltre alle opzioni di Modifica → Preferenze, l'ambiente TechDraw può anche esportare le pagine di disegno in DXF usando la funzione Esporta pagina in DXF.
When discussing DXF files, several terms are used to describe blocks that are generated automatically by the CAD software rather than by the user.
*
). It is the overarching term.Essentially, "anonymous block" is the technical name, "system block" describes its function, and "hidden block" describes its typical user interface behavior. For practical purposes in the context of the FreeCAD DXF importer, they all refer to the same category of blocks.
Anonymous blocks are further categorized based on the character that follows the initial asterisk. This prefix indicates the block's specific purpose. The most common classes are:
*D...
(Dimensions): A block representing the graphical components of a dimension entity (lines, arrowheads, etc.).*X...
(Hatches): A block representing the geometry that makes up a hatch pattern.*P...
(Paper Space Layouts): A block that contains all the entities that exist on a specific paper space layout. The main model is typically in a block named *Model_Space
, and individual layouts are named *Paper_Space
, *Paper_Space0
, *Paper_Space1
, and so on.*U...
(Dynamic Blocks): These are complex blocks used for AutoCAD's dynamic block functionality.*E...
, *T...
, etc.: Other prefixes exist for specialized objects like associative arrowheads and tables.A BLOCK
is a named collection of geometric entities (lines, arcs, polylines, etc.) that are grouped together to form a single object definition. It can be thought of as a template.
A BLOCK
:
BLOCK
definition is stored in a library-like section of the DXF file (the BLOCKS
section). The geometry within the block does not appear in the final drawing until an instance of it is created.An INSERT
entity is what places a copy, or instance, of a BLOCK
's geometry into the drawing's model space or paper space. It is a very lightweight entity because it does not contain the geometry itself; it only contains a reference to a BLOCK
definition and instructions on how to place and transform it.
An INSERT
:
BLOCK
definition to use (e.g., "I am an instance of block 'CHAIR-01'").A DXF file separates the definition of a component from its placement.
BLOCK
is the template or blueprint. It contains the geometry that makes up a component, like a chair or a window. These definitions are stored in the BLOCKS
section of the file and are not directly visible in the final drawing.INSERT
is the instruction to place a BLOCK
into the drawing at a specific position, orientation, and scale. These are the visible instances of the block and are found in the ENTITIES
section.There are two primary workflows for using blocks and inserts:
BLOCK
definition is created, and multiple INSERT
entities are used to place instances of it throughout the drawing. This is an efficient method for handling repetitive elements. For instance, the geometry for a chair is defined once in a BLOCK
and then referenced many times by INSERT
entities.BLOCK
is created from existing geometry simply to group those objects together as a single, selectable unit. In this case, the BLOCK
definition is used by a single INSERT
entity only.The DXF importer must be able to distinguish between these two use cases to correctly represent the original drawing's intent, either by creating many linked instances to a single base object (template model) or by creating a single, visible object (grouped object model).