File Format FCStd/ro: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{TOCright}}

==Overview==

<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
'''FreeCAD Standard file format''' (.FCStd) este formatul principal de fișier al FreeCAD . Un proiect FreeCAD, este compus de fapt dintr-o serie de fișiere normale tip text care conțin întodeauna un fișier document .xml, GuiDocument.xml, Document.xml și eventual mai multe fișiere de date PartShape3.brp Points3 . . ., plus o vineta în format .PNG totul fiind arhivat într-un fișier .zip la care se înlocuiește extensia .FCStd.t .
'''FreeCAD Standard file format''' (.FCStd) este formatul principal de fișier al FreeCAD . Un proiect FreeCAD, este compus de fapt dintr-o serie de fișiere normale tip text care conțin întodeauna un fișier document .xml, GuiDocument.xml, Document.xml și eventual mai multe fișiere de date PartShape3.brp Points3 . . ., plus o vineta în format .PNG totul fiind arhivat într-un fișier .zip la care se înlocuiește extensia .FCStd.t .
Line 16: Line 20:
</div>
</div>


This is the main {{FileName|.xml}} file describing all the objects inside a FreeCAD document, that is, only the geometric and parametric definition of the objects, not their visual representation. If FreeCAD is ran in console mode (without the GUI), only this {{FileName|Document.xml}} will be used.

<div class="mw-translate-fuzzy">
===== Exemplu de Document.xml=====
===== Exemplu de Document.xml=====
</div>
<syntaxhighlight>

{{Code|lang=xml|code=
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<!--
<!--
Line 109: Line 118:
</ObjectData>
</ObjectData>
</Document>
</Document>
}}
</syntaxhighlight>

<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
====GuiDocument.xml====
====GuiDocument.xml====
Line 115: Line 125:
</div>
</div>


This is the GUI counterpart of the {{FileName|Document.xml}} file. For each object described in the {{FileName|Document.xml}}, there is one corresponding object in {{FileName|GuiDocument.xml}}, describing the visual representation of that object (color, linewidth, etc).

<div class="mw-translate-fuzzy">
====Thumbnails/thumbnail.png====
====Thumbnails/thumbnail.png====
This is a 128x128 pixels thumbnail image of the document, which is a screenshot of the 3D view at save time. Thumbnails are generated only if the corresponding option is enabled in the FreeCAD preferences.
This is a 128x128 pixels thumbnail image of the document, which is a screenshot of the 3D view at save time. Thumbnails are generated only if the corresponding option is enabled in the FreeCAD preferences.
</div>


This is a 128x128 pixels thumbnail image of the document, which is a screenshot of the 3D view at save time. Thumbnails are generated only if the corresponding option is enabled in the FreeCAD preferences.
====Șabloane/*.svg====
In the Templates folder are stored the template svg files used in [[Drawing Module|Drawing]] pages.


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 125: Line 138:
Acestea sunt forme .brep shapes a tuturor obeicteleor care au o Part shape în Document.xml. Fiecare obiect, chiar dacă este parametric, are forma sa stocată ca fișier individual .brep , astfel încât acesta poate fi accesat de către componente fără a fi nevoie să recalculați forma.
Acestea sunt forme .brep shapes a tuturor obeicteleor care au o Part shape în Document.xml. Fiecare obiect, chiar dacă este parametric, are forma sa stocată ca fișier individual .brep , astfel încât acesta poate fi accesat de către componente fără a fi nevoie să recalculați forma.
</div>
</div>

These are the [[wikipedia:Boundary representation|B-rep]] shapes of all objects that have a Part shape in the {{FileName|Document.xml}}. Each object, even if it is parametric, has its shape stored as an individual {{FileName|.brep}} file, so it can be accessed by components without the need to recalculate the shape.

<div class="mw-translate-fuzzy">
====Șabloane/*.svg====
In the Templates folder are stored the template svg files used in [[Drawing Workbench|Drawing]] pages.
</div>

These are the template svg files used in [[TechDraw_Workbench|TechDraw]] pages.


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 130: Line 152:
Structure of a typical FCStd file:
Structure of a typical FCStd file:
</div>
</div>

<syntaxhighlight>
Structure of a typical {{FileName|.FCStd}} file. The extension can be changed to {{FileName|.zip}} to explore it like a normal directory. The {{FileName|Document.xml}} and {{FileName|GuiDocument.xml}} are at the root of the archive, together with any number of {{FileName|.brp}} (BREP) files. One subdirectory may hold the thumbnail, and another the SVG templates used by [[TechDraw_Workbench|TechDraw]].
--File.fcstd

<!--DO NOT remove the <pre> </pre> tags. These are used to display the text exactly like this.-->
<pre>
File.FCStd (File.zip)
|
|--thumbnails/
| |
| :--Thumbnail.png
|
|
--Document.xml
:--Document.xml
--GuiDocument.xml
:--GuiDocument.xml
:--Shape1.brp
|
--Thumbnails
:--Shape2.brp
:--MyPage.svg
|
--thumbnail.png
:--etc.
</pre>
|
--Templates
|
--MyPage.svg
--Shape1.brep
--Shape2.brep
--etc...
</syntaxhighlight>


== Embedding other files ==
==Schimbarea sursei fișierului .FCStd==
{{VeryImportantMessage|'''ATTENTION ALWAYS WORK ON A COPY OF YOUR PROJECT !'''}}


In order to embed other file types inside a FCStd file, you must first create a [[Scripted_objects|scripted object]] from the [[Python_console|Python console]], and give it an {{incode|App::PropertyFileIncluded}} property.
<div class="mw-translate-fuzzy">
Este posibilă schimbara sursei fișierului .FCStd Dar procedura nu este lipsită de riscuri din acest motiv trebuie să lucrăm pe o '''copy'''.
</div>


Then in the [[Property_editor|property editor]] you can go to the added property and choose a file in the computer. Once the FCStd file is saved, the file assigned to the {{PropertyData|PropertyFileIncluded}} property will be packed inside the {{incode|.FCStd}}. When the document is restored, the same file will be restored with the {{PropertyData|PropertyFileIncluded}} property.
After having made an '''copy''' of your project, follow these steps :


{{Code|code=
Create a new directory and place your copy in that directory (there may be many files in your FCStd).
custom_obj = App.ActiveDocument.addObject("App::FeaturePython", "CustomObject")
custom_obj.addProperty("App::PropertyFileIncluded", "AttachedFile")
}}


See the forum thread, [https://forum.freecadweb.org/viewtopic.php?t=38201 PDF inside the project].
<div class="mw-translate-fuzzy">
* Go in '''Menu > tools > Project utility... Project utility'''
[[File:Project utility en.png|240px]]
* Source : Give your copy to unpack path.
* Destination : Give the path to the unzipped files.
* Click {{KEY|Extract}}
* Go to your directory and open both files '''GuiDocument.xml''' andt '''Document.xml''' using [http://notepad-plus-plus.org/ Notepad++] (Windows) (Notepad++ to modify a word in all open documents).
*'''GuiDocument.xml''' : contains all your project information to the interface, display in the Combo view, the configuration of FreeCAD . . .
**Example with '''Text004'''
</div>
<syntaxhighlight>
<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>
</syntaxhighlight>


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
==Schimbarea sursei fișierului .FCStd==
*'''Document.xml''' : contains all information relating to the constituent objects your project.
{{VeryImportantMessage|'''ATTENTION ALWAYS WORK ON A COPY OF YOUR PROJECT !'''}}
**Example with '''Text004'''
</div>
</div>
<syntaxhighlight>
<Object type="App::Annotation" name="Text004" />
</syntaxhighlight>

<syntaxhighlight>
<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>

</syntaxhighlight>
* Information such as :
<syntaxhighlight>
<VectorList file="Points1"/>
<ColorList file="DiffuseColor"/>
<Mesh file="MeshKernel.bms"/>
<Part file="PartShape.brp2"/>
. . . .
</syntaxhighlight>


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Este posibilă schimbara sursei fișierului .FCStd Dar procedura nu este lipsită de riscuri din acest motiv trebuie să lucrăm pe o '''copy'''.
* precum și alte definiții containerele sunt în legătură cu un fișier și dacă schimbați exemplul "'''DiffuseColor'''"în '''<ColorList file = "DiffuseColor" />''' Va trebui să schimbați și numele fișierului pentru corespondență.
* După ce ați identificat modificarea cuvântului, '''(cuvântul/numele dvs.)''' și ''' Înlocuiți cu '''(cuvântul/numele dvs. nou) și faceți clic pe {{KEY | Replace in all open documents}} și schimbarea dvs. va fi aceeași în ambele fișiere '''GuiDocument.xml''' și '''Document.xml'''.
* Când schimbările sunt complete, reveniți la instrumentul '''Meniu> Instrumente> Utilitate proiect ... Creați proiect'''
* Sursa: Dați calea fișierului pe care tocmai l-ați schimbat și care este de restaurat.
* Destinație: Dați calea fișierului FCStd pentru a restabili legătura.
* Faceți clic pe {{KEY | ...}} În fereastra nouă faceți clic pe {{KEY|Creare new folder}} (pentru a evita erorile prin rescrierea fișierului) și postați. Faceți clic pe {{KEY |Create}} puteți verifica "Încărcați fișierul de proiect după crearea".
* Dacă ați bifat "Încărcați fișierul proiectului după creare", proiectul dvs. va fi încărcat în FreeCAD.
* '''PS:''' Este imperativ ca aceasta sa conțina documente GuiDocument.xml, Document.xml si fișiere fără de care vor exista erori în fișierul .FCStd. Pentru a face acest lucru ar trebui să lucrați întotdeauna pe o copie a proiectului dumneavoastră.
</div>
</div>


==Altele==
==Altele==

Here, a file Converter utility [[ImageConv|ImageConv]].


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Here, a file Converter utility [[ImageConv|ImageConv]].
[[Category:User Documentation/ro]]
</div>
</div>


{{Userdocnavi{{#translation:}}}}
[[Category:Developer{{#translation:}}]]
[[Category:Developer Documentation{{#translation:}}]]
[[Category:File_Formats{{#translation:}}]]
{{clear}}
{{clear}}

Latest revision as of 15:23, 28 August 2021

Overview

FreeCAD Standard file format (.FCStd) este formatul principal de fișier al FreeCAD . Un proiect FreeCAD, este compus de fapt dintr-o serie de fișiere normale tip text care conțin întodeauna un fișier document .xml, GuiDocument.xml, Document.xml și eventual mai multe fișiere de date PartShape3.brp Points3 . . ., plus o vineta în format .PNG totul fiind arhivat într-un fișier .zip la care se înlocuiește extensia .FCStd.t .

Interiorul fișierelor .FCStd

FCStd este un fișier standard tip fișier zip, conținând fișiereone or more îmtr-o Structure specifică. Ca atare, este posibilă dezarhivarea unui fișier FCStd utilizând un instrument de decompresie zip obișnuit. FreeCAD conține un "Project Utility" pentru rearhivarea fișierelor FCStd, utilizara sa este descrisă mai jos în #Change the source of the file .FCStd .

Conținuturi

Document.xml

This is the main xml file describing all the objects inside a FreeCAD document, that is, only the geometric and parametric definition of the objects, not their visual representation. If FreeCAD is ran in console mode (without the GUI), only this xml document will be used.=

This is the main .xml file describing all the objects inside a FreeCAD document, that is, only the geometric and parametric definition of the objects, not their visual representation. If FreeCAD is ran in console mode (without the GUI), only this Document.xml will be used.

Exemplu de Document.xml
<?xml version='1.0' encoding='utf-8'?>
 <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>

GuiDocument.xml

This is the GUI counterpart of the Document.xml file. For each object described in the Document.xml, there is one corresponding object in GuiDocument.xml, describing the visual representation of that object (color, linewidth, etc).

This is the GUI counterpart of the Document.xml file. For each object described in the Document.xml, there is one corresponding object in GuiDocument.xml, describing the visual representation of that object (color, linewidth, etc).

Thumbnails/thumbnail.png

This is a 128x128 pixels thumbnail image of the document, which is a screenshot of the 3D view at save time. Thumbnails are generated only if the corresponding option is enabled in the FreeCAD preferences.

This is a 128x128 pixels thumbnail image of the document, which is a screenshot of the 3D view at save time. Thumbnails are generated only if the corresponding option is enabled in the FreeCAD preferences.

*.brep

Acestea sunt forme .brep shapes a tuturor obeicteleor care au o Part shape în Document.xml. Fiecare obiect, chiar dacă este parametric, are forma sa stocată ca fișier individual .brep , astfel încât acesta poate fi accesat de către componente fără a fi nevoie să recalculați forma.

These are the B-rep shapes of all objects that have a Part shape in the Document.xml. Each object, even if it is parametric, has its shape stored as an individual .brep file, so it can be accessed by components without the need to recalculate the shape.

Șabloane/*.svg

In the Templates folder are stored the template svg files used in Drawing pages.

These are the template svg files used in TechDraw pages.

Structură

Structure of a typical FCStd file:

Structure of a typical .FCStd file. The extension can be changed to .zip to explore it like a normal directory. The Document.xml and GuiDocument.xml are at the root of the archive, together with any number of .brp (BREP) files. One subdirectory may hold the thumbnail, and another the SVG templates used by TechDraw.

File.FCStd (File.zip)
  |
  |--thumbnails/
  |  |
  |  :--Thumbnail.png
  |
  :--Document.xml
  :--GuiDocument.xml
  :--Shape1.brp
  :--Shape2.brp
  :--MyPage.svg
  :--etc.

Embedding other files

In order to embed other file types inside a FCStd file, you must first create a scripted object from the Python console, and give it an App::PropertyFileIncluded property.

Then in the property editor you can go to the added property and choose a file in the computer. Once the FCStd file is saved, the file assigned to the DatePropertyFileIncluded property will be packed inside the .FCStd. When the document is restored, the same file will be restored with the DatePropertyFileIncluded property.

custom_obj = App.ActiveDocument.addObject("App::FeaturePython", "CustomObject")
custom_obj.addProperty("App::PropertyFileIncluded", "AttachedFile")

See the forum thread, PDF inside the project.

Schimbarea sursei fișierului .FCStd

ATTENTION ALWAYS WORK ON A COPY OF YOUR PROJECT !

Este posibilă schimbara sursei fișierului .FCStd Dar procedura nu este lipsită de riscuri din acest motiv trebuie să lucrăm pe o copy.

Altele

Here, a file Converter utility ImageConv.