Formato dei file FCStd

From FreeCAD Documentation
Revision as of 16:57, 2 March 2014 by Mario52 (talk | contribs) (adding "Modificare il file .FCStd")

Formato dei file FCStd

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

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 SEMPRE LAVORARE SU UNA COPIA DEL TUO PROGETTO !

È possibile modificare il file originale .FCStd ma la procedura non è senza rischio è per questo che abbiamo si deve lavorare su un copia.

Dopo aver fatto un copia del vostro progetto, attenersi alla seguente procedura :

Creare una nuova directory e posizionare la tua copia in quella directory (ci possono essere molti file dentro il file .FCStd).

  • Vai in Menu > Strumenti > Utilità di Progetto... Entra progetto

  • Fonte : Dare il percorso della vostra copia di decomprimere.
  • Destinazione : Dare il percorso per i file a decompressare.
  • Fare clic su Estrai
  • Andare alla directory e aprire i due file GuiDocument.xml e Document.xml utilizzandon Notepad++ (Windows) (Notepad per modificare una word in tutti i documenti aperti).
  • GuiDocument.xml : contiene tutte le informazioni di progetto per l'interfaccia, display nella visualizzazione 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 costituenti 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>
  • Le informazioni come :
<VectorList file="Points1"/> 
<ColorList file="DiffuseColor"/> 
<Mesh file="MeshKernel.bms"/> 
<Part file="PartShape.brp2"/>
. . . .
  • Così come altri contenitori definizioni file = sono collegati ha un file e modificare ad esempio DiffuseColor in <ColorList file="DiffuseColor"/> è necessario anche modificare il nome del file per corrispondenza.
  • Una volta identificato il cambiamento di parola, Ricerca (vostro Word) e Sostituire da (La nuova word) e fare clic su Sostituire in tutti i documenti aperti e il cambiamento sarà lo stesso in entrambi i file GuiDocument.xml e Document.xml.
  • Una volta completate le modifiche, tornare allo strumento Menu > Strumenti > Utilità di Progetto... Creare un progetto
  • Fonte : Dare il percorso del file che hai cambiato e che è quello di ripristinare.
  • Destinazione : Dare il percorso del file FCStd per ripristinare.
  • Fare clic su Creare è possibile controllare la "Carica il file di progetto dopo la creazione". e clic su "..." e nella nuova finestra fare clic su Creare una nuova cartella (per evitare errori riscrivendo i file) e postare.
  • Se avete checked la casella "caricare il file di progetto dopo la creazione " il progetto si caricherà in FreeCAD.
  • PS: è imperativo di avere concordanza dei documenti GuiDocument.xml, Document.xml e i fili sul disco se no ci saranno errori nel tuo .FCStd. E per quello que si deve sempre lavorare su una copia del progetto originale.

Altri legame

Ulteriori informazioni sul formato Fcstd.

Qui, un programma di utilitario convertitore ImageConv.

Altre lingue: