File Format FCStd/it: Difference between revisions

From FreeCAD Documentation
(Created page with "*'''Document.xml''' : contiene tutte le informazioni relative agli oggetti che compongono il progetto. **Esempio con '''Text004'''")
(Created page with "* Così come le altre definizioni anche quelle contenenti '''file=''' sono collegate a un file e quando, ad esempio, si modifica '''DiffuseColor''' in '''<ColorList file="Diff...")
Line 179: Line 179:
. . . .
. . . .
</syntaxhighlight>
</syntaxhighlight>
* as well as other definitions containers '''file=''' relate has a file and if you change example "'''DiffuseColor'''" in '''<ColorList file="DiffuseColor"/>''' You must also change the name of the file for correspondence.
* Così come le altre definizioni anche quelle contenenti '''file=''' sono collegate a un file e quando, ad esempio, si modifica '''DiffuseColor''' in '''<ColorList file="DiffuseColor"/>''' è necessario modificare anche il nome del file corrispondente.
* Once the Word change is identified, '''search''' (your Word) and '''Replace by''' (your new word) and click on {{KEY|Replace in all open documents}} and your change will be the same in both files '''GuiDocument.xml''' and '''Document.xml'''.
* Individuare il termine da modificare, eseguire '''Ricerca''' (il termine da modificare) poi '''Sostituire con '''(il nuovo termine) e infine cliccare su {{KEY|Sostituire in tutti i documenti aperti}}. La modifica viene apportata in entrambi i file, sia in '''GuiDocument.xml''' che in '''Document.xml'''.
* When changes are complete, return to the tool '''Menu > Tools > Project utility... Create project'''
* Dopo aver completato le modifiche, tornare a '''Menu > Strumenti > Utilità di Progetto... Crea progetto'''
* Source : Give the path of the file that you just changed and that is to restore.
* Fonte : Fornire il percorso per il file modificato, e che è quello da ripristinare.
* Destination : Give the path of the FCStd file to restore.
* Destinazione : Fornire il percorso per il file FCStd da ripristinare.
* Click {{KEY|...}} In the new window click on {{KEY|Create a new folder}} (to avoid errors by rewriting the file) and you post. Click on {{KEY|Create}} you can check the "Load project file after creation".
* Fare clic su {{KEY|...}} e nella nuova finestra fare clic su {{KEY|Crea una nuova cartella}} per evitare di sovrascrivere i file. Cliccare su {{KEY|Crea}} e eventualmente attivare "Carica il file di progetto dopo la creazione".
* Se la casella "Carica il file di progetto dopo la creazione " è selezionata, il progetto viene automaticamente caricato in FreeCAD.
* If you have checked "Load project file after creation" your project will load in FreeCAD.
* '''PS :''' It is imperative that it have concordance GuiDocument.xml, Document.xml documents and files without which there will be errors in your .FCStd file. To do this should always work on a copy of your project.
* '''PS:''' è imperativo che ci sia concordanza tra i documenti GuiDocument.xml, Document.xml e i file altrimenti il file .FCStd contiene degli errori. Per questo motivo si deve sempre lavorare su una copia del progetto.


==Other==
==Other==

Revision as of 21:14, 2 March 2014

Un progetto di FreeCAD è in realtà un normale file zip che contiene sempre un file Document.xml più eventuali altri file di dati, un GuiDocument.xml e una miniatura in formato PNG, PartShape3.brp Points3 . . .

La struttura di Document.xml

 <?xml version='1.0' encoding='utf-8'?>
 <!--
 FreeCAD Document, see http://free-cad.sourceforge.net for more informations...
 -->
 <Document SchemaVersion="4">
    <Properties Count="9">
       <Property name="Comment" type="App::PropertyString">
          <String value=""/>
       </Property>
       <Property name="Company" type="App::PropertyString">
          <String value=""/>
       </Property>
       <Property name="CreatedBy" type="App::PropertyString">
          <String value=""/>
       </Property>
       <Property name="CreationDate" type="App::PropertyString">
          <String value="Fri Jan 29 15:14:38 2010 "/>
       </Property>
       <Property name="FileName" type="App::PropertyString">
          <String value="/tmp/test.FCStd"/>
       </Property>
       <Property name="Id" type="App::PropertyString">
          <String value="201b746f-a1ed-4297-bf3d-65d5ec11abe0"/>
       </Property>
       <Property name="Label" type="App::PropertyString">
          <String value="names"/>
       </Property>
       <Property name="LastModifiedBy" type="App::PropertyString">
          <String value=""/>
       </Property>
       <Property name="LastModifiedDate" type="App::PropertyString">
          <String value="Fri Jan 29 15:15:21 2010 "/>
       </Property>
    </Properties>
    <Objects Count="2">
       <Object type="Mesh::Cube" name="Cube" />
       <Object type="Part::Box" name="Box" />
    </Objects>
    <ObjectData Count="2">
       <Object name="Cube">
          <Properties Count="7">
             <Property name="Height" type="App::PropertyFloatConstraint">
                <Float value="10"/>
             </Property>
             <Property name="Label" type="App::PropertyString">
                <String value="Cube"/>
             </Property>
             <Property name="Length" type="App::PropertyFloatConstraint">
                <Float value="10"/>
             </Property>
             <Property name="Mesh" type="Mesh::PropertyMeshKernel">
                <Mesh file="MeshKernel.bms"/>
             </Property>
             <Property name="Placement" type="App::PropertyPlacement">
                <PropertyPlacement Px="0" Py="0" Pz="0" Q0="0" Q1="0" Q2="0" Q3="1"/>
             </Property>
             <Property name="Pos" type="App::PropertyPlacementLink">
                <Link value=""/>
             </Property>
             <Property name="Width" type="App::PropertyFloatConstraint">
                <Float value="10"/>
             </Property>
          </Properties>
       </Object>
       <Object name="Box">
          <Properties Count="7">
             <Property name="Height" type="App::PropertyLength">
                <Float value="10"/>
             </Property>
             <Property name="Label" type="App::PropertyString">
                <String value="Box2"/>
             </Property>
             <Property name="Length" type="App::PropertyLength">
                <Float value="10"/>
             </Property>
             <Property name="Placement" type="App::PropertyPlacement">
                <PropertyPlacement Px="0" Py="0" Pz="0" Q0="0" Q1="0" Q2="0" Q3="1"/>
             </Property>
             <Property name="Pos" type="App::PropertyPlacementLink">
                <Link value=""/>
             </Property>
             <Property name="Shape" type="Part::PropertyPartShape">
                <Part file="PartShape.brp2"/>
             </Property>
             <Property name="Width" type="App::PropertyLength">
                <Float value="10"/>
             </Property>
          </Properties>
       </Object>
    </ObjectData>
 </Document>

Modificare il file .FCStd

ATTENZIONE LAVORARE SEMPRE SU UNA COPIA DEL PROGETTO !

È possibile modificare un file originale .FCStd, ma la procedura non è senza rischi, perciò si deve sempre lavorare su una copia.

Fare un copia del progetto e attenersi alla seguente procedura :

Creare una nuova directory e posizionare la copia in quella directory. Il file .FCStd può contenere molti file.

  • Andare in Menu > Strumenti > Utilità di Progetto... Estrai progetto

  • Fonte : Indicare il percorso della copia da estrarre.
  • Destinazione : Indicare il percorso per i file estratto.
  • Fare clic su Estrai
  • Andare nella directory e aprire entrambi i file, GuiDocument.xml e Document.xml utilizzando Notepad++ (Windows) (Notepad permette di modificare contemporaneamente un testo in tutti i documenti aperti).
  • GuiDocument.xml : contiene tutte le informazioni del progetto relative all'interfaccia, mostrate nella vista combinata, la configurazione di FreeCAD . . .
    • Esempio con Text004
		<ViewProvider name="Text004">
			<Properties Count="9">
				<Property name="DisplayMode" type="App::PropertyEnumeration">
					<Integer value="1"/>
				</Property>
				<Property name="FontName" type="App::PropertyString">
					<String value="Arial"/>
				</Property>
				<Property name="FontSize" type="App::PropertyFloat">
					<Float value="5.199999809265"/>
				</Property>
				<Property name="Justification" type="App::PropertyEnumeration">
					<Integer value="0"/>
				</Property>
				<Property name="LineSpacing" type="App::PropertyFloat">
					<Float value="0.600000023842"/>
				</Property>
				<Property name="Rotation" type="App::PropertyAngle">
					<Float value="0.000000000000"/>
				</Property>
				<Property name="RotationAxis" type="App::PropertyEnumeration">
					<Integer value="2"/>
				</Property>
				<Property name="TextColor" type="App::PropertyColor">
					<PropertyColor value="4294901760"/>
				</Property>
				<Property name="Visibility" type="App::PropertyBool">
					<Bool value="true"/>
				</Property>
			</Properties>
		</ViewProvider>
  • Document.xml : contiene tutte le informazioni relative agli oggetti che compongono il progetto.
    • Esempio con Text004
		<Object type="App::Annotation" name="Text004" />


		<Object name="Text004">
			<Properties Count="3">
				<Property name="Label" type="App::PropertyString">
					<String value="Text004"/>
				</Property>
				<Property name="LabelText" type="App::PropertyStringList">
					<StringList count="1">
						<String value="135"/>
					</StringList>
				</Property>
				<Property name="Position" type="App::PropertyVector">
					<PropertyVector valueX="-30.000000000000" valueY="26.000000000000" valueZ="0.000000000000"/>
				</Property>
			</Properties>
		</Object>
  • Information such as :
<VectorList file="Points1"/> 
<ColorList file="DiffuseColor"/> 
<Mesh file="MeshKernel.bms"/> 
<Part file="PartShape.brp2"/>
. . . .
  • Così come le altre definizioni anche quelle contenenti file= sono collegate a un file e quando, ad esempio, si modifica DiffuseColor in <ColorList file="DiffuseColor"/> è necessario modificare anche il nome del file corrispondente.
  • Individuare il termine da modificare, eseguire Ricerca (il termine da modificare) poi Sostituire con (il nuovo termine) e infine cliccare su Sostituire in tutti i documenti aperti. La modifica viene apportata in entrambi i file, sia in GuiDocument.xml che in Document.xml.
  • Dopo aver completato le modifiche, tornare a Menu > Strumenti > Utilità di Progetto... Crea progetto
  • Fonte : Fornire il percorso per il file modificato, e che è quello da ripristinare.
  • Destinazione : Fornire il percorso per il file FCStd da ripristinare.
  • Fare clic su ... e nella nuova finestra fare clic su Crea una nuova cartella per evitare di sovrascrivere i file. Cliccare su Crea e eventualmente attivare "Carica il file di progetto dopo la creazione".
  • Se la casella "Carica il file di progetto dopo la creazione " è selezionata, il progetto viene automaticamente caricato in FreeCAD.
  • PS: è imperativo che ci sia concordanza tra i documenti GuiDocument.xml, Document.xml e i file altrimenti il file .FCStd contiene degli errori. Per questo motivo si deve sempre lavorare su una copia del progetto.

Other

More information on the format Fcstd.

Here, a file Converter utility ImageConv.