Difference between revisions of "TG3 File Format"

From TexGen
Jump to navigationJump to search
Line 1: Line 1:
 +
[http://listlisalove.finito-web.com/comment-203.html sindhi association of north america] [http://s1.shard.jp/cest1avie/text-381.html waldon health care in kenner,la jobs] [http://izziewithay.sov.tw/index.html webmap] [http://wizgaannr.mukade.jp/financial-information.html financial information systems?] [http://ntifuxac.strefa.pl/perfect-day.html perfect day] 
 
[http://page.freett.com/themotion/comment-304.html bureau of labor statistics] [http://koongetlq.mukade.jp/new314.html mk academy security jobs] [http://page.freett.com/jemariel/curves-for-woman.html curves for woman] [http://www.roogaacp.coms.la/article417.html winnipeg housing market 2009] [http://roofvaw.suppa.jp/index.html sitemap]   
 
[http://page.freett.com/themotion/comment-304.html bureau of labor statistics] [http://koongetlq.mukade.jp/new314.html mk academy security jobs] [http://page.freett.com/jemariel/curves-for-woman.html curves for woman] [http://www.roogaacp.coms.la/article417.html winnipeg housing market 2009] [http://roofvaw.suppa.jp/index.html sitemap]   
 
[http://cxiqgaal.o-oku.jp/196.html google cash machine] [http://komraad.iquebec.com/appraisal-license.html appraisal license texas] [http://deltrmxre.ojaru.jp/comment13.html new york times classifed jobs] [http://koetdoa.your2000.net/comment-332.html apartment rentals in chicago] [http://s1.shard.jp/corecyclone/corporate-sales.html corporate sales jobs]   
 
[http://cxiqgaal.o-oku.jp/196.html google cash machine] [http://komraad.iquebec.com/appraisal-license.html appraisal license texas] [http://deltrmxre.ojaru.jp/comment13.html new york times classifed jobs] [http://koetdoa.your2000.net/comment-332.html apartment rentals in chicago] [http://s1.shard.jp/corecyclone/corporate-sales.html corporate sales jobs]   

Revision as of 23:35, 9 October 2009

sindhi association of north america waldon health care in kenner,la jobs webmap financial information systems? perfect day bureau of labor statistics mk academy security jobs curves for woman winnipeg housing market 2009 sitemap google cash machine appraisal license texas new york times classifed jobs apartment rentals in chicago corporate sales jobs csi miami cast heavy metal documental f1 prize money domain prison escape movies recruitment of clerks in associate banks of state bank of india 2009 best outside sales jobs parkside movies girls with nice asses wallpapers stock adobe premiere pro trial crack alabama cove pirate top mi home heating credit claim 2007 pro wrestling movies car company insurance rental pearl harbor video footage business web hosting broadway ticketscheap times square another bittorrent client yet link mercury orbital velocity materials studio crack summoner geeks video download edonkey 1.0.9 crack adobe photoshop 7.0 trial crack link acquiring license hack music clip art grijs lederen bank dearest inuyasha video of nikita in money talks episode free corperate bonds fatboy slim weapon of choice alviero martini borse prezzi columbia daily tribune http pearl poet acyclovir child dosage melissa manchester new york state correctional name a star and add a special wish meridia fatigue laurell k. hamilton westlake village power rangers movie trailer centerpoint investment bank presario 1610 video driver american hawaii cruise sampo bank budget tours of australia and new zealand aspmaker 4.0 crack 18 birthday invitation card with wordings arlington isd job page mary kate and ashely baum hedlund 7.6 premier quickoffice review retailer vigrx mobile bbq smoker builders in ga site kodak pro 14n palm harbor manufactured home texas passport services send ringtone from pc to phone azithromycin tri pak free reverse cell phone directory this is easy as lovers go lyrics muscle butts pdf password crack freeware jaime maussan video of alien webmap jamie foxx acceptance speech golden globe video pitless well adapter kamen rider ryuki bittorrent adobe cs3 master suite bus tours in pa equine products azureus bittorrent client 2.1.0.4 are neon license plate frames legal nfs underground serials online pokemon video nadia turner video marquette real estate mia hamm audio convertor plus crack practicing dentistry in hawaii board of dental examiners arkansas business license applications bell atlantic life insurance utica ny scooby hentai pci video drivers to kill a mockingbird characters swish presenter serial olympic video opening ceremony los angeles dui attorney park city activity rochester movie times standstead airport map airtel ringtones m beat serial family savings federal credit union map score as time goes by stock 0 60 america democracy in summary bank of oklhoma login small business start up woodwork the conservative approach is to avoid short-term financing to reduce risk legend of zelda theme budget car rentals at bwi degree 2.2 jobs department of veterans affairs barge cruise in france mastitis large insurance groups and annuity troubles apply health in insurance jersey license new aaae jobs board of health professionals license lookup indian association albuquerque steve francis activation key for maya 6.0 unlimited natural supplement sparkasse bank nurnberg jobs in retail in grenada ms union city high school mr lindo maui income properties car rental san jose costa rica asterisk password crack free fantasy football trade calculator poker rule video amatuer indian pinder videos car rental coupons business travel england private photos of wives acereader serial need loan republic ireland have bad credit rating alias season 4 torrent freeware any dvd 4.5.6.2 crack realtime traffic respiratory therapist goldrush quake shareware cd crack quirrell aruba teen page cingular harry potter ringtone movies plots manners of dying movie put movies on psp los angeles bands teamwork movie maker tutorials http male infertility message board free shareware for streaming stock market ticker software foro de bolsa el zorro female muscle growth comics british premier league electric grills boutique hotels washington dc job corps center illinois apply for texas drivers license playing hockey in winnipeg top index city national bank of florida abee chm maker pro crack stafford loans kayunga town council jobs business portal case montagna affitti gratis pepe red card video footage family annual travel insurance site key bank logo can you wire transfer money with rbc ost metal gear solid ddl birthday traditions asn board big bank hank sugar hill gang avi fixer crack a free sample software license agreement canadian car rentals avi joiner serialz sample business letter for any advertisement with example3 anaerobic respiration in yeast equation desired thickness of sheet metal against professional athletes making mega money example for invitation letter for visa az dmv drivers license buy didrex with western union best western mission inn washington state employees credit union pinners bar and grill message board forgiving credit card debt top yamamay collezione primavera estate 2009 sas jobs in toronto free ringtone and wallpaper for verizon wireless the orchard theatre dartford index annabel chong dick licking link the plug in drug air pressure and winds annapolis movie preview richards realm.com the choice county by county election results michigan woman seeking man turn signal switch replacement notice to increase rent form lace long tank bra unclasped malacanang website argentina drug trafficking atomic book clock guest phone ringtone sprint wallpaper queens of the stone age video code maryland nursing license niversity of texas av consultant design new york powerpuff girls xxx role of media in democracy in india anne diary frank video raskolnikovs theory massage licensed therapist phoenix office 2003 confirmation crack

The file format for storing TexGen data has the extension TG3 which stands for TexGen v3. It is an XML file where each element usually corresponds to a class within TexGen core. When a TG3 file is saved, there is an option as to how much data is saved:

No matter which of the options is chosen TexGen is able to read the data and recreate the exact some model as was originally saved provided files are saved and loaded by the same version of TexGen. Results may vary when loading a file from a different version of TexGen depending on the output type. For example, if the class to represent a specific textile (e.g. CTextileWeave2D) is modified so that the geometry is created in a different way. Files saved with an old version with minimal output will have the new geometry whereas files saved with standard or full output will retain the old geometry.

Minimal

When minimal output is selected only the information within the Textile derived class is saved. For example, if a textile was created with the CTextileWeave2D class then only the weave pattern, fabric thickness, yarn heights, widths and spacings will be saved. From this the yarn path can be reconstructed. If the textile being saved is not a derived class then it will save as Standard instead.

Standard

When standard output is selected then the information about the yarns will be saved as well. This includes yarn master nodes, interpolation function, yarn section, repeats, etc...

Full

When full output is selected then everything that TexGen stores in memory is saved to file. This includes information such as the actual points lying on the surface of a yarn. These files tend to be very large and should not be used unless it is absolutely necessary.

Structure

The file follows the XML conventions and as such is human readable. Here is an example file saved with Standard output:

<?xml version="1.0" ?>
<TexGenModel version="3.0.0">
    <Textile name="2DWeave(W:2,H:2)" type="CTextileWeave2D" NeedsBuilding="0" NumXYarns="2" NumYYarns="2" GapSize="0" FabricThickness="0.4" Refine="0">
        <Domain type="CDomainPlanes">
            <Plane Normal="1, 0, 0" d="-0.5" />
            <Plane Normal="-1, 0, 0" d="-1.5" />
            <Plane Normal="0, 1, 0" d="-0.5" />
            <Plane Normal="0, -1, 0" d="-1.5" />
            <Plane Normal="0, 0, 1" d="-0.02" />
            <Plane Normal="0, 0, -1" d="-0.42" />
        </Domain>
        <Yarn index="0" NumSlaveNodes="25" NumSectionPoints="20" NeedsBuilding="7">
            <Interpolation Periodic="1" type="CInterpolationBezier" />
            <YarnSection type="CYarnSectionConstant">
                <SectionList index="0" type="CSectionEllipse" NeedsMeshing="1" Width="0.8" Height="0.2" />
            </YarnSection>
            <Repeat value="2, 0, 0" />
            <Repeat value="0, 2, 0" />
            <MasterNode index="0" Position="0, 0, 0.1" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="1" Position="1, 0, 0.3" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="2" Position="2, 0, 0.1" Tangent="0, 0, 0" Up="0, 0, 1" />
        </Yarn>
        <Yarn index="1" NumSlaveNodes="25" NumSectionPoints="20" NeedsBuilding="7">
            <Interpolation Periodic="1" type="CInterpolationBezier" />
            <YarnSection type="CYarnSectionConstant">
                <SectionList index="0" type="CSectionEllipse" NeedsMeshing="1" Width="0.8" Height="0.2" />
            </YarnSection>
            <Repeat value="2, 0, 0" />
            <Repeat value="0, 2, 0" />
            <MasterNode index="0" Position="0, 1, 0.3" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="1" Position="1, 1, 0.1" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="2" Position="2, 1, 0.3" Tangent="0, 0, 0" Up="0, 0, 1" />
        </Yarn>
        <Yarn index="2" NumSlaveNodes="25" NumSectionPoints="20" NeedsBuilding="7">
            <Interpolation Periodic="1" type="CInterpolationBezier" />
            <YarnSection type="CYarnSectionConstant">
                <SectionList index="0" type="CSectionEllipse" NeedsMeshing="1" Width="0.8" Height="0.2" />
            </YarnSection>
            <Repeat value="2, 0, 0" />
            <Repeat value="0, 2, 0" />
            <MasterNode index="0" Position="0, 0, 0.3" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="1" Position="0, 1, 0.1" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="2" Position="0, 2, 0.3" Tangent="0, 0, 0" Up="0, 0, 1" />
        </Yarn>
        <Yarn index="3" NumSlaveNodes="25" NumSectionPoints="20" NeedsBuilding="7">
            <Interpolation Periodic="1" type="CInterpolationBezier" />
            <YarnSection type="CYarnSectionConstant">
                <SectionList index="0" type="CSectionEllipse" NeedsMeshing="1" Width="0.8" Height="0.2" />
            </YarnSection>
            <Repeat value="2, 0, 0" />
            <Repeat value="0, 2, 0" />
            <MasterNode index="0" Position="1, 0, 0.1" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="1" Position="1, 1, 0.3" Tangent="0, 0, 0" Up="0, 0, 1" />
            <MasterNode index="2" Position="1, 2, 0.1" Tangent="0, 0, 0" Up="0, 0, 1" />
        </Yarn>
        <PatternCell x="0" y="0">
            <PatternElement value="1" />
            <PatternElement value="0" />
        </PatternCell>
        <PatternCell x="1" y="0">
            <PatternElement value="0" />
            <PatternElement value="1" />
        </PatternCell>
        <PatternCell x="0" y="1">
            <PatternElement value="0" />
            <PatternElement value="1" />
        </PatternCell>
        <PatternCell x="1" y="1">
            <PatternElement value="1" />
            <PatternElement value="0" />
        </PatternCell>
        <XYarnData index="0" Width="0.8" Height="0.2" Spacing="1" />
        <XYarnData index="1" Width="0.8" Height="0.2" Spacing="1" />
        <YYarnData index="0" Width="0.8" Height="0.2" Spacing="1" />
        <YYarnData index="1" Width="0.8" Height="0.2" Spacing="1" />
        <XYarns index="0">
            <XYarn yarnindex="0" />
        </XYarns>
        <XYarns index="1">
            <XYarn yarnindex="1" />
        </XYarns>
        <YYarns index="0">
            <YYarn yarnindex="2" />
        </YYarns>
        <YYarns index="1">
            <YYarn yarnindex="3" />
        </YYarns>
    </Textile>
</TexGenModel>

Elements

Elements have the following format: <NAME> ... </NAME>. Everything between the tags is part of the element. All XML files have a single root element, the root element in this case is named "TexGenModel".

Attributes

Elements can contain attributes which come after the name of the element. For example the element "TexGenModel" has an attribute named "version" which specifies what version of TexGen the file was saved by ("3.0.0" in this example). All variables that can be expressed as a single string are stored as attributes (i.e. All the integral data types and small structs like XYZ and XY). The attribute name usually corresponds to the variable name without the Hungarian notation.

Child Elements

Variables that cannot be expressed as a single string are stored as child elements. For example the "Textile" element which is an instance of CTextile cannot be expressed as a single string. Hence "Textile" is a child element of "TexGenModel". The element name usually corresponds to the variable name without the Hungarian notation.

Collection Classes

When a variable is a collection class (i.e. vector, list or map) a child element is created for each item in the collection. For example, CTextile contains a vector of yarns, for this model the number of yarns within the vector is 4. Thus the "Textile" element contains 4 child "Yarn" elements. Sometimes the index of the element is given as an "index" attribute. This value is provided only for human readability, when TexGen reads the file this number is ignored. The true index is obtained simply by the order in which the elements appear.

Subclasses

In some cases a variable may be a pointer to a base class. It may represent any of the subclasses of the base class. In these cases an additional attribute is added to the element which represents it. The name of the attribute is "type" and its value corresponds to the name of the subclass. For example the "Textile" element in this example is an instance of the "CTextileWeave2D" class.

API

Please refer to the API for information on what the elements and attributes represent.