Added Ship design module sources
BIN
src/Mod/Ship/Icons/AreaCurveIco.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
src/Mod/Ship/Icons/AreaCurveIco.xcf
Normal file
841
src/Mod/Ship/Icons/AreaCurveIco.xpm
Normal file
|
@ -0,0 +1,841 @@
|
|||
/* XPM */
|
||||
static char * AreaCurveIco_xpm[] = {
|
||||
"128 128 710 2",
|
||||
" c None",
|
||||
". c #B1B1B1",
|
||||
"+ c #000001",
|
||||
"@ c #000000",
|
||||
"# c #010101",
|
||||
"$ c #020202",
|
||||
"% c #B0B0B0",
|
||||
"& c #030303",
|
||||
"* c #B1B1B0",
|
||||
"= c #AFAFAF",
|
||||
"- c #040404",
|
||||
"; c #AFB0B0",
|
||||
"> c #B0AFAF",
|
||||
", c #B0AFB0",
|
||||
"' c #AEAFAE",
|
||||
") c #050505",
|
||||
"! c #AFAEAE",
|
||||
"~ c #AEAEAE",
|
||||
"{ c #060606",
|
||||
"] c #ADACAC",
|
||||
"^ c #070707",
|
||||
"/ c #070706",
|
||||
"( c #ADADAD",
|
||||
"_ c #ACACAC",
|
||||
": c #080708",
|
||||
"< c #ACADAD",
|
||||
"[ c #ACABAB",
|
||||
"} c #090909",
|
||||
"| c #AAABAA",
|
||||
"1 c #09090A",
|
||||
"2 c #090A0A",
|
||||
"3 c #AAABAB",
|
||||
"4 c #A9A9AA",
|
||||
"5 c #0A0A0A",
|
||||
"6 c #0B0A0B",
|
||||
"7 c #AAAAAA",
|
||||
"8 c #A9A9A9",
|
||||
"9 c #0C0C0B",
|
||||
"0 c #0C0B0B",
|
||||
"a c #A8A8A8",
|
||||
"b c #0C0D0D",
|
||||
"c c #0D0D0C",
|
||||
"d c #A7A8A7",
|
||||
"e c #0E0E0D",
|
||||
"f c #0D0D0E",
|
||||
"g c #A7A8A8",
|
||||
"h c #A6A6A7",
|
||||
"i c #0E0F0F",
|
||||
"j c #A6A6A5",
|
||||
"k c #100F0F",
|
||||
"l c #0F0F0F",
|
||||
"m c #A6A6A6",
|
||||
"n c #A5A5A5",
|
||||
"o c #111010",
|
||||
"p c #111110",
|
||||
"q c #A6A5A5",
|
||||
"r c #A4A4A4",
|
||||
"s c #111111",
|
||||
"t c #A4A5A4",
|
||||
"u c #A3A3A3",
|
||||
"v c #131212",
|
||||
"w c #A2A3A3",
|
||||
"x c #131314",
|
||||
"y c #131313",
|
||||
"z c #A3A2A3",
|
||||
"A c #A2A2A2",
|
||||
"B c #141414",
|
||||
"C c #A1A1A1",
|
||||
"D c #151515",
|
||||
"E c #A1A1A2",
|
||||
"F c #A0A0A0",
|
||||
"G c #161616",
|
||||
"H c #A1A0A0",
|
||||
"I c #9F9F9F",
|
||||
"J c #181617",
|
||||
"K c #171717",
|
||||
"L c #181818",
|
||||
"M c #9E9E9D",
|
||||
"N c #191919",
|
||||
"O c #191819",
|
||||
"P c #9E9E9E",
|
||||
"Q c #9D9D9D",
|
||||
"R c #1A191A",
|
||||
"S c #1A1A1A",
|
||||
"T c #9D9C9C",
|
||||
"U c #1B1B1A",
|
||||
"V c #1B1B1B",
|
||||
"W c #9C9C9C",
|
||||
"X c #9B9C9B",
|
||||
"Y c #1C1C1C",
|
||||
"Z c #9B9B9B",
|
||||
"` c #9A9A9A",
|
||||
" . c #1C1D1D",
|
||||
".. c #1D1C1D",
|
||||
"+. c #9A9B9B",
|
||||
"@. c #1D1D1D",
|
||||
"#. c #1E1D1E",
|
||||
"$. c #989998",
|
||||
"%. c #1F1E1F",
|
||||
"&. c #1E1E1F",
|
||||
"*. c #999999",
|
||||
"=. c #989898",
|
||||
"-. c #201F1F",
|
||||
";. c #20201F",
|
||||
">. c #999898",
|
||||
",. c #101010",
|
||||
"'. c #3B3B3B",
|
||||
"). c #404040",
|
||||
"!. c #403F40",
|
||||
"~. c #3F403F",
|
||||
"{. c #282828",
|
||||
"]. c #989797",
|
||||
"^. c #212121",
|
||||
"/. c #212020",
|
||||
"(. c #979797",
|
||||
"_. c #696969",
|
||||
":. c #C2C1C1",
|
||||
"<. c #EFF0EF",
|
||||
"[. c #F0F0F0",
|
||||
"}. c #F0EFEF",
|
||||
"|. c #F0F0EF",
|
||||
"1. c #EFEFEF",
|
||||
"2. c #EEEFEF",
|
||||
"3. c #E2E2E2",
|
||||
"4. c #A09FA0",
|
||||
"5. c #585858",
|
||||
"6. c #969696",
|
||||
"7. c #212122",
|
||||
"8. c #212221",
|
||||
"9. c #969797",
|
||||
"0. c #121212",
|
||||
"a. c #939292",
|
||||
"b. c #ECECEC",
|
||||
"c. c #F1F0F1",
|
||||
"d. c #EEEEEE",
|
||||
"e. c #EEEDEE",
|
||||
"f. c #EEEDED",
|
||||
"g. c #E5E5E5",
|
||||
"h. c #8D8D8D",
|
||||
"i. c #959695",
|
||||
"j. c #222323",
|
||||
"k. c #222322",
|
||||
"l. c #2F2F2F",
|
||||
"m. c #D6D6D6",
|
||||
"n. c #F1F1F0",
|
||||
"o. c #F1F0F0",
|
||||
"p. c #EFF0F0",
|
||||
"q. c #EDEEED",
|
||||
"r. c #EDEDED",
|
||||
"s. c #ECEDED",
|
||||
"t. c #ECEDEC",
|
||||
"u. c #D8D8D8",
|
||||
"v. c #4D4D4D",
|
||||
"w. c #959595",
|
||||
"x. c #242323",
|
||||
"y. c #242324",
|
||||
"z. c #585859",
|
||||
"A. c #E8E8E8",
|
||||
"B. c #F0F1F1",
|
||||
"C. c #EEEEEF",
|
||||
"D. c #EDEEEE",
|
||||
"E. c #EDEDEC",
|
||||
"F. c #EBEBEC",
|
||||
"G. c #EBEBEB",
|
||||
"H. c #949494",
|
||||
"I. c #252424",
|
||||
"J. c #606060",
|
||||
"K. c #F1F1F1",
|
||||
"L. c #F0F0F1",
|
||||
"M. c #EFEEEE",
|
||||
"N. c #EDEDEE",
|
||||
"O. c #EDECED",
|
||||
"P. c #ECECED",
|
||||
"Q. c #ECEBEB",
|
||||
"R. c #ECEBEC",
|
||||
"S. c #EBECEB",
|
||||
"T. c #EAEBEA",
|
||||
"U. c #D4D4D4",
|
||||
"V. c #323232",
|
||||
"W. c #949393",
|
||||
"X. c #262525",
|
||||
"Y. c #252525",
|
||||
"Z. c #949493",
|
||||
"`. c #3D3D3D",
|
||||
" + c #EBEBEA",
|
||||
".+ c #EAEAEA",
|
||||
"++ c #EAEAE9",
|
||||
"@+ c #D7D7D7",
|
||||
"#+ c #292929",
|
||||
"$+ c #939392",
|
||||
"%+ c #272626",
|
||||
"&+ c #262626",
|
||||
"*+ c #939393",
|
||||
"=+ c #D9D9D9",
|
||||
"-+ c #EEEEED",
|
||||
";+ c #EDECEC",
|
||||
">+ c #EBEAEB",
|
||||
",+ c #E9E9E9",
|
||||
"'+ c #D2D2D1",
|
||||
")+ c #222222",
|
||||
"!+ c #929292",
|
||||
"~+ c #272727",
|
||||
"{+ c #282727",
|
||||
"]+ c #F0F1F0",
|
||||
"^+ c #E9E8E9",
|
||||
"/+ c #E8E9E8",
|
||||
"(+ c #C2C1C2",
|
||||
"_+ c #919191",
|
||||
":+ c #919291",
|
||||
"<+ c #606061",
|
||||
"[+ c #EFEFF0",
|
||||
"}+ c #EFEEEF",
|
||||
"|+ c #EFEFEE",
|
||||
"1+ c #EAEBEB",
|
||||
"2+ c #EBEAEA",
|
||||
"3+ c #E9EAE9",
|
||||
"4+ c #EAE9E9",
|
||||
"5+ c #E8E9E9",
|
||||
"6+ c #E8E7E7",
|
||||
"7+ c #E7E8E8",
|
||||
"8+ c #8F8F8F",
|
||||
"9+ c #909090",
|
||||
"0+ c #2A2929",
|
||||
"a+ c #919090",
|
||||
"b+ c #0C0C0C",
|
||||
"c+ c #DBDBDB",
|
||||
"d+ c #E9E9EA",
|
||||
"e+ c #E9E8E8",
|
||||
"f+ c #E7E7E7",
|
||||
"g+ c #E7E6E6",
|
||||
"h+ c #474747",
|
||||
"i+ c #2B2A2A",
|
||||
"j+ c #747475",
|
||||
"k+ c #F0EFF0",
|
||||
"l+ c #E9E9E8",
|
||||
"m+ c #E8E8E9",
|
||||
"n+ c #E7E6E7",
|
||||
"o+ c #E6E6E6",
|
||||
"p+ c #D3D3D3",
|
||||
"q+ c #8F8E8E",
|
||||
"r+ c #2B2B2B",
|
||||
"s+ c #E4E4E4",
|
||||
"t+ c #E9EAEA",
|
||||
"u+ c #E7E7E8",
|
||||
"v+ c #E5E5E6",
|
||||
"w+ c #8D8E8E",
|
||||
"x+ c #2D2C2C",
|
||||
"y+ c #2C2C2C",
|
||||
"z+ c #8E8E8E",
|
||||
"A+ c #7F807F",
|
||||
"B+ c #E6E7E7",
|
||||
"C+ c #E7E7E6",
|
||||
"D+ c #E6E7E6",
|
||||
"E+ c #E5E6E5",
|
||||
"F+ c #E6E6E5",
|
||||
"G+ c #E4E5E4",
|
||||
"H+ c #6D6D6D",
|
||||
"I+ c #8D8C8D",
|
||||
"J+ c #2D2C2D",
|
||||
"K+ c #2D2D2D",
|
||||
"L+ c #E8E8E7",
|
||||
"M+ c #E6E5E5",
|
||||
"N+ c #E5E4E4",
|
||||
"O+ c #DDDEDE",
|
||||
"P+ c #8C8C8C",
|
||||
"Q+ c #2F2E2E",
|
||||
"R+ c #2E2D2E",
|
||||
"S+ c #8D8C8C",
|
||||
"T+ c #757575",
|
||||
"U+ c #EAEAEB",
|
||||
"V+ c #E8E7E8",
|
||||
"W+ c #E6E6E7",
|
||||
"X+ c #E5E5E4",
|
||||
"Y+ c #E3E4E4",
|
||||
"Z+ c #E3E3E4",
|
||||
"`+ c #8C8B8B",
|
||||
" @ c #8B8B8B",
|
||||
".@ c #D1D1D1",
|
||||
"+@ c #E4E3E4",
|
||||
"@@ c #E3E3E3",
|
||||
"#@ c #E3E2E3",
|
||||
"$@ c #444444",
|
||||
"%@ c #8B8B8A",
|
||||
"&@ c #312F30",
|
||||
"*@ c #30302F",
|
||||
"=@ c #373737",
|
||||
"-@ c #ECECEB",
|
||||
";@ c #E5E6E6",
|
||||
">@ c #E6E5E6",
|
||||
",@ c #E5E4E5",
|
||||
"'@ c #E4E3E3",
|
||||
")@ c #BFBFBE",
|
||||
"!@ c #8A8A8A",
|
||||
"~@ c #313130",
|
||||
"{@ c #E7E8E7",
|
||||
"]@ c #E1E1E1",
|
||||
"^@ c #555555",
|
||||
"/@ c #898989",
|
||||
"(@ c #898A89",
|
||||
"_@ c #D9DAD9",
|
||||
":@ c #E4E4E5",
|
||||
"<@ c #E3E4E3",
|
||||
"[@ c #E3E3E2",
|
||||
"}@ c #E1E1E2",
|
||||
"|@ c #C2C3C2",
|
||||
"1@ c #888888",
|
||||
"2@ c #333232",
|
||||
"3@ c #333332",
|
||||
"4@ c #353435",
|
||||
"5@ c #EBECEC",
|
||||
"6@ c #E4E4E3",
|
||||
"7@ c #E3E2E2",
|
||||
"8@ c #E1E0E0",
|
||||
"9@ c #E0E0E0",
|
||||
"0@ c #545454",
|
||||
"a@ c #878788",
|
||||
"b@ c #343434",
|
||||
"c@ c #343334",
|
||||
"d@ c #7C7C7C",
|
||||
"e@ c #E2E3E2",
|
||||
"f@ c #E2E2E3",
|
||||
"g@ c #E2E1E2",
|
||||
"h@ c #E2E1E1",
|
||||
"i@ c #E1E0E1",
|
||||
"j@ c #E0E1E1",
|
||||
"k@ c #E0E1E0",
|
||||
"l@ c #C1C1C0",
|
||||
"m@ c #868786",
|
||||
"n@ c #353535",
|
||||
"o@ c #878687",
|
||||
"p@ c #C1C1C1",
|
||||
"q@ c #E2E2E1",
|
||||
"r@ c #E1E2E1",
|
||||
"s@ c #E1E1E0",
|
||||
"t@ c #DFE0E0",
|
||||
"u@ c #DFDFE0",
|
||||
"v@ c #DFDFDF",
|
||||
"w@ c #4A4A4A",
|
||||
"x@ c #858686",
|
||||
"y@ c #353635",
|
||||
"z@ c #363535",
|
||||
"A@ c #868686",
|
||||
"B@ c #EAE9EA",
|
||||
"C@ c #E2E3E3",
|
||||
"D@ c #E1E2E2",
|
||||
"E@ c #DFDEDF",
|
||||
"F@ c #B4B4B4",
|
||||
"G@ c #858585",
|
||||
"H@ c #373636",
|
||||
"I@ c #363736",
|
||||
"J@ c #858586",
|
||||
"K@ c #646464",
|
||||
"L@ c #DFE0DF",
|
||||
"M@ c #DEDFDF",
|
||||
"N@ c #DFDFDE",
|
||||
"O@ c #DEDEDE",
|
||||
"P@ c #454545",
|
||||
"Q@ c #848484",
|
||||
"R@ c #383838",
|
||||
"S@ c #858485",
|
||||
"T@ c #DEDEDF",
|
||||
"U@ c #DDDDDE",
|
||||
"V@ c #DDDEDD",
|
||||
"W@ c #B2B2B2",
|
||||
"X@ c #838483",
|
||||
"Y@ c #383938",
|
||||
"Z@ c #393839",
|
||||
"`@ c #848384",
|
||||
" # c #0B0B0B",
|
||||
".# c #E4E5E5",
|
||||
"+# c #E0DFDF",
|
||||
"@# c #DEDEDD",
|
||||
"## c #DDDDDD",
|
||||
"$# c #DCDCDC",
|
||||
"%# c #828282",
|
||||
"&# c #3A393A",
|
||||
"*# c #3A3939",
|
||||
"=# c #838283",
|
||||
"-# c #464646",
|
||||
";# c #DDDDDC",
|
||||
"># c #3B3B3A",
|
||||
",# c #3A3B3B",
|
||||
"'# c #818181",
|
||||
")# c #E0E0E1",
|
||||
"!# c #DFDEDE",
|
||||
"~# c #DEDDDD",
|
||||
"{# c #DDDCDD",
|
||||
"]# c #DCDDDC",
|
||||
"^# c #DADADB",
|
||||
"/# c #202020",
|
||||
"(# c #3C3B3B",
|
||||
"_# c #828181",
|
||||
":# c #BCBCBC",
|
||||
"<# c #E0DFE0",
|
||||
"[# c #DEDFDE",
|
||||
"}# c #DCDCDD",
|
||||
"|# c #DBDCDC",
|
||||
"1# c #DBDCDB",
|
||||
"2# c #7A7A7A",
|
||||
"3# c #808080",
|
||||
"4# c #3C3C3C",
|
||||
"5# c #3C3C3D",
|
||||
"6# c #808180",
|
||||
"7# c #DEDDDE",
|
||||
"8# c #DBDBDC",
|
||||
"9# c #DADBDB",
|
||||
"0# c #CCCCCC",
|
||||
"a# c #7F8080",
|
||||
"b# c #3E3D3D",
|
||||
"c# c #807F80",
|
||||
"d# c #424241",
|
||||
"e# c #DCDDDD",
|
||||
"f# c #DDDCDC",
|
||||
"g# c #DADADA",
|
||||
"h# c #DADBDA",
|
||||
"i# c #575757",
|
||||
"j# c #7E7E7E",
|
||||
"k# c #3F3E3E",
|
||||
"l# c #3E3E3D",
|
||||
"m# c #7F7F7F",
|
||||
"n# c #DCDCDB",
|
||||
"o# c #DBDBDA",
|
||||
"p# c #DADAD9",
|
||||
"q# c #B5B5B5",
|
||||
"r# c #7E7D7E",
|
||||
"s# c #3F3F3F",
|
||||
"t# c #D9D9DA",
|
||||
"u# c #D8D8D9",
|
||||
"v# c #7D7D7D",
|
||||
"w# c #414040",
|
||||
"x# c #7D7D7E",
|
||||
"y# c #DAD9DA",
|
||||
"z# c #D8D9D9",
|
||||
"A# c #D9D8D8",
|
||||
"B# c #D9D8D9",
|
||||
"C# c #7D7C7D",
|
||||
"D# c #414141",
|
||||
"E# c #3E3D3E",
|
||||
"F# c #DAD9D9",
|
||||
"G# c #D8D9D8",
|
||||
"H# c #D8D7D8",
|
||||
"I# c #D2D2D2",
|
||||
"J# c #7B7C7B",
|
||||
"K# c #424142",
|
||||
"L# c #424242",
|
||||
"M# c #7B7C7C",
|
||||
"N# c #767676",
|
||||
"O# c #D7D8D8",
|
||||
"P# c #686968",
|
||||
"Q# c #7A7B7B",
|
||||
"R# c #444243",
|
||||
"S# c #444342",
|
||||
"T# c #AEADAD",
|
||||
"U# c #DBDADA",
|
||||
"V# c #D8D7D7",
|
||||
"W# c #D6D7D6",
|
||||
"X# c #C1C0C0",
|
||||
"Y# c #454344",
|
||||
"Z# c #E0E0DF",
|
||||
"`# c #D6D7D7",
|
||||
" $ c #797979",
|
||||
".$ c #464545",
|
||||
"+$ c #454544",
|
||||
"@$ c #7A7979",
|
||||
"#$ c #D9DADA",
|
||||
"$$ c #D7D8D7",
|
||||
"%$ c #D7D7D8",
|
||||
"&$ c #D6D6D7",
|
||||
"*$ c #D5D5D6",
|
||||
"=$ c #787878",
|
||||
"-$ c #474546",
|
||||
";$ c #787879",
|
||||
">$ c #6C6C6C",
|
||||
",$ c #D7D7D6",
|
||||
"'$ c #D5D5D5",
|
||||
")$ c #777878",
|
||||
"!$ c #474646",
|
||||
"~$ c #DCDBDB",
|
||||
"{$ c #D9D9D8",
|
||||
"]$ c #D7D6D7",
|
||||
"^$ c #D6D6D5",
|
||||
"/$ c #D5D4D5",
|
||||
"($ c #737373",
|
||||
"_$ c #777777",
|
||||
":$ c #484748",
|
||||
"<$ c #494748",
|
||||
"[$ c #D5D6D5",
|
||||
"}$ c #D4D4D5",
|
||||
"|$ c #C4C4C4",
|
||||
"1$ c #494948",
|
||||
"2$ c #494848",
|
||||
"3$ c #2A2A2A",
|
||||
"4$ c #D5D5D4",
|
||||
"5$ c #D4D5D4",
|
||||
"6$ c #D3D4D4",
|
||||
"7$ c #D3D4D3",
|
||||
"8$ c #494949",
|
||||
"9$ c #4A4949",
|
||||
"0$ c #4A494A",
|
||||
"a$ c #767575",
|
||||
"b$ c #636263",
|
||||
"c$ c #D7D6D6",
|
||||
"d$ c #D6D5D6",
|
||||
"e$ c #D4D4D3",
|
||||
"f$ c #747575",
|
||||
"g$ c #4B4A4B",
|
||||
"h$ c #4B4B4B",
|
||||
"i$ c #D5D6D6",
|
||||
"j$ c #D4D5D5",
|
||||
"k$ c #D3D2D2",
|
||||
"l$ c #747473",
|
||||
"m$ c #4C4B4B",
|
||||
"n$ c #4C4B4C",
|
||||
"o$ c #747374",
|
||||
"p$ c #D1D1D2",
|
||||
"q$ c #878787",
|
||||
"r$ c #727273",
|
||||
"s$ c #4D4C4D",
|
||||
"t$ c #4D4C4C",
|
||||
"u$ c #434343",
|
||||
"v$ c #D8D8D7",
|
||||
"w$ c #D4D3D4",
|
||||
"x$ c #D2D3D2",
|
||||
"y$ c #D2D1D2",
|
||||
"z$ c #171716",
|
||||
"A$ c #717272",
|
||||
"B$ c #4E4D4D",
|
||||
"C$ c #727272",
|
||||
"D$ c #D3D3D4",
|
||||
"E$ c #D1D1D0",
|
||||
"F$ c #D0D1D1",
|
||||
"G$ c #676767",
|
||||
"H$ c #717171",
|
||||
"I$ c #4F4E4E",
|
||||
"J$ c #4E4E4E",
|
||||
"K$ c #727172",
|
||||
"L$ c #C6C6C6",
|
||||
"M$ c #D5D4D4",
|
||||
"N$ c #D3D2D3",
|
||||
"O$ c #D2D2D3",
|
||||
"P$ c #D1D2D2",
|
||||
"Q$ c #D0D0D0",
|
||||
"R$ c #707071",
|
||||
"S$ c #504F4F",
|
||||
"T$ c #504F50",
|
||||
"U$ c #707070",
|
||||
"V$ c #D2D3D3",
|
||||
"W$ c #D2D1D1",
|
||||
"X$ c #D1D0D0",
|
||||
"Y$ c #D0CFD0",
|
||||
"Z$ c #CFCFCF",
|
||||
"`$ c #505151",
|
||||
" % c #706F6F",
|
||||
".% c #515050",
|
||||
"+% c #6F6F70",
|
||||
"@% c #616161",
|
||||
"#% c #D6D5D5",
|
||||
"$% c #D3D3D2",
|
||||
"%% c #D1D0D1",
|
||||
"&% c #D0D0D1",
|
||||
"*% c #CFD0D0",
|
||||
"=% c #ABABAB",
|
||||
"-% c #6F6F6E",
|
||||
";% c #525151",
|
||||
">% c #515151",
|
||||
",% c #6F6F6F",
|
||||
"'% c #A1A1A0",
|
||||
")% c #DCDBDC",
|
||||
"!% c #D4D3D3",
|
||||
"~% c #CFCFD0",
|
||||
"{% c #D0D0CF",
|
||||
"]% c #CECFCF",
|
||||
"^% c #CECECE",
|
||||
"/% c #6E6E6E",
|
||||
"(% c #525252",
|
||||
"_% c #535252",
|
||||
":% c #CFCECE",
|
||||
"<% c #CDCECE",
|
||||
"[% c #535353",
|
||||
"}% c #6D6E6D",
|
||||
"|% c #595858",
|
||||
"1% c #D0CFCF",
|
||||
"2% c #CFCECF",
|
||||
"3% c #CECECF",
|
||||
"4% c #CECDCD",
|
||||
"5% c #CDCDCD",
|
||||
"6% c #CDCCCC",
|
||||
"7% c #555454",
|
||||
"8% c #6C6C6D",
|
||||
"9% c #D1D2D1",
|
||||
"0% c #CDCDCE",
|
||||
"a% c #6B6B6B",
|
||||
"b% c #565455",
|
||||
"c% c #565555",
|
||||
"d% c #6B6C6C",
|
||||
"e% c #CFCFCE",
|
||||
"f% c #CECFCE",
|
||||
"g% c #CECECD",
|
||||
"h% c #CDCCCD",
|
||||
"i% c #CCCCCD",
|
||||
"j% c #CBCBCB",
|
||||
"k% c #303030",
|
||||
"l% c #6B6A6A",
|
||||
"m% c #565656",
|
||||
"n% c #575656",
|
||||
"o% c #D0D1D0",
|
||||
"p% c #CFD0CF",
|
||||
"q% c #CDCECD",
|
||||
"r% c #CCCCCB",
|
||||
"s% c #CBCCCB",
|
||||
"t% c #A9A8A9",
|
||||
"u% c #6A696A",
|
||||
"v% c #575756",
|
||||
"w% c #6A6A6A",
|
||||
"x% c #CECDCE",
|
||||
"y% c #CCCBCC",
|
||||
"z% c #CBCBCC",
|
||||
"A% c #CACBCA",
|
||||
"B% c #CBCACA",
|
||||
"C% c #585758",
|
||||
"D% c #767576",
|
||||
"E% c #DBDADB",
|
||||
"F% c #CDCDCC",
|
||||
"G% c #CACACA",
|
||||
"H% c #B9BABA",
|
||||
"I% c #0D0D0D",
|
||||
"J% c #686868",
|
||||
"K% c #595959",
|
||||
"L% c #595958",
|
||||
"M% c #686869",
|
||||
"N% c #CBCCCC",
|
||||
"O% c #CBCBCA",
|
||||
"P% c #C9CAC9",
|
||||
"Q% c #C9C9CA",
|
||||
"R% c #737372",
|
||||
"S% c #5B5A59",
|
||||
"T% c #5B5A5A",
|
||||
"U% c #686767",
|
||||
"V% c #CCCDCC",
|
||||
"W% c #CBCACB",
|
||||
"X% c #CAC9C9",
|
||||
"Y% c #C9C9C9",
|
||||
"Z% c #C6C5C5",
|
||||
"`% c #666767",
|
||||
" & c #5B5B5A",
|
||||
".& c #5B5B5B",
|
||||
"+& c #1E1E1E",
|
||||
"@& c #CCCBCB",
|
||||
"#& c #C8C8C9",
|
||||
"$& c #C8C8C8",
|
||||
"%& c #656566",
|
||||
"&& c #5C5C5C",
|
||||
"*& c #5C5B5C",
|
||||
"=& c #666766",
|
||||
"-& c #B4B3B3",
|
||||
";& c #C9CACA",
|
||||
">& c #C9C9C8",
|
||||
",& c #C7C8C7",
|
||||
"'& c #C8C7C7",
|
||||
")& c #656565",
|
||||
"!& c #5D5C5D",
|
||||
"~& c #5D5D5C",
|
||||
"{& c #656665",
|
||||
"]& c #707171",
|
||||
"^& c #CCCDCD",
|
||||
"/& c #C9C8C8",
|
||||
"(& c #C7C7C8",
|
||||
"_& c #C8C7C8",
|
||||
":& c #C7C7C7",
|
||||
"<& c #C4C4C5",
|
||||
"[& c #5E5D5D",
|
||||
"}& c #656464",
|
||||
"|& c #3E3E3E",
|
||||
"1& c #CACBCB",
|
||||
"2& c #CAC9CA",
|
||||
"3& c #B4B4B3",
|
||||
"4& c #646363",
|
||||
"5& c #5F5E5F",
|
||||
"6& c #5F5E5E",
|
||||
"7& c #636364",
|
||||
"8& c #3E3F3F",
|
||||
"9& c #C9C8C9",
|
||||
"0& c #C7C8C8",
|
||||
"a& c #C6C5C6",
|
||||
"b& c #C5C6C5",
|
||||
"c& c #BDBDBD",
|
||||
"d& c #3B3C3C",
|
||||
"e& c #636363",
|
||||
"f& c #605F60",
|
||||
"g& c #605F5F",
|
||||
"h& c #5A5A5A",
|
||||
"i& c #C6C6C7",
|
||||
"j& c #C5C5C5",
|
||||
"k& c #5D5D5D",
|
||||
"l& c #5E5E5E",
|
||||
"m& c #5F5F5E",
|
||||
"n& c #626261",
|
||||
"o& c #5C5D5C",
|
||||
"p& c #666666",
|
||||
"q& c #666565",
|
||||
"r& c #656465",
|
||||
"s& c #636262",
|
||||
"t& c #626161",
|
||||
"u& c #616060",
|
||||
"v& c #616160",
|
||||
"w& c #5C5D5D",
|
||||
"x& c #5F5F5F",
|
||||
"y& c #5F6060",
|
||||
"z& c #606160",
|
||||
"A& c #626262",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . . . . ",
|
||||
" . + @ . ",
|
||||
" . . # # . . ",
|
||||
" . $ $ $ $ . ",
|
||||
" % % & & & & * * ",
|
||||
" = = = - - ; > , ",
|
||||
" ' ) ) ! ",
|
||||
" ~ { { ~ ",
|
||||
" ] ^ / ( ",
|
||||
" _ : ^ < ",
|
||||
" [ } } _ ",
|
||||
" | 1 2 3 ",
|
||||
" 4 5 6 7 ",
|
||||
" 8 9 0 4 ",
|
||||
" a b c a ",
|
||||
" d e f g ",
|
||||
" h i i h ",
|
||||
" j k l m ",
|
||||
" n o p q ",
|
||||
" r s s t ",
|
||||
" u v v u ",
|
||||
" w x y z ",
|
||||
" A B B A ",
|
||||
" C D D E ",
|
||||
" F G G H ",
|
||||
" I J K F ",
|
||||
" I L L I ",
|
||||
" M N O P ",
|
||||
" Q R S Q ",
|
||||
" T U V W ",
|
||||
" X Y Y Z ",
|
||||
" ` ...+. ",
|
||||
" ` @.#.` ",
|
||||
" $.%.&.*. ",
|
||||
" =.-.;.>. @ ,.'.).!.~.{.- @ ",
|
||||
" ].^./.(. @ D _.:.<.[.}.|.1.2.3.4.5.s @ ",
|
||||
" 6.7.8.9. 0.a.b.c.[.[.[.1.1.2.d.d.e.f.g.h.B @ ",
|
||||
" i.j.k.6. @ l.m.n.o.[.}.p.<.1.d.d.e.q.r.s.t.b.u.v.@ ",
|
||||
" w.x.y.i. @ z.A.n.B.[.[.1.1.C.2.d.d.D.r.E.b.b.b.F.G.Z y ",
|
||||
" H.I.I.H. @ J.K.K.L.|.1.1.1.C.M.D.q.N.r.O.P.Q.R.S.G.G.T.U.V. ",
|
||||
" W.X.Y.Z. `.e.o.[.[.p.}.1.d.C.D.r.N.r.E.P.b.Q.F. + +.+.+++@+#+ ",
|
||||
" $+%+&+*+ D =+L.[.<.1.1.1.C.d.-+r.r.;+;+b.F.G.Q.>+ +.+.+,+,+,+'+)+ ",
|
||||
" !+~+{+!+ $ * ]+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+$$@S#L#w#).s#l#b#5#(#,#*#Z@R@I@z@n@c@3@V.~@*@l.R+K+y+r+i+0+{.{+&+Y.I.y.k.8./.;.&.#...Y V S O L K G D B y v s p l i f c 0 6 2 } ^ / { ) - & $ # @ . . . ",
|
||||
" w&k&l&x&y&z&t&A&e&7&}&{&=&G$U%M%_.w%l%d%8%}%/%,%+%U$K$C$($o$T+a$N#_$=$;$@$2#Q#M#d@x#j#m#c#6#_#%#=#`@S@J@A@o@a@1@(@!@ @ @S+h.z+8+9+a+:+!+*+Z.H.i.6.9.(.>.*.` +.Z W Q P I F H E A z u t q m h g a 4 7 3 _ < ( ~ ! ; & $ . . . ",
|
||||
" m&r&r&x& > * . . ",
|
||||
" l&q&q&l& , * ",
|
||||
" k&p&p&k& ",
|
||||
" !&o&o&w& ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
BIN
src/Mod/Ship/Icons/DataIco.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/Mod/Ship/Icons/DataIco.xcf
Normal file
1021
src/Mod/Ship/Icons/DataIco.xpm
Normal file
BIN
src/Mod/Ship/Icons/DiscretizeIco.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
src/Mod/Ship/Icons/DiscretizeIco.xcf
Normal file
2028
src/Mod/Ship/Icons/DiscretizeIco.xpm
Normal file
BIN
src/Mod/Ship/Icons/HydrostaticsIco.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
src/Mod/Ship/Icons/HydrostaticsIco.xcf
Normal file
3323
src/Mod/Ship/Icons/HydrostaticsIco.xpm
Normal file
BIN
src/Mod/Ship/Icons/Ico.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
src/Mod/Ship/Icons/Ico.xcf
Normal file
1281
src/Mod/Ship/Icons/Ico.xpm
Normal file
BIN
src/Mod/Ship/Icons/OutlineDrawIco.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
src/Mod/Ship/Icons/OutlineDrawIco.xcf
Normal file
1824
src/Mod/Ship/Icons/OutlineDrawIco.xpm
Normal file
BIN
src/Mod/Ship/Icons/ReparametrizeIco.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/Mod/Ship/Icons/ReparametrizeIco.xcf
Normal file
1737
src/Mod/Ship/Icons/ReparametrizeIco.xpm
Normal file
BIN
src/Mod/Ship/Icons/Ship.xcf
Normal file
431
src/Mod/Ship/Icons/Ship.xpm
Normal file
|
@ -0,0 +1,431 @@
|
|||
/* XPM */
|
||||
static char * Ship_xpm[] = {
|
||||
"32 32 396 2",
|
||||
" c None",
|
||||
". c #2C2C2C",
|
||||
"+ c #3A3A3A",
|
||||
"@ c #585857",
|
||||
"# c #161616",
|
||||
"$ c #000000",
|
||||
"% c #363636",
|
||||
"& c #333333",
|
||||
"* c #B3B3B3",
|
||||
"= c #B4B4B4",
|
||||
"- c #949494",
|
||||
"; c #565653",
|
||||
"> c #141414",
|
||||
", c #080807",
|
||||
"' c #585858",
|
||||
") c #878787",
|
||||
"! c #9F9E9F",
|
||||
"~ c #9F9F9E",
|
||||
"{ c #8F8F90",
|
||||
"] c #6B6B6B",
|
||||
"^ c #101010",
|
||||
"/ c #737373",
|
||||
"( c #4C4C4C",
|
||||
"_ c #B1B1B7",
|
||||
": c #9090C0",
|
||||
"< c #A7A7B2",
|
||||
"[ c #87878E",
|
||||
"} c #4F4F52",
|
||||
"| c #191919",
|
||||
"1 c #656565",
|
||||
"2 c #D1D1D2",
|
||||
"3 c #D1D1D1",
|
||||
"4 c #CECECE",
|
||||
"5 c #CDCCCC",
|
||||
"6 c #CCCCCC",
|
||||
"7 c #CCCCCB",
|
||||
"8 c #CDCECD",
|
||||
"9 c #BDBDBD",
|
||||
"0 c #424242",
|
||||
"a c #373737",
|
||||
"b c #0A0A0A",
|
||||
"c c #241414",
|
||||
"d c #0E0C0C",
|
||||
"e c #929393",
|
||||
"f c #383738",
|
||||
"g c #9B9B9A",
|
||||
"h c #A0A0AF",
|
||||
"i c #2929E4",
|
||||
"j c #2525E5",
|
||||
"k c #3F3FD7",
|
||||
"l c #5B5BC8",
|
||||
"m c #535368",
|
||||
"n c #686866",
|
||||
"o c #C8C8C8",
|
||||
"p c #C8C8C7",
|
||||
"q c #C7C6C7",
|
||||
"r c #C6C6C6",
|
||||
"s c #C5C5C5",
|
||||
"t c #C4C5C5",
|
||||
"u c #C3C4C3",
|
||||
"v c #C3C3C2",
|
||||
"w c #BCBCBC",
|
||||
"x c #595959",
|
||||
"y c #A6A6A6",
|
||||
"z c #969696",
|
||||
"A c #0B0B0B",
|
||||
"B c #0D0707",
|
||||
"C c #894646",
|
||||
"D c #1C1A1A",
|
||||
"E c #525252",
|
||||
"F c #6C6D6C",
|
||||
"G c #A3A3A2",
|
||||
"H c #A3A296",
|
||||
"I c #8E8F98",
|
||||
"J c #6F6EA5",
|
||||
"K c #5354AF",
|
||||
"L c #373753",
|
||||
"M c #8D8D8B",
|
||||
"N c #C5C5C4",
|
||||
"O c #C2C2C2",
|
||||
"P c #C1C1C1",
|
||||
"Q c #C0C0C0",
|
||||
"R c #C0BFBF",
|
||||
"S c #BFBFBF",
|
||||
"T c #BEBEBE",
|
||||
"U c #B1B2B2",
|
||||
"V c #404040",
|
||||
"W c #ABAAAA",
|
||||
"X c #797979",
|
||||
"Y c #2A1212",
|
||||
"Z c #662828",
|
||||
"` c #3D403F",
|
||||
" . c #B5B5B5",
|
||||
".. c #6B6A6B",
|
||||
"+. c #4A4A4A",
|
||||
"@. c #9A9A9A",
|
||||
"#. c #909090",
|
||||
"$. c #8B8B8A",
|
||||
"%. c #898A86",
|
||||
"&. c #84837F",
|
||||
"*. c #3D3D3C",
|
||||
"=. c #9E9E9E",
|
||||
"-. c #BFBFBE",
|
||||
";. c #BDBEBD",
|
||||
">. c #BBBBBB",
|
||||
",. c #BABABA",
|
||||
"'. c #B9B9B9",
|
||||
"). c #B8B8B8",
|
||||
"!. c #999999",
|
||||
"~. c #BABAB9",
|
||||
"{. c #ABABAB",
|
||||
"]. c #292929",
|
||||
"^. c #381212",
|
||||
"/. c #4C1514",
|
||||
"(. c #535656",
|
||||
"_. c #717171",
|
||||
":. c #919090",
|
||||
"<. c #818181",
|
||||
"[. c #4E4E4E",
|
||||
"}. c #4B4B4B",
|
||||
"|. c #B1B1B1",
|
||||
"1. c #B8B7B8",
|
||||
"2. c #B6B6B6",
|
||||
"3. c #B6B5B5",
|
||||
"4. c #B4B5B4",
|
||||
"5. c #B2B3B2",
|
||||
"6. c #5C5D5C",
|
||||
"7. c #AFAFAF",
|
||||
"8. c #ADACAC",
|
||||
"9. c #5B5B5B",
|
||||
"0. c #410C0C",
|
||||
"a. c #3E0707",
|
||||
"b. c #525555",
|
||||
"c. c #9C9C9C",
|
||||
"d. c #2D2D2D",
|
||||
"e. c #757575",
|
||||
"f. c #474747",
|
||||
"g. c #484848",
|
||||
"h. c #9F9F9F",
|
||||
"i. c #B3B3B4",
|
||||
"j. c #B2B2B2",
|
||||
"k. c #B0B0B0",
|
||||
"l. c #ADAEAD",
|
||||
"m. c #ADADAD",
|
||||
"n. c #B0B1B0",
|
||||
"o. c #1E1E1E",
|
||||
"p. c #ACABAC",
|
||||
"q. c #AAA9A9",
|
||||
"r. c #A8A8A8",
|
||||
"s. c #5D5D5D",
|
||||
"t. c #290202",
|
||||
"u. c #281010",
|
||||
"v. c #272828",
|
||||
"w. c #767777",
|
||||
"x. c #505050",
|
||||
"y. c #1F1F1F",
|
||||
"z. c #5E5E5D",
|
||||
"A. c #A4A5A5",
|
||||
"B. c #B1B2B1",
|
||||
"C. c #AEAEAE",
|
||||
"D. c #AEADAD",
|
||||
"E. c #ABACAC",
|
||||
"F. c #AAAAAA",
|
||||
"G. c #A9A8A8",
|
||||
"H. c #ABABAC",
|
||||
"I. c #7B7B7B",
|
||||
"J. c #2B2B2B",
|
||||
"K. c #A4A4A4",
|
||||
"L. c #A6A5A6",
|
||||
"M. c #888888",
|
||||
"N. c #0E0E0E",
|
||||
"O. c #101312",
|
||||
"P. c #7E8080",
|
||||
"Q. c #5E5E5E",
|
||||
"R. c #242424",
|
||||
"S. c #555555",
|
||||
"T. c #7F7F7F",
|
||||
"U. c #A4A3A4",
|
||||
"V. c #B3B3B2",
|
||||
"W. c #ACACAC",
|
||||
"X. c #A9A9A9",
|
||||
"Y. c #A8A7A7",
|
||||
"Z. c #A7A6A7",
|
||||
"`. c #A7A7A7",
|
||||
" + c #A8A8A7",
|
||||
".+ c #A5A5A5",
|
||||
"++ c #A2A2A2",
|
||||
"@+ c #222122",
|
||||
"#+ c #7E7E7E",
|
||||
"$+ c #A3A3A3",
|
||||
"%+ c #9B9B9B",
|
||||
"&+ c #050505",
|
||||
"*+ c #6E6E6E",
|
||||
"=+ c #A7A7A6",
|
||||
"-+ c #989898",
|
||||
";+ c #A5A4A4",
|
||||
">+ c #A7A7A8",
|
||||
",+ c #A5A6A7",
|
||||
"'+ c #979A99",
|
||||
")+ c #818383",
|
||||
"!+ c #757878",
|
||||
"~+ c #757979",
|
||||
"{+ c #878A8A",
|
||||
"]+ c #A3A5A5",
|
||||
"^+ c #828282",
|
||||
"/+ c #A0A0A0",
|
||||
"(+ c #232323",
|
||||
"_+ c #939393",
|
||||
":+ c #A5A6A5",
|
||||
"<+ c #A2A3A2",
|
||||
"[+ c #A2A1A1",
|
||||
"}+ c #A1A0A1",
|
||||
"|+ c #939292",
|
||||
"1+ c #636262",
|
||||
"2+ c #554D4D",
|
||||
"3+ c #634C4C",
|
||||
"4+ c #755555",
|
||||
"5+ c #936464",
|
||||
"6+ c #9F6868",
|
||||
"7+ c #9B6060",
|
||||
"8+ c #804A4A",
|
||||
"9+ c #5C3737",
|
||||
"0+ c #1D1616",
|
||||
"a+ c #A1A1A1",
|
||||
"b+ c #010101",
|
||||
"c+ c #151516",
|
||||
"d+ c #707070",
|
||||
"e+ c #9D9E9E",
|
||||
"f+ c #8C8D8D",
|
||||
"g+ c #8B8888",
|
||||
"h+ c #726A6A",
|
||||
"i+ c #6D5959",
|
||||
"j+ c #866261",
|
||||
"k+ c #C18B8B",
|
||||
"l+ c #D79696",
|
||||
"m+ c #D18C8C",
|
||||
"n+ c #CB8180",
|
||||
"o+ c #C57575",
|
||||
"p+ c #BF6B6A",
|
||||
"q+ c #BB6161",
|
||||
"r+ c #B95958",
|
||||
"s+ c #9C4544",
|
||||
"t+ c #2E1212",
|
||||
"u+ c #6F6C6C",
|
||||
"v+ c #A0A1A1",
|
||||
"w+ c #575757",
|
||||
"x+ c #0C0C0C",
|
||||
"y+ c #9C9D9D",
|
||||
"z+ c #7A7272",
|
||||
"A+ c #876F6F",
|
||||
"B+ c #977070",
|
||||
"C+ c #C28C8C",
|
||||
"D+ c #D59595",
|
||||
"E+ c #D08A8A",
|
||||
"F+ c #C67D7D",
|
||||
"G+ c #C07272",
|
||||
"H+ c #BC6969",
|
||||
"I+ c #B85F5F",
|
||||
"J+ c #B35656",
|
||||
"K+ c #B04C4C",
|
||||
"L+ c #AB4243",
|
||||
"M+ c #A63939",
|
||||
"N+ c #591B1B",
|
||||
"O+ c #6A2121",
|
||||
"P+ c #542323",
|
||||
"Q+ c #585A5A",
|
||||
"R+ c #191515",
|
||||
"S+ c #706262",
|
||||
"T+ c #A58080",
|
||||
"U+ c #B58383",
|
||||
"V+ c #CE8F8F",
|
||||
"W+ c #CD8989",
|
||||
"X+ c #C17372",
|
||||
"Y+ c #B45656",
|
||||
"Z+ c #AF4C4C",
|
||||
"`+ c #AB4242",
|
||||
" @ c #A73A39",
|
||||
".@ c #A3302F",
|
||||
"+@ c #9F2626",
|
||||
"@@ c #8E1A1A",
|
||||
"#@ c #2C0808",
|
||||
"$@ c #91191A",
|
||||
"%@ c #2F0200",
|
||||
"&@ c #90C6FB",
|
||||
"*@ c #8BBFFB",
|
||||
"=@ c #94CBFC",
|
||||
"-@ c #AFEFFB",
|
||||
";@ c #7DABA0",
|
||||
">@ c #3C2521",
|
||||
",@ c #C88484",
|
||||
"'@ c #C57C7D",
|
||||
")@ c #C17273",
|
||||
"!@ c #B86060",
|
||||
"~@ c #AB4343",
|
||||
"{@ c #A73939",
|
||||
"]@ c #A32F2F",
|
||||
"^@ c #9B1C1D",
|
||||
"/@ c #961313",
|
||||
"(@ c #96090A",
|
||||
"_@ c #3C0202",
|
||||
":@ c #4E0202",
|
||||
"<@ c #300000",
|
||||
"[@ c #3E5378",
|
||||
"}@ c #7EABF9",
|
||||
"|@ c #84B5FC",
|
||||
"1@ c #96CDFB",
|
||||
"2@ c #B2F2FA",
|
||||
"3@ c #C4FFFA",
|
||||
"4@ c #2E3FFD",
|
||||
"5@ c #3346FD",
|
||||
"6@ c #2A3AFD",
|
||||
"7@ c #161EFE",
|
||||
"8@ c #1B25FD",
|
||||
"9@ c #1F25B4",
|
||||
"0@ c #7C6196",
|
||||
"a@ c #AA6075",
|
||||
"b@ c #AC5763",
|
||||
"c@ c #AD5155",
|
||||
"d@ c #AD4645",
|
||||
"e@ c #A83938",
|
||||
"f@ c #A3302E",
|
||||
"g@ c #A02624",
|
||||
"h@ c #9B1C1B",
|
||||
"i@ c #971311",
|
||||
"j@ c #930A09",
|
||||
"k@ c #900300",
|
||||
"l@ c #900505",
|
||||
"m@ c #660007",
|
||||
"n@ c #00000D",
|
||||
"o@ c #200112",
|
||||
"p@ c #597F88",
|
||||
"q@ c #6E97FD",
|
||||
"r@ c #384CFD",
|
||||
"s@ c #394EFD",
|
||||
"t@ c #2D3EFD",
|
||||
"u@ c #151DFE",
|
||||
"v@ c #1821FE",
|
||||
"w@ c #3C52FD",
|
||||
"x@ c #6388FC",
|
||||
"y@ c #9CD6FB",
|
||||
"z@ c #D0FFFA",
|
||||
"A@ c #AEEEFB",
|
||||
"B@ c #749FFF",
|
||||
"C@ c #3F5DFF",
|
||||
"D@ c #4165FF",
|
||||
"E@ c #525AE3",
|
||||
"F@ c #6153C4",
|
||||
"G@ c #672D8D",
|
||||
"H@ c #6C1B6A",
|
||||
"I@ c #722164",
|
||||
"J@ c #75225E",
|
||||
"K@ c #731D57",
|
||||
"L@ c #701653",
|
||||
"M@ c #690E52",
|
||||
"N@ c #5F0050",
|
||||
"O@ c #562086",
|
||||
"P@ c #11108D",
|
||||
"Q@ c #2330BE",
|
||||
"R@ c #344AE1",
|
||||
"S@ c #4E6BFF",
|
||||
"T@ c #4E6BFD",
|
||||
"U@ c #597AFC",
|
||||
"V@ c #6184FC",
|
||||
"W@ c #7099FC",
|
||||
"X@ c #8BBEFB",
|
||||
"Y@ c #95CCFB",
|
||||
"Z@ c #5B7CFC",
|
||||
"`@ c #1C26FD",
|
||||
" # c #121AFE",
|
||||
".# c #9ED7FB",
|
||||
"+# c #81B4FF",
|
||||
"@# c #6893FF",
|
||||
"## c #6997FF",
|
||||
"$# c #6695FF",
|
||||
"%# c #6390FF",
|
||||
"&# c #618DFF",
|
||||
"*# c #608DFF",
|
||||
"=# c #618EFF",
|
||||
"-# c #6391FF",
|
||||
";# c #6898FF",
|
||||
"># c #6B9AFF",
|
||||
",# c #5171ED",
|
||||
"'# c #90C4FF",
|
||||
")# c #7EABFC",
|
||||
"!# c #729CFC",
|
||||
"~# c #6287FC",
|
||||
"{# c #4761FD",
|
||||
"]# c #070AFE",
|
||||
"^# c #6084FC",
|
||||
"/# c #9AD2FB",
|
||||
"(# c #A2DDFB",
|
||||
"_# c #8ABDFB",
|
||||
":# c #2B3AFD",
|
||||
"<# c #A9E8FB",
|
||||
"[# c #B9FCFA",
|
||||
"}# c #BAFEFA",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" . + @ # $ $ $ $ $ ",
|
||||
" % & * = - ; > $ $ , ' ) ! ~ { ] & $ $ $ ",
|
||||
" ^ / ( = _ : < [ } | $ 1 2 3 4 5 6 7 6 8 9 0 a b ",
|
||||
" c d e f g h i j k l m n 4 o p q r s t u v w x y z A ",
|
||||
" B C D * E F G H I J K L M N O O P Q R S T 9 U V W O X $ ",
|
||||
" Y Z ` ...+.@.#.$.%.&.*.=.-.;.w >.>.,.'.).).!.+ ~. .{.]. ",
|
||||
" ^./.(.y _.f :.) <.[.^ }.|.).1.2.3. .4.* 5. .6.1 4.7.8.9. ",
|
||||
" 0.a.b.c./ d.e.f.| g.h.9 i.* j.|.k.7.7.l.m.n.o.@.p.q.r.s. ",
|
||||
" t.u.v.w.x.y.% z.A.).B.C.D.m.E.{.F.F.G.r.H.I.J.k.K.L.M.N. ",
|
||||
" O.P.Q.R.S.T.U.V.W.q.X.r.Y.Z.`.Y. +`..+++{.@+#+$+++%+y. ",
|
||||
" &+*+W.=+-+;+X.>+y .+K.K.y y ,+'+)+!+~+{+]+^+].$+/+$+J. ",
|
||||
" (+_+:+U.$+<+[+}+/+h.=.|+1+2+3+4+5+6+7+8+9+0+_.a+/+0 b+ ",
|
||||
" c+d+h.a+/+++e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+$ ",
|
||||
" x+f.- y+w.z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+$ ",
|
||||
" R+S+T+U+V+W+F+X+H+I+Y+Z+`+ @.@+@@@#@$@%@$ ",
|
||||
"&@*@=@-@;@>@,@'@)@H+!@Y+K+~@{@]@+@^@/@(@_@:@<@[@}@|@1@2@3@ ",
|
||||
"4@5@6@7@8@9@0@a@b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@r@s@t@u@v@w@x@y@",
|
||||
" z@A@B@C@D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@T@U@V@W@X@Y@Z@`@ #",
|
||||
" .#+#@###$#%#&#*#=#-#;#>#,#'# )#!#~#{#]#^#/#",
|
||||
" (#_#:#<#",
|
||||
" [#}#",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
39
src/Mod/Ship/InitGui.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
class ShipWorkbench ( Workbench ):
|
||||
""" @brief Workbench of Ship design module. Here toolbars & icons are append. """
|
||||
from shipUtils import Paths, Translator
|
||||
import ShipGui
|
||||
|
||||
Icon = Paths.iconsPath() + "/Ico.png"
|
||||
MenuText = str(Translator.translate("Ship design"))
|
||||
ToolTip = str(Translator.translate("Ship design"))
|
||||
|
||||
def Initialize(self):
|
||||
# ToolBar
|
||||
list = ["Ship_CreateShip", "Ship_OutlineDraw"]
|
||||
self.appendToolbar("Ship design",list)
|
||||
|
||||
# Menu
|
||||
list = ["Ship_CreateShip", "Ship_OutlineDraw"]
|
||||
self.appendMenu("Ship design",list)
|
||||
|
||||
Gui.addWorkbench(ShipWorkbench())
|
609
src/Mod/Ship/Instance.py
Normal file
|
@ -0,0 +1,609 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
import time
|
||||
|
||||
# COIN
|
||||
from pivy.coin import *
|
||||
from pivy import coin
|
||||
|
||||
# FreeCAD
|
||||
import FreeCAD,FreeCADGui
|
||||
from FreeCAD import Part, Base, Vector
|
||||
|
||||
# Ship design module
|
||||
from shipUtils import Paths, Translator, Math
|
||||
|
||||
class Ship:
|
||||
def __init__(self, obj, faces):
|
||||
""" Creates a new ship on active document.
|
||||
@param faces Ship faces (Part::Shape entities).
|
||||
"""
|
||||
self.faces = faces
|
||||
# Add uniqueness property to identify Ship instances
|
||||
obj.addProperty("App::PropertyBool","IsShip","Ship", str(Translator.translate("True if is a valid ship instance"))).IsShip=True
|
||||
# Add main dimensions
|
||||
obj.addProperty("App::PropertyLength","Length","Ship", str(Translator.translate("Ship length (Lpp) [m]"))).Length=0.0
|
||||
obj.addProperty("App::PropertyLength","Beam","Ship", str(Translator.translate("Ship beam (B) [m]"))).Beam=0.0
|
||||
obj.addProperty("App::PropertyLength","Draft","Ship", str(Translator.translate("Ship draft (T) [m]"))).Draft=0.0
|
||||
# Add shapes
|
||||
obj.addProperty("Part::PropertyPartShape","Shape","Ship", str(Translator.translate("Ship surfaces"))).Shape = Part.makeShell(self.faces)
|
||||
obj.Proxy = self
|
||||
self.obj = obj
|
||||
|
||||
def execute(self, obj):
|
||||
pass
|
||||
|
||||
def discretize(self, nS, nP):
|
||||
""" Discretize the surface.
|
||||
@param nS Number of sections
|
||||
@param nP Number of points per section
|
||||
"""
|
||||
self.obj.addProperty("App::PropertyInteger","nSections","Ship", str(Translator.translate("Number of sections"))).nSections=nS
|
||||
self.obj.addProperty("App::PropertyIntegerList","nPoints","Ship", str(Translator.translate("List of number of points per sections (accumulated histogram)"))).nPoints=[0]
|
||||
self.obj.addProperty("App::PropertyFloatList","xSection","Ship", str(Translator.translate("List of sections x coordinate"))).xSection=[]
|
||||
self.obj.addProperty("App::PropertyVectorList","mSections","Ship", str(Translator.translate("List of sections points"))).mSections=[]
|
||||
# Get bounds
|
||||
shape = self.obj.Shape
|
||||
bbox = shape.BoundBox
|
||||
x0 = bbox.XMin
|
||||
x1 = bbox.XMax
|
||||
y0 = bbox.YMin
|
||||
y1 = bbox.YMax
|
||||
z0 = bbox.ZMin
|
||||
z1 = bbox.ZMax
|
||||
# Create a set of planes to perfom edges sections
|
||||
planes = []
|
||||
dz = (z1 - z0) / (nP - 1)
|
||||
for j in range(0,nP):
|
||||
z = z0 + j*dz
|
||||
rX = x1 - x0
|
||||
rY = y1 - y0
|
||||
planes.append(Part.makePlane(4*rX,4*rY,Base.Vector(-2*rX,-2*rY,z),Base.Vector(0,0,1)))
|
||||
# Division are performed at x axis
|
||||
dx = (x1 - x0) / (nS - 1.0)
|
||||
for i in range(0,nS):
|
||||
section = []
|
||||
x = x0 + i*dx
|
||||
self.obj.xSection.append(x)
|
||||
percen = i*100 / (nS-1)
|
||||
FreeCAD.Console.PrintMessage('%d%%\n' % (percen));
|
||||
# Slice the surface to get curves
|
||||
wires = shape.slice(Vector(1.0,0.0,0.0), x)
|
||||
if not wires:
|
||||
if (i != 0) or (i != nS-1):
|
||||
msg = 'Found empty section at x=%g\n'
|
||||
msg = Translator.translate(msg)
|
||||
FreeCAD.Console.PrintWarning(msg)
|
||||
FreeCAD.Console.PrintWarning('\tThis may happens if a bad defined (or really complex) surface has been provided.\n')
|
||||
FreeCAD.Console.PrintWarning('\tPlease, ensure that this section is correct, or fix surfaces and create a new ship.\n')
|
||||
self.obj.nPoints.append(0)
|
||||
# Desarrollate wires into edges list
|
||||
edges = []
|
||||
for j in range(0,len(wires)):
|
||||
wire = wires[j].Edges
|
||||
for k in range(0,len(wire)):
|
||||
edges.append(wire[k])
|
||||
# Slice curves to get points (Length based)
|
||||
points = []
|
||||
for j in range(0,len(edges)):
|
||||
for k in range(0,nP):
|
||||
aux = self.lineFaceSection(edges[j], planes[k])
|
||||
if not aux:
|
||||
points.append(Vector(x,0,z0 + k*dz))
|
||||
for l in range(0,len(aux)):
|
||||
points.append(Vector(aux[l].X, aux[l].Y, aux[l].Z))
|
||||
# Sort section points at Y direction
|
||||
aux = []
|
||||
for j in range(0,len(points)):
|
||||
aux.append(points[j].y)
|
||||
aux.sort()
|
||||
for j in range(0,len(points)):
|
||||
section.append(Vector(points[j].x, aux[j], points[j].z))
|
||||
# Store points
|
||||
self.obj.nPoints.append(len(points))
|
||||
for j in range(0,len(points)):
|
||||
self.obj.mSections.append(points[j])
|
||||
|
||||
def lineFaceSection(self,line,surface):
|
||||
""" Returns the point of section of a line with a face
|
||||
@param line Line object, that can be a curve.
|
||||
@param surface Surface object (must be a Part::Shape)
|
||||
@return Section points array, [] if line don't cut surface
|
||||
"""
|
||||
# Get initial data
|
||||
result = []
|
||||
vertexes = line.Vertexes
|
||||
nVertex = len(vertexes)
|
||||
# Perform the cut
|
||||
section = line.cut(surface)
|
||||
# Filter all old points
|
||||
points = section.Vertexes
|
||||
nPoint = len(points)
|
||||
if nPoint <= nVertex:
|
||||
# Any valid point
|
||||
result
|
||||
for i in range(0,nPoint):
|
||||
disp = len(result)
|
||||
flag = 0
|
||||
if not Math.isAprox(points[i].X,vertexes[i-disp].X,0.0001):
|
||||
flag = flag+1
|
||||
if not Math.isAprox(points[i].Y,vertexes[i-disp].Y,0.0001):
|
||||
flag = flag+1
|
||||
if not Math.isAprox(points[i].Z,vertexes[i-disp].Z,0.0001):
|
||||
flag = flag+1
|
||||
if flag > 0:
|
||||
result.append(points[i])
|
||||
return result
|
||||
|
||||
class ViewProviderShip:
|
||||
def __init__(self, obj):
|
||||
"Set this object to the proxy object of the actual view provider"
|
||||
obj.Proxy = self
|
||||
|
||||
def getIcon(self):
|
||||
return """
|
||||
/* XPM */
|
||||
static char * Ship_xpm[] = {
|
||||
"32 32 396 2",
|
||||
" c None",
|
||||
". c #2C2C2C",
|
||||
"+ c #3A3A3A",
|
||||
"@ c #585857",
|
||||
"# c #161616",
|
||||
"$ c #000000",
|
||||
"% c #363636",
|
||||
"& c #333333",
|
||||
"* c #B3B3B3",
|
||||
"= c #B4B4B4",
|
||||
"- c #949494",
|
||||
"; c #565653",
|
||||
"> c #141414",
|
||||
", c #080807",
|
||||
"' c #585858",
|
||||
") c #878787",
|
||||
"! c #9F9E9F",
|
||||
"~ c #9F9F9E",
|
||||
"{ c #8F8F90",
|
||||
"] c #6B6B6B",
|
||||
"^ c #101010",
|
||||
"/ c #737373",
|
||||
"( c #4C4C4C",
|
||||
"_ c #B1B1B7",
|
||||
": c #9090C0",
|
||||
"< c #A7A7B2",
|
||||
"[ c #87878E",
|
||||
"} c #4F4F52",
|
||||
"| c #191919",
|
||||
"1 c #656565",
|
||||
"2 c #D1D1D2",
|
||||
"3 c #D1D1D1",
|
||||
"4 c #CECECE",
|
||||
"5 c #CDCCCC",
|
||||
"6 c #CCCCCC",
|
||||
"7 c #CCCCCB",
|
||||
"8 c #CDCECD",
|
||||
"9 c #BDBDBD",
|
||||
"0 c #424242",
|
||||
"a c #373737",
|
||||
"b c #0A0A0A",
|
||||
"c c #241414",
|
||||
"d c #0E0C0C",
|
||||
"e c #929393",
|
||||
"f c #383738",
|
||||
"g c #9B9B9A",
|
||||
"h c #A0A0AF",
|
||||
"i c #2929E4",
|
||||
"j c #2525E5",
|
||||
"k c #3F3FD7",
|
||||
"l c #5B5BC8",
|
||||
"m c #535368",
|
||||
"n c #686866",
|
||||
"o c #C8C8C8",
|
||||
"p c #C8C8C7",
|
||||
"q c #C7C6C7",
|
||||
"r c #C6C6C6",
|
||||
"s c #C5C5C5",
|
||||
"t c #C4C5C5",
|
||||
"u c #C3C4C3",
|
||||
"v c #C3C3C2",
|
||||
"w c #BCBCBC",
|
||||
"x c #595959",
|
||||
"y c #A6A6A6",
|
||||
"z c #969696",
|
||||
"A c #0B0B0B",
|
||||
"B c #0D0707",
|
||||
"C c #894646",
|
||||
"D c #1C1A1A",
|
||||
"E c #525252",
|
||||
"F c #6C6D6C",
|
||||
"G c #A3A3A2",
|
||||
"H c #A3A296",
|
||||
"I c #8E8F98",
|
||||
"J c #6F6EA5",
|
||||
"K c #5354AF",
|
||||
"L c #373753",
|
||||
"M c #8D8D8B",
|
||||
"N c #C5C5C4",
|
||||
"O c #C2C2C2",
|
||||
"P c #C1C1C1",
|
||||
"Q c #C0C0C0",
|
||||
"R c #C0BFBF",
|
||||
"S c #BFBFBF",
|
||||
"T c #BEBEBE",
|
||||
"U c #B1B2B2",
|
||||
"V c #404040",
|
||||
"W c #ABAAAA",
|
||||
"X c #797979",
|
||||
"Y c #2A1212",
|
||||
"Z c #662828",
|
||||
"` c #3D403F",
|
||||
" . c #B5B5B5",
|
||||
".. c #6B6A6B",
|
||||
"+. c #4A4A4A",
|
||||
"@. c #9A9A9A",
|
||||
"#. c #909090",
|
||||
"$. c #8B8B8A",
|
||||
"%. c #898A86",
|
||||
"&. c #84837F",
|
||||
"*. c #3D3D3C",
|
||||
"=. c #9E9E9E",
|
||||
"-. c #BFBFBE",
|
||||
";. c #BDBEBD",
|
||||
">. c #BBBBBB",
|
||||
",. c #BABABA",
|
||||
"'. c #B9B9B9",
|
||||
"). c #B8B8B8",
|
||||
"!. c #999999",
|
||||
"~. c #BABAB9",
|
||||
"{. c #ABABAB",
|
||||
"]. c #292929",
|
||||
"^. c #381212",
|
||||
"/. c #4C1514",
|
||||
"(. c #535656",
|
||||
"_. c #717171",
|
||||
":. c #919090",
|
||||
"<. c #818181",
|
||||
"[. c #4E4E4E",
|
||||
"}. c #4B4B4B",
|
||||
"|. c #B1B1B1",
|
||||
"1. c #B8B7B8",
|
||||
"2. c #B6B6B6",
|
||||
"3. c #B6B5B5",
|
||||
"4. c #B4B5B4",
|
||||
"5. c #B2B3B2",
|
||||
"6. c #5C5D5C",
|
||||
"7. c #AFAFAF",
|
||||
"8. c #ADACAC",
|
||||
"9. c #5B5B5B",
|
||||
"0. c #410C0C",
|
||||
"a. c #3E0707",
|
||||
"b. c #525555",
|
||||
"c. c #9C9C9C",
|
||||
"d. c #2D2D2D",
|
||||
"e. c #757575",
|
||||
"f. c #474747",
|
||||
"g. c #484848",
|
||||
"h. c #9F9F9F",
|
||||
"i. c #B3B3B4",
|
||||
"j. c #B2B2B2",
|
||||
"k. c #B0B0B0",
|
||||
"l. c #ADAEAD",
|
||||
"m. c #ADADAD",
|
||||
"n. c #B0B1B0",
|
||||
"o. c #1E1E1E",
|
||||
"p. c #ACABAC",
|
||||
"q. c #AAA9A9",
|
||||
"r. c #A8A8A8",
|
||||
"s. c #5D5D5D",
|
||||
"t. c #290202",
|
||||
"u. c #281010",
|
||||
"v. c #272828",
|
||||
"w. c #767777",
|
||||
"x. c #505050",
|
||||
"y. c #1F1F1F",
|
||||
"z. c #5E5E5D",
|
||||
"A. c #A4A5A5",
|
||||
"B. c #B1B2B1",
|
||||
"C. c #AEAEAE",
|
||||
"D. c #AEADAD",
|
||||
"E. c #ABACAC",
|
||||
"F. c #AAAAAA",
|
||||
"G. c #A9A8A8",
|
||||
"H. c #ABABAC",
|
||||
"I. c #7B7B7B",
|
||||
"J. c #2B2B2B",
|
||||
"K. c #A4A4A4",
|
||||
"L. c #A6A5A6",
|
||||
"M. c #888888",
|
||||
"N. c #0E0E0E",
|
||||
"O. c #101312",
|
||||
"P. c #7E8080",
|
||||
"Q. c #5E5E5E",
|
||||
"R. c #242424",
|
||||
"S. c #555555",
|
||||
"T. c #7F7F7F",
|
||||
"U. c #A4A3A4",
|
||||
"V. c #B3B3B2",
|
||||
"W. c #ACACAC",
|
||||
"X. c #A9A9A9",
|
||||
"Y. c #A8A7A7",
|
||||
"Z. c #A7A6A7",
|
||||
"`. c #A7A7A7",
|
||||
" + c #A8A8A7",
|
||||
".+ c #A5A5A5",
|
||||
"++ c #A2A2A2",
|
||||
"@+ c #222122",
|
||||
"#+ c #7E7E7E",
|
||||
"$+ c #A3A3A3",
|
||||
"%+ c #9B9B9B",
|
||||
"&+ c #050505",
|
||||
"*+ c #6E6E6E",
|
||||
"=+ c #A7A7A6",
|
||||
"-+ c #989898",
|
||||
";+ c #A5A4A4",
|
||||
">+ c #A7A7A8",
|
||||
",+ c #A5A6A7",
|
||||
"'+ c #979A99",
|
||||
")+ c #818383",
|
||||
"!+ c #757878",
|
||||
"~+ c #757979",
|
||||
"{+ c #878A8A",
|
||||
"]+ c #A3A5A5",
|
||||
"^+ c #828282",
|
||||
"/+ c #A0A0A0",
|
||||
"(+ c #232323",
|
||||
"_+ c #939393",
|
||||
":+ c #A5A6A5",
|
||||
"<+ c #A2A3A2",
|
||||
"[+ c #A2A1A1",
|
||||
"}+ c #A1A0A1",
|
||||
"|+ c #939292",
|
||||
"1+ c #636262",
|
||||
"2+ c #554D4D",
|
||||
"3+ c #634C4C",
|
||||
"4+ c #755555",
|
||||
"5+ c #936464",
|
||||
"6+ c #9F6868",
|
||||
"7+ c #9B6060",
|
||||
"8+ c #804A4A",
|
||||
"9+ c #5C3737",
|
||||
"0+ c #1D1616",
|
||||
"a+ c #A1A1A1",
|
||||
"b+ c #010101",
|
||||
"c+ c #151516",
|
||||
"d+ c #707070",
|
||||
"e+ c #9D9E9E",
|
||||
"f+ c #8C8D8D",
|
||||
"g+ c #8B8888",
|
||||
"h+ c #726A6A",
|
||||
"i+ c #6D5959",
|
||||
"j+ c #866261",
|
||||
"k+ c #C18B8B",
|
||||
"l+ c #D79696",
|
||||
"m+ c #D18C8C",
|
||||
"n+ c #CB8180",
|
||||
"o+ c #C57575",
|
||||
"p+ c #BF6B6A",
|
||||
"q+ c #BB6161",
|
||||
"r+ c #B95958",
|
||||
"s+ c #9C4544",
|
||||
"t+ c #2E1212",
|
||||
"u+ c #6F6C6C",
|
||||
"v+ c #A0A1A1",
|
||||
"w+ c #575757",
|
||||
"x+ c #0C0C0C",
|
||||
"y+ c #9C9D9D",
|
||||
"z+ c #7A7272",
|
||||
"A+ c #876F6F",
|
||||
"B+ c #977070",
|
||||
"C+ c #C28C8C",
|
||||
"D+ c #D59595",
|
||||
"E+ c #D08A8A",
|
||||
"F+ c #C67D7D",
|
||||
"G+ c #C07272",
|
||||
"H+ c #BC6969",
|
||||
"I+ c #B85F5F",
|
||||
"J+ c #B35656",
|
||||
"K+ c #B04C4C",
|
||||
"L+ c #AB4243",
|
||||
"M+ c #A63939",
|
||||
"N+ c #591B1B",
|
||||
"O+ c #6A2121",
|
||||
"P+ c #542323",
|
||||
"Q+ c #585A5A",
|
||||
"R+ c #191515",
|
||||
"S+ c #706262",
|
||||
"T+ c #A58080",
|
||||
"U+ c #B58383",
|
||||
"V+ c #CE8F8F",
|
||||
"W+ c #CD8989",
|
||||
"X+ c #C17372",
|
||||
"Y+ c #B45656",
|
||||
"Z+ c #AF4C4C",
|
||||
"`+ c #AB4242",
|
||||
" @ c #A73A39",
|
||||
".@ c #A3302F",
|
||||
"+@ c #9F2626",
|
||||
"@@ c #8E1A1A",
|
||||
"#@ c #2C0808",
|
||||
"$@ c #91191A",
|
||||
"%@ c #2F0200",
|
||||
"&@ c #90C6FB",
|
||||
"*@ c #8BBFFB",
|
||||
"=@ c #94CBFC",
|
||||
"-@ c #AFEFFB",
|
||||
";@ c #7DABA0",
|
||||
">@ c #3C2521",
|
||||
",@ c #C88484",
|
||||
"'@ c #C57C7D",
|
||||
")@ c #C17273",
|
||||
"!@ c #B86060",
|
||||
"~@ c #AB4343",
|
||||
"{@ c #A73939",
|
||||
"]@ c #A32F2F",
|
||||
"^@ c #9B1C1D",
|
||||
"/@ c #961313",
|
||||
"(@ c #96090A",
|
||||
"_@ c #3C0202",
|
||||
":@ c #4E0202",
|
||||
"<@ c #300000",
|
||||
"[@ c #3E5378",
|
||||
"}@ c #7EABF9",
|
||||
"|@ c #84B5FC",
|
||||
"1@ c #96CDFB",
|
||||
"2@ c #B2F2FA",
|
||||
"3@ c #C4FFFA",
|
||||
"4@ c #2E3FFD",
|
||||
"5@ c #3346FD",
|
||||
"6@ c #2A3AFD",
|
||||
"7@ c #161EFE",
|
||||
"8@ c #1B25FD",
|
||||
"9@ c #1F25B4",
|
||||
"0@ c #7C6196",
|
||||
"a@ c #AA6075",
|
||||
"b@ c #AC5763",
|
||||
"c@ c #AD5155",
|
||||
"d@ c #AD4645",
|
||||
"e@ c #A83938",
|
||||
"f@ c #A3302E",
|
||||
"g@ c #A02624",
|
||||
"h@ c #9B1C1B",
|
||||
"i@ c #971311",
|
||||
"j@ c #930A09",
|
||||
"k@ c #900300",
|
||||
"l@ c #900505",
|
||||
"m@ c #660007",
|
||||
"n@ c #00000D",
|
||||
"o@ c #200112",
|
||||
"p@ c #597F88",
|
||||
"q@ c #6E97FD",
|
||||
"r@ c #384CFD",
|
||||
"s@ c #394EFD",
|
||||
"t@ c #2D3EFD",
|
||||
"u@ c #151DFE",
|
||||
"v@ c #1821FE",
|
||||
"w@ c #3C52FD",
|
||||
"x@ c #6388FC",
|
||||
"y@ c #9CD6FB",
|
||||
"z@ c #D0FFFA",
|
||||
"A@ c #AEEEFB",
|
||||
"B@ c #749FFF",
|
||||
"C@ c #3F5DFF",
|
||||
"D@ c #4165FF",
|
||||
"E@ c #525AE3",
|
||||
"F@ c #6153C4",
|
||||
"G@ c #672D8D",
|
||||
"H@ c #6C1B6A",
|
||||
"I@ c #722164",
|
||||
"J@ c #75225E",
|
||||
"K@ c #731D57",
|
||||
"L@ c #701653",
|
||||
"M@ c #690E52",
|
||||
"N@ c #5F0050",
|
||||
"O@ c #562086",
|
||||
"P@ c #11108D",
|
||||
"Q@ c #2330BE",
|
||||
"R@ c #344AE1",
|
||||
"S@ c #4E6BFF",
|
||||
"T@ c #4E6BFD",
|
||||
"U@ c #597AFC",
|
||||
"V@ c #6184FC",
|
||||
"W@ c #7099FC",
|
||||
"X@ c #8BBEFB",
|
||||
"Y@ c #95CCFB",
|
||||
"Z@ c #5B7CFC",
|
||||
"`@ c #1C26FD",
|
||||
" # c #121AFE",
|
||||
".# c #9ED7FB",
|
||||
"+# c #81B4FF",
|
||||
"@# c #6893FF",
|
||||
"## c #6997FF",
|
||||
"$# c #6695FF",
|
||||
"%# c #6390FF",
|
||||
"&# c #618DFF",
|
||||
"*# c #608DFF",
|
||||
"=# c #618EFF",
|
||||
"-# c #6391FF",
|
||||
";# c #6898FF",
|
||||
"># c #6B9AFF",
|
||||
",# c #5171ED",
|
||||
"'# c #90C4FF",
|
||||
")# c #7EABFC",
|
||||
"!# c #729CFC",
|
||||
"~# c #6287FC",
|
||||
"{# c #4761FD",
|
||||
"]# c #070AFE",
|
||||
"^# c #6084FC",
|
||||
"/# c #9AD2FB",
|
||||
"(# c #A2DDFB",
|
||||
"_# c #8ABDFB",
|
||||
":# c #2B3AFD",
|
||||
"<# c #A9E8FB",
|
||||
"[# c #B9FCFA",
|
||||
"}# c #BAFEFA",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" . + @ # $ $ $ $ $ ",
|
||||
" % & * = - ; > $ $ , ' ) ! ~ { ] & $ $ $ ",
|
||||
" ^ / ( = _ : < [ } | $ 1 2 3 4 5 6 7 6 8 9 0 a b ",
|
||||
" c d e f g h i j k l m n 4 o p q r s t u v w x y z A ",
|
||||
" B C D * E F G H I J K L M N O O P Q R S T 9 U V W O X $ ",
|
||||
" Y Z ` ...+.@.#.$.%.&.*.=.-.;.w >.>.,.'.).).!.+ ~. .{.]. ",
|
||||
" ^./.(.y _.f :.) <.[.^ }.|.).1.2.3. .4.* 5. .6.1 4.7.8.9. ",
|
||||
" 0.a.b.c./ d.e.f.| g.h.9 i.* j.|.k.7.7.l.m.n.o.@.p.q.r.s. ",
|
||||
" t.u.v.w.x.y.% z.A.).B.C.D.m.E.{.F.F.G.r.H.I.J.k.K.L.M.N. ",
|
||||
" O.P.Q.R.S.T.U.V.W.q.X.r.Y.Z.`.Y. +`..+++{.@+#+$+++%+y. ",
|
||||
" &+*+W.=+-+;+X.>+y .+K.K.y y ,+'+)+!+~+{+]+^+].$+/+$+J. ",
|
||||
" (+_+:+U.$+<+[+}+/+h.=.|+1+2+3+4+5+6+7+8+9+0+_.a+/+0 b+ ",
|
||||
" c+d+h.a+/+++e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+$ ",
|
||||
" x+f.- y+w.z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+$ ",
|
||||
" R+S+T+U+V+W+F+X+H+I+Y+Z+`+ @.@+@@@#@$@%@$ ",
|
||||
"&@*@=@-@;@>@,@'@)@H+!@Y+K+~@{@]@+@^@/@(@_@:@<@[@}@|@1@2@3@ ",
|
||||
"4@5@6@7@8@9@0@a@b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@r@s@t@u@v@w@x@y@",
|
||||
" z@A@B@C@D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@T@U@V@W@X@Y@Z@`@ #",
|
||||
" .#+#@###$#%#&#*#=#-#;#>#,#'# )#!#~#{#]#^#/#",
|
||||
" (#_#:#<#",
|
||||
" [#}#",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
"""
|
||||
|
||||
def sections(obj):
|
||||
""" Returns the discretization points of sections, with the advantage
|
||||
that is a list of nSections lists, with the points.
|
||||
@param Ship object
|
||||
@return Sections points
|
||||
"""
|
||||
histogram = obj.nPoints[:]
|
||||
points = obj.mSections[:]
|
||||
sections = []
|
||||
for i in range(0, len(histogram) - 1):
|
||||
sections.append([])
|
||||
for j in range(histogram[i],histogram[i+1]):
|
||||
sections[i].append(points[j])
|
||||
return sections
|
49
src/Mod/Ship/ShipGui.py
Normal file
|
@ -0,0 +1,49 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
import FreeCAD, FreeCADGui, os
|
||||
|
||||
class CreateShip:
|
||||
def Activated(self):
|
||||
import shipCreateShip
|
||||
shipCreateShip.load()
|
||||
|
||||
def GetResources(self):
|
||||
from shipUtils import Paths, Translator
|
||||
IconPath = Paths.iconsPath() + "/Ico.png"
|
||||
MenuText = str(Translator.translate('Create a new ship'))
|
||||
ToolTip = str(Translator.translate('Create a new ship in order to work with them'))
|
||||
return {'Pixmap' : IconPath, 'MenuText': MenuText, 'ToolTip': ToolTip}
|
||||
|
||||
class OutlineDraw:
|
||||
def Activated(self):
|
||||
import shipOutlineDraw
|
||||
shipOutlineDraw.load()
|
||||
|
||||
def GetResources(self):
|
||||
from shipUtils import Paths, Translator
|
||||
IconPath = Paths.iconsPath() + "/OutlineDrawIco.png"
|
||||
MenuText = str(Translator.translate('Outline draw'))
|
||||
ToolTip = str(Translator.translate('Plot ship outline draw'))
|
||||
return {'Pixmap' : IconPath, 'MenuText': MenuText, 'ToolTip': ToolTip}
|
||||
|
||||
FreeCADGui.addCommand('Ship_CreateShip', CreateShip())
|
||||
FreeCADGui.addCommand('Ship_OutlineDraw', OutlineDraw())
|
127
src/Mod/Ship/shipCreateShip/Preview.py
Normal file
|
@ -0,0 +1,127 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# FreeCAD modules
|
||||
import FreeCAD,FreeCADGui
|
||||
from FreeCAD import Base
|
||||
from FreeCAD import Part
|
||||
# FreeCADShip modules
|
||||
from shipUtils import Paths, Translator
|
||||
|
||||
class Preview(object):
|
||||
def __init__(self):
|
||||
""" Constructor.
|
||||
"""
|
||||
self.baseLine = None
|
||||
self.baseLineLabel = None
|
||||
self.reinit()
|
||||
|
||||
def reinit(self):
|
||||
""" Reinitializate drawer.
|
||||
"""
|
||||
self.clean()
|
||||
|
||||
def update(self, L, B, T):
|
||||
""" Update the 3D view printing annotations.
|
||||
@param L Ship length.
|
||||
@param B Ship beam.
|
||||
@param T Ship draft.
|
||||
"""
|
||||
# Destroy all previous entities
|
||||
self.clean()
|
||||
# Draw base line
|
||||
xStart = -0.6*L;
|
||||
xEnd = 0.6*L;
|
||||
baseLine = Part.makeLine((xStart,0,0),(xEnd,0,0))
|
||||
Part.show(baseLine)
|
||||
objs = FreeCAD.ActiveDocument.Objects
|
||||
self.baseLine = objs[len(objs)-1]
|
||||
self.baseLine.Label = 'BaseLine'
|
||||
self.baseLineLabel = DrawText('BaseLineText', str(Translator.translate('Base line')), Base.Vector(xEnd,0,0))
|
||||
# Draw free surface
|
||||
fsLine = Part.makeLine((xStart,0,T),(xEnd,0,T))
|
||||
Part.show(fsLine)
|
||||
objs = FreeCAD.ActiveDocument.Objects
|
||||
self.fsLine = objs[len(objs)-1]
|
||||
self.fsLine.Label = 'FreeSurface'
|
||||
self.fsLineLabel = DrawText('FSText', str(Translator.translate('Free surface')), Base.Vector(xEnd,0,T))
|
||||
# Draw forward perpendicular
|
||||
zStart = -0.1*T
|
||||
zEnd = 1.1*T
|
||||
fpLine = Part.makeLine((0.5*L,0,zStart),(0.5*L,0,zEnd))
|
||||
Part.show(fpLine)
|
||||
objs = FreeCAD.ActiveDocument.Objects
|
||||
self.fpLine = objs[len(objs)-1]
|
||||
self.fpLine.Label = 'ForwardPerpendicular'
|
||||
self.fpLineLabel = DrawText('FPText', str(Translator.translate('Forward perpendicular')), Base.Vector(0.5*L,0,zEnd))
|
||||
# Draw after perpendicular
|
||||
apLine = Part.makeLine((-0.5*L,0,zStart),(-0.5*L,0,zEnd))
|
||||
Part.show(apLine)
|
||||
objs = FreeCAD.ActiveDocument.Objects
|
||||
self.apLine = objs[len(objs)-1]
|
||||
self.apLine.Label = 'AfterPerpendicular'
|
||||
self.apLineLabel = DrawText('APText', str(Translator.translate('After perpendicular')), Base.Vector(-0.5*L,0,zEnd))
|
||||
# Draw amin frame
|
||||
amLine = Part.makeLine((0,-0.5*B,zStart),(0,-0.5*B,zEnd))
|
||||
Part.show(amLine)
|
||||
objs = FreeCAD.ActiveDocument.Objects
|
||||
self.amLine = objs[len(objs)-1]
|
||||
self.amLine.Label = 'AminFrame'
|
||||
self.amLineLabel = DrawText('AMText', str(Translator.translate('Amin frame')), Base.Vector(0,-0.5*B,zEnd))
|
||||
|
||||
def clean(self):
|
||||
""" Erase all annotations from screen.
|
||||
"""
|
||||
if not self.baseLine:
|
||||
return
|
||||
FreeCAD.ActiveDocument.removeObject(self.baseLine.Name)
|
||||
FreeCAD.ActiveDocument.removeObject(self.baseLineLabel.Name)
|
||||
FreeCAD.ActiveDocument.removeObject(self.fsLine.Name)
|
||||
FreeCAD.ActiveDocument.removeObject(self.fsLineLabel.Name)
|
||||
FreeCAD.ActiveDocument.removeObject(self.fpLine.Name)
|
||||
FreeCAD.ActiveDocument.removeObject(self.fpLineLabel.Name)
|
||||
FreeCAD.ActiveDocument.removeObject(self.apLine.Name)
|
||||
FreeCAD.ActiveDocument.removeObject(self.apLineLabel.Name)
|
||||
FreeCAD.ActiveDocument.removeObject(self.amLine.Name)
|
||||
FreeCAD.ActiveDocument.removeObject(self.amLineLabel.Name)
|
||||
|
||||
def DrawText(name, string, position, displayMode="Screen", angle=0.0, justification="Left", colour=(0.00,0.00,0.00), size=12):
|
||||
""" Draws a text in a desired position.
|
||||
@param name Name of the object
|
||||
@param string Text to draw (recommended format u'')
|
||||
@param position Point to draw the text
|
||||
@param angle Counter clockwise rotation of text
|
||||
@param justification Alignement of the text ("Left", "Right" or "Center")
|
||||
@param colour Colour of the text
|
||||
@param size Font size
|
||||
@return FreeCAD annotation object
|
||||
"""
|
||||
# Create the object
|
||||
text = FreeCAD.ActiveDocument.addObject("App::Annotation",name)
|
||||
# Set the text
|
||||
text.LabelText = [string, u'']
|
||||
# Set the options
|
||||
text.Position = position
|
||||
FreeCADGui.ActiveDocument.getObject(text.Name).Rotation = angle
|
||||
FreeCADGui.ActiveDocument.getObject(text.Name).Justification = justification
|
||||
FreeCADGui.ActiveDocument.getObject(text.Name).FontSize = size
|
||||
FreeCADGui.ActiveDocument.getObject(text.Name).TextColor = colour
|
||||
FreeCADGui.ActiveDocument.getObject(text.Name).DisplayMode = displayMode
|
||||
return FreeCAD.ActiveDocument.getObject(text.Name)
|
196
src/Mod/Ship/shipCreateShip/TaskPanel.py
Normal file
|
@ -0,0 +1,196 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# FreeCAD modules
|
||||
import FreeCAD as App
|
||||
import FreeCADGui as Gui
|
||||
# Qt library
|
||||
from PyQt4 import QtGui,QtCore
|
||||
# Module
|
||||
import Preview
|
||||
import Instance
|
||||
from shipUtils import Paths, Translator
|
||||
from surfUtils import Geometry
|
||||
|
||||
class TaskPanel:
|
||||
def __init__(self):
|
||||
self.ui = Paths.modulePath() + "/shipCreateShip/TaskPanel.ui"
|
||||
self.preview = Preview.Preview()
|
||||
|
||||
def accept(self):
|
||||
self.preview.clean()
|
||||
# Create new ship instance
|
||||
obj = App.ActiveDocument.addObject("App::FeaturePython","Ship")
|
||||
ship = Instance.Ship(obj, self.faces)
|
||||
Instance.ViewProviderShip(obj.ViewObject)
|
||||
# Set main dimensions
|
||||
obj.Length = self.form.length.value()
|
||||
obj.Beam = self.form.beam.value()
|
||||
obj.Draft = self.form.draft.value()
|
||||
# Discretize it
|
||||
ship.discretize(self.form.nSections.value(), self.form.nPoints.value())
|
||||
return True
|
||||
|
||||
def reject(self):
|
||||
self.preview.clean()
|
||||
self.close()
|
||||
return True
|
||||
|
||||
def clicked(self, index):
|
||||
pass
|
||||
|
||||
def open(self):
|
||||
pass
|
||||
|
||||
def needsFullSpace(self):
|
||||
return True
|
||||
|
||||
def isAllowedAlterSelection(self):
|
||||
return False
|
||||
|
||||
def isAllowedAlterView(self):
|
||||
return True
|
||||
|
||||
def isAllowedAlterDocument(self):
|
||||
return False
|
||||
|
||||
def helpRequested(self):
|
||||
pass
|
||||
|
||||
def setupUi(self):
|
||||
mw = self.getMainWindow()
|
||||
form = mw.findChild(QtGui.QWidget, "TaskPanel")
|
||||
form.length = form.findChild(QtGui.QDoubleSpinBox, "Length")
|
||||
form.beam = form.findChild(QtGui.QDoubleSpinBox, "Beam")
|
||||
form.draft = form.findChild(QtGui.QDoubleSpinBox, "Draft")
|
||||
form.nSections = form.findChild(QtGui.QSpinBox, "NSections")
|
||||
form.nPoints = form.findChild(QtGui.QSpinBox, "NPoints")
|
||||
form.mainLogo = form.findChild(QtGui.QLabel, "MainLogo")
|
||||
iconPath = Paths.iconsPath() + "/Ico.xpm"
|
||||
form.mainLogo.setPixmap(QtGui.QPixmap(iconPath))
|
||||
self.form = form
|
||||
# Initial values
|
||||
if self.initValues():
|
||||
return True
|
||||
self.retranslateUi()
|
||||
self.preview.update(self.L, self.B, self.T)
|
||||
# Connect Signals and Slots
|
||||
QtCore.QObject.connect(form.length, QtCore.SIGNAL("valueChanged(double)"), self.onData)
|
||||
QtCore.QObject.connect(form.beam, QtCore.SIGNAL("valueChanged(double)"), self.onData)
|
||||
QtCore.QObject.connect(form.draft, QtCore.SIGNAL("valueChanged(double)"), self.onData)
|
||||
QtCore.QObject.connect(form.nSections, QtCore.SIGNAL("valueChanged(int)"), self.onDiscretization)
|
||||
QtCore.QObject.connect(form.nPoints, QtCore.SIGNAL("valueChanged(int)"), self.onDiscretization)
|
||||
|
||||
def getMainWindow(self):
|
||||
"returns the main window"
|
||||
# using QtGui.qApp.activeWindow() isn't very reliable because if another
|
||||
# widget than the mainwindow is active (e.g. a dialog) the wrong widget is
|
||||
# returned
|
||||
toplevel = QtGui.qApp.topLevelWidgets()
|
||||
for i in toplevel:
|
||||
if i.metaObject().className() == "Gui::MainWindow":
|
||||
return i
|
||||
raise Exception("No main window found")
|
||||
|
||||
def initValues(self):
|
||||
""" Set initial values for fields
|
||||
"""
|
||||
# Get objects
|
||||
self.faces = None
|
||||
selObjs = Geometry.getSelectedObjs()
|
||||
if not selObjs:
|
||||
msg = Translator.translate("All ship surfaces must be selected (Any object has been selected)\n")
|
||||
App.Console.PrintError(msg)
|
||||
return True
|
||||
self.faces = []
|
||||
for i in range(0, len(selObjs)):
|
||||
faces = Geometry.getFaces(selObjs[i])
|
||||
for j in range(0, len(faces)):
|
||||
self.faces.append(faces[j])
|
||||
if not self.faces:
|
||||
msg = Translator.translate("All ship surfaces must be selected (Any face found into selected objects)\n")
|
||||
App.Console.PrintError(msg)
|
||||
return True
|
||||
# Get bounds
|
||||
bounds = [0.0, 0.0, 0.0]
|
||||
bbox = self.faces[0].BoundBox
|
||||
bounds[0] = bbox.XLength
|
||||
bounds[1] = bbox.YLength
|
||||
bounds[2] = bbox.ZLength
|
||||
for i in range(1,len(self.faces)):
|
||||
bbox = self.faces[i].BoundBox
|
||||
if bounds[0] < bbox.XLength:
|
||||
bounds[0] = bbox.XLength
|
||||
if bounds[1] < bbox.YLength:
|
||||
bounds[1] = bbox.YLength
|
||||
if bounds[2] < bbox.ZLength:
|
||||
bounds[2] = bbox.ZLength
|
||||
# Set UI fields
|
||||
self.form.length.setMaximum(bounds[0])
|
||||
self.form.length.setValue(bounds[0])
|
||||
self.L = bounds[0]
|
||||
self.form.beam.setMaximum(2.0*bounds[1])
|
||||
self.form.beam.setValue(2.0*bounds[1])
|
||||
self.B = 2.0*bounds[1]
|
||||
self.form.draft.setMaximum(bounds[2])
|
||||
self.form.draft.setValue(0.5*bounds[2])
|
||||
self.T = 0.5*bounds[2]
|
||||
msg = Translator.translate("Ready to work\n")
|
||||
App.Console.PrintMessage(msg)
|
||||
return False
|
||||
|
||||
def retranslateUi(self):
|
||||
""" Set user interface locale strings.
|
||||
"""
|
||||
self.form.setWindowTitle(Translator.translate("Create a new ship"))
|
||||
self.form.findChild(QtGui.QLabel, "LengthLabel").setText(Translator.translate("Length"))
|
||||
self.form.findChild(QtGui.QLabel, "BeamLabel").setText(Translator.translate("Beam"))
|
||||
self.form.findChild(QtGui.QLabel, "DraftLabel").setText(Translator.translate("Draft"))
|
||||
self.form.findChild(QtGui.QLabel, "NSectionsLabel").setText(Translator.translate("Number of sections"))
|
||||
self.form.findChild(QtGui.QLabel, "NPointsLabel").setText(Translator.translate("Points per section"))
|
||||
|
||||
def onData(self, value):
|
||||
""" Method called when ship data is changed.
|
||||
Annotations must be showed.
|
||||
@param value Changed value.
|
||||
"""
|
||||
self.L = self.form.length.value()
|
||||
self.B = self.form.beam.value()
|
||||
self.T = self.form.draft.value()
|
||||
self.preview.update(self.L, self.B, self.T)
|
||||
|
||||
def onDiscretization(self, value):
|
||||
""" Method called when discretization data is changed.
|
||||
Annotations must be showed.
|
||||
@param value Changed value.
|
||||
"""
|
||||
pass
|
||||
|
||||
def close(self):
|
||||
""" Destroy all dependant objects
|
||||
"""
|
||||
|
||||
def createTask():
|
||||
panel = TaskPanel()
|
||||
Gui.Control.showDialog(panel)
|
||||
if panel.setupUi():
|
||||
Gui.Control.closeDialog(panel)
|
||||
return None
|
||||
return panel
|
299
src/Mod/Ship/shipCreateShip/TaskPanel.ui
Normal file
|
@ -0,0 +1,299 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TaskPanel</class>
|
||||
<widget class="QWidget" name="TaskPanel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>260</width>
|
||||
<height>514</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Create new ship</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QLabel" name="MainLogo">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>128</width>
|
||||
<height>128</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>128</width>
|
||||
<height>128</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>../Icons/Ico.xpm</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignHCenter|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="ShipDataBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>240</width>
|
||||
<height>160</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Ship data</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="verticalLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>20</y>
|
||||
<width>241</width>
|
||||
<height>141</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,0">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="LengthLabel">
|
||||
<property name="text">
|
||||
<string>Length</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="Length">
|
||||
<property name="decimals">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.010000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="BeamLabel">
|
||||
<property name="text">
|
||||
<string>Beam</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="Beam">
|
||||
<property name="decimals">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.010000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="leftMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="DraftLabel">
|
||||
<property name="text">
|
||||
<string>Draft</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="Draft">
|
||||
<property name="decimals">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.010000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="DiscretizationBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>240</width>
|
||||
<height>160</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Discretization</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="verticalLayoutWidget_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>20</y>
|
||||
<width>241</width>
|
||||
<height>101</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<property name="leftMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="NSectionsLabel">
|
||||
<property name="text">
|
||||
<string>Number of sections</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="NSections">
|
||||
<property name="minimum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>500</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<property name="leftMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="NPointsLabel">
|
||||
<property name="text">
|
||||
<string>Points per section</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="NPoints">
|
||||
<property name="minimum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>500</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
33
src/Mod/Ship/shipCreateShip/__init__.py
Normal file
|
@ -0,0 +1,33 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# FreeCAD modules
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
# Qt libraries
|
||||
from PyQt4 import QtGui,QtCore
|
||||
|
||||
# Main object
|
||||
import TaskPanel
|
||||
|
||||
def load():
|
||||
""" Loads the tool """
|
||||
TaskPanel.createTask()
|
92
src/Mod/Ship/shipOutlineDraw/Plot.py
Normal file
|
@ -0,0 +1,92 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# FreeCAD modules
|
||||
import FreeCAD,FreeCADGui
|
||||
from FreeCAD import Base, Part, Vector
|
||||
# FreeCADShip modules
|
||||
from shipUtils import Paths, Translator
|
||||
from surfUtils import Geometry
|
||||
|
||||
def Plot(scale, sections, shape):
|
||||
""" Creates the outline draw.
|
||||
@param scale Plane scale (format 1:scale)
|
||||
@param sections Sections computed.
|
||||
@param shape Ship surfaces shell
|
||||
@return plotted object (DocumentObject)
|
||||
"""
|
||||
msg = Translator.translate('Performing plot (Scale 1:%d)...\n' % (scale))
|
||||
FreeCAD.Console.PrintMessage(msg)
|
||||
scale = 1000.0 / scale
|
||||
# Take positions
|
||||
bounds = [0.0, 0.0, 0.0]
|
||||
bbox = shape.BoundBox
|
||||
bounds[0] = bbox.XLength
|
||||
bounds[1] = bbox.YLength
|
||||
bounds[2] = bbox.ZLength
|
||||
xTot = scale*bounds[1] + 32.0 + scale*bounds[0]
|
||||
yTot = scale*bounds[2] + 32.0 + scale*bounds[1]
|
||||
xMid = 210.0
|
||||
yMid = 185.0
|
||||
x0 = xMid - 0.5*xTot
|
||||
y0 = 297.0 - yMid - 0.5*yTot # 297 = A3_width
|
||||
# Get border
|
||||
edges = Geometry.getEdges([shape])
|
||||
border = edges[0]
|
||||
for i in range(0,len(edges)):
|
||||
border = border.oldFuse(edges[i]) # Only group objects, don't try to build more complex entities
|
||||
border = border.oldFuse(edges[i].mirror(Vector(0.0, 0.0, 0.0),Vector(0.0, 1.0, 0.0)))
|
||||
# Fuse sections & borders
|
||||
obj = sections.oldFuse(border)
|
||||
# Send to 3D view
|
||||
Part.show(obj)
|
||||
objs = FreeCAD.ActiveDocument.Objects
|
||||
obj = objs[len(objs)-1]
|
||||
# Create a new plane
|
||||
FreeCAD.ActiveDocument.addObject('Drawing::FeaturePage','OutlineDrawPlot')
|
||||
FreeCAD.ActiveDocument.OutlineDrawPlot.Template = FreeCAD.getResourceDir()+'Mod/Drawing/Templates/A3_Landscape.svg'
|
||||
# Side view
|
||||
FreeCAD.ActiveDocument.addObject('Drawing::FeatureViewPart','OutlineDrawSideView')
|
||||
FreeCAD.ActiveDocument.OutlineDrawSideView.Source = obj
|
||||
FreeCAD.ActiveDocument.OutlineDrawSideView.Direction = (1.0,0.0,0.0)
|
||||
FreeCAD.ActiveDocument.OutlineDrawSideView.Rotation = -90.0
|
||||
FreeCAD.ActiveDocument.OutlineDrawSideView.Scale = scale
|
||||
FreeCAD.ActiveDocument.OutlineDrawSideView.X = 420.0 - x0 - 0.5*scale*bounds[1] # 420 = A3_height
|
||||
FreeCAD.ActiveDocument.OutlineDrawSideView.Y = y0 + 0.5*scale*bounds[2]
|
||||
FreeCAD.ActiveDocument.OutlineDrawPlot.addObject(FreeCAD.ActiveDocument.OutlineDrawSideView)
|
||||
# Front view
|
||||
FreeCAD.ActiveDocument.addObject('Drawing::FeatureViewPart','OutlineDrawFrontView')
|
||||
FreeCAD.ActiveDocument.OutlineDrawFrontView.Source = obj
|
||||
FreeCAD.ActiveDocument.OutlineDrawFrontView.Direction = (0.0,1.0,0.0)
|
||||
FreeCAD.ActiveDocument.OutlineDrawFrontView.Rotation = -90.0
|
||||
FreeCAD.ActiveDocument.OutlineDrawFrontView.Scale = scale
|
||||
FreeCAD.ActiveDocument.OutlineDrawFrontView.X = 420.0 - x0 - scale*bounds[1] - 32 - 0.5*scale*bounds[0]
|
||||
FreeCAD.ActiveDocument.OutlineDrawFrontView.Y = y0 + 0.5*scale*bounds[2]
|
||||
FreeCAD.ActiveDocument.OutlineDrawPlot.addObject(FreeCAD.ActiveDocument.OutlineDrawFrontView)
|
||||
# Up view
|
||||
FreeCAD.ActiveDocument.addObject('Drawing::FeatureViewPart','OutlineDrawUpView')
|
||||
FreeCAD.ActiveDocument.OutlineDrawUpView.Source = obj
|
||||
FreeCAD.ActiveDocument.OutlineDrawUpView.Direction = (0.0,0.0,1.0)
|
||||
FreeCAD.ActiveDocument.OutlineDrawUpView.Scale = scale
|
||||
FreeCAD.ActiveDocument.OutlineDrawUpView.X = 420.0 - x0 - scale*bounds[1] - 32 - 0.5*scale*bounds[0]
|
||||
FreeCAD.ActiveDocument.OutlineDrawUpView.Y = y0 + scale*bounds[2] + 32
|
||||
FreeCAD.ActiveDocument.OutlineDrawPlot.addObject(FreeCAD.ActiveDocument.OutlineDrawUpView)
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
return obj
|
123
src/Mod/Ship/shipOutlineDraw/Preview.py
Normal file
|
@ -0,0 +1,123 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# FreeCAD modules
|
||||
import FreeCAD,FreeCADGui
|
||||
from FreeCAD import Base, Part, Vector
|
||||
# FreeCADShip modules
|
||||
from shipUtils import Paths, Translator
|
||||
|
||||
class Preview(object):
|
||||
def __init__(self):
|
||||
""" Constructor.
|
||||
"""
|
||||
self.obj = None
|
||||
self.reinit()
|
||||
|
||||
def reinit(self):
|
||||
""" Reinitializate drawer.
|
||||
"""
|
||||
self.clean()
|
||||
|
||||
def update(self, L, B, T, sectionsL, sectionsB, sectionsT, shape):
|
||||
""" Update the 3D view printing annotations.
|
||||
@param L Ship Lpp.
|
||||
@param B Ship beam.
|
||||
@param T Ship draft.
|
||||
@param sectionsL Transversal sections.
|
||||
@param sectionsB Longitudinal sections.
|
||||
@param sectionsT Water lines.
|
||||
@param shape Ship surfaces shell
|
||||
@return Sections object. None if errors happens.
|
||||
"""
|
||||
FreeCAD.Console.PrintMessage(Translator.translate('Computing sections...\n'))
|
||||
# Destroy all previous entities
|
||||
self.clean()
|
||||
# Receive data
|
||||
nL = len(sectionsL)
|
||||
nB = len(sectionsB)
|
||||
nT = len(sectionsT)
|
||||
if not (nL or nB or nT):
|
||||
return None
|
||||
# Found sections
|
||||
sections = []
|
||||
for i in range(0,nL):
|
||||
pos = sectionsL[i]
|
||||
section = shape.slice(Vector(1.0,0.0,0.0), pos)
|
||||
for j in range(0,len(section)):
|
||||
edges = section[j].Edges
|
||||
if pos == 0.0:
|
||||
section[j] = section[j].mirror(Vector(0.0, 0.0, 0.0),Vector(0.0, 1.0, 0.0))
|
||||
edges2 = section[j].Edges
|
||||
for k in range(0,len(edges2)):
|
||||
edges.append(edges2[k])
|
||||
elif pos < 0:
|
||||
section[j] = section[j].mirror(Vector(0.0, 0.0, 0.0),Vector(0.0, 1.0, 0.0))
|
||||
edges = section[j].Edges
|
||||
for k in range(0,len(edges)):
|
||||
sections.append(edges[k])
|
||||
for i in range(0,nB):
|
||||
pos = sectionsB[i]
|
||||
section = shape.slice(Vector(0.0,1.0,0.0), pos)
|
||||
for j in range(0,len(section)):
|
||||
edges = section[j].Edges
|
||||
section[j] = section[j].mirror(Vector(0.0, 0.0, 0.0),Vector(0.0, 1.0, 0.0))
|
||||
edges2 = section[j].Edges
|
||||
for k in range(0,len(edges2)):
|
||||
edges.append(edges2[k])
|
||||
for k in range(0,len(edges)):
|
||||
sections.append(edges[k])
|
||||
for i in range(0,nT):
|
||||
pos = sectionsT[i]
|
||||
section = shape.slice(Vector(0.0,0.0,1.0), pos)
|
||||
for j in range(0,len(section)):
|
||||
edges = section[j].Edges
|
||||
if pos == T:
|
||||
section[j] = section[j].mirror(Vector(0.0, 0.0, 0.0),Vector(0.0, 1.0, 0.0))
|
||||
edges2 = section[j].Edges
|
||||
for k in range(0,len(edges2)):
|
||||
edges.append(edges2[k])
|
||||
elif pos > T:
|
||||
section[j] = section[j].mirror(Vector(0.0, 0.0, 0.0),Vector(0.0, 1.0, 0.0))
|
||||
edges = section[j].Edges
|
||||
for k in range(0,len(edges)):
|
||||
sections.append(edges[k])
|
||||
# Convert all BSplines into a shape
|
||||
if not sections:
|
||||
msg = Translator.translate('Any valid ship section found\n')
|
||||
FreeCAD.Console.PrintWarning(msg)
|
||||
return
|
||||
obj = sections[0]
|
||||
for i in range(1,len(sections)):
|
||||
obj = obj.oldFuse(sections[i]) # Only group the edges, don't try to build more complex entities
|
||||
# Create the representable object
|
||||
Part.show(obj)
|
||||
objs = FreeCAD.ActiveDocument.Objects
|
||||
self.obj = objs[len(objs)-1]
|
||||
self.obj.Label = 'OutlineDraw'
|
||||
return self.obj
|
||||
|
||||
def clean(self):
|
||||
""" Erase all annotations from screen.
|
||||
"""
|
||||
if not self.obj:
|
||||
return
|
||||
FreeCAD.ActiveDocument.removeObject(self.obj.Name)
|
||||
self.obj = None
|
332
src/Mod/Ship/shipOutlineDraw/TaskPanel.py
Normal file
|
@ -0,0 +1,332 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# FreeCAD modules
|
||||
import FreeCAD as App
|
||||
import FreeCADGui as Gui
|
||||
# Qt library
|
||||
from PyQt4 import QtGui,QtCore
|
||||
# Module
|
||||
import Preview, Plot
|
||||
import Instance
|
||||
from shipUtils import Paths, Translator
|
||||
from surfUtils import Geometry
|
||||
|
||||
class TaskPanel:
|
||||
def __init__(self):
|
||||
self.ui = Paths.modulePath() + "/shipOutlineDraw/TaskPanel.ui"
|
||||
self.ship = None
|
||||
self.skip = False
|
||||
self.LSections = []
|
||||
self.BSections = []
|
||||
self.TSections = []
|
||||
self.obj = None
|
||||
self.preview = Preview.Preview()
|
||||
|
||||
def accept(self):
|
||||
self.saveSections()
|
||||
self.obj = Plot.Plot(self.form.scale.value(), self.obj.Shape, self.ship.Shape)
|
||||
self.preview.clean()
|
||||
self.obj.Label = 'OutlineDraw'
|
||||
return True
|
||||
|
||||
def reject(self):
|
||||
self.preview.clean()
|
||||
return True
|
||||
|
||||
def clicked(self, index):
|
||||
pass
|
||||
|
||||
def open(self):
|
||||
pass
|
||||
|
||||
def needsFullSpace(self):
|
||||
return True
|
||||
|
||||
def isAllowedAlterSelection(self):
|
||||
return False
|
||||
|
||||
def isAllowedAlterView(self):
|
||||
return True
|
||||
|
||||
def isAllowedAlterDocument(self):
|
||||
return False
|
||||
|
||||
def helpRequested(self):
|
||||
pass
|
||||
|
||||
def setupUi(self):
|
||||
mw = self.getMainWindow()
|
||||
form = mw.findChild(QtGui.QWidget, "TaskPanel")
|
||||
form.sections = form.findChild(QtGui.QTableWidget, "Sections")
|
||||
form.sections.setInputMethodHints(QtCore.Qt.ImhFormattedNumbersOnly)
|
||||
form.sectionType = form.findChild(QtGui.QComboBox, "SectionType")
|
||||
form.deleteButton = form.findChild(QtGui.QPushButton, "DeleteButton")
|
||||
form.nSections = form.findChild(QtGui.QSpinBox, "NSections")
|
||||
form.createButton = form.findChild(QtGui.QPushButton, "CreateButton")
|
||||
form.scale = form.findChild(QtGui.QSpinBox, "Scale")
|
||||
self.form = form
|
||||
# Initial values
|
||||
if self.initValues():
|
||||
return True
|
||||
self.retranslateUi()
|
||||
self.obj = self.preview.update(self.ship.Length, self.ship.Beam, self.ship.Draft, self.LSections,self.BSections,self.TSections, self.ship.Shape)
|
||||
# Connect Signals and Slots
|
||||
QtCore.QObject.connect(form.sectionType,QtCore.SIGNAL("activated(QString)"),self.onSectionType)
|
||||
QtCore.QObject.connect(form.sections,QtCore.SIGNAL("cellChanged(int,int)"),self.onTableItem);
|
||||
QtCore.QObject.connect(form.deleteButton,QtCore.SIGNAL("pressed()"),self.onDeleteButton)
|
||||
QtCore.QObject.connect(form.createButton,QtCore.SIGNAL("pressed()"),self.onCreateButton)
|
||||
|
||||
def getMainWindow(self):
|
||||
"returns the main window"
|
||||
# using QtGui.qApp.activeWindow() isn't very reliable because if another
|
||||
# widget than the mainwindow is active (e.g. a dialog) the wrong widget is
|
||||
# returned
|
||||
toplevel = QtGui.qApp.topLevelWidgets()
|
||||
for i in toplevel:
|
||||
if i.metaObject().className() == "Gui::MainWindow":
|
||||
return i
|
||||
raise Exception("No main window found")
|
||||
|
||||
def initValues(self):
|
||||
""" Set initial values for fields
|
||||
"""
|
||||
# Get selected objects
|
||||
selObjs = Geometry.getSelectedObjs()
|
||||
if not selObjs:
|
||||
msg = Translator.translate("Ship instance must be selected (any object selected)\n")
|
||||
App.Console.PrintError(msg)
|
||||
return True
|
||||
for i in range(0,len(selObjs)):
|
||||
obj = selObjs[i]
|
||||
# Test if is a ship instance
|
||||
props = obj.PropertiesList
|
||||
try:
|
||||
props.index("IsShip")
|
||||
except ValueError:
|
||||
continue
|
||||
if obj.IsShip:
|
||||
# Test if another ship already selected
|
||||
if self.ship:
|
||||
msg = Translator.translate("More than one ship selected (extra ship will be neglected)\n")
|
||||
App.Console.PrintWarning(msg)
|
||||
break
|
||||
self.ship = obj
|
||||
# Test if any valid ship was selected
|
||||
if not self.ship:
|
||||
msg = Translator.translate("Ship instance must be selected (any valid ship found at selected objects)\n")
|
||||
App.Console.PrintError(msg)
|
||||
return True
|
||||
# Load sections (if exist)
|
||||
self.loadSections()
|
||||
msg = Translator.translate("Ready to work\n")
|
||||
App.Console.PrintMessage(msg)
|
||||
return False
|
||||
|
||||
def retranslateUi(self):
|
||||
""" Set user interface locale strings.
|
||||
"""
|
||||
self.form.setWindowTitle(Translator.translate("Outline draw"))
|
||||
self.form.findChild(QtGui.QGroupBox, "AutoCreateBox").setTitle(Translator.translate("Auto create"))
|
||||
self.form.findChild(QtGui.QGroupBox, "ScaleBox").setTitle(Translator.translate("Scale"))
|
||||
self.form.findChild(QtGui.QPushButton, "DeleteButton").setText(Translator.translate("Delete all sections"))
|
||||
self.form.findChild(QtGui.QPushButton, "CreateButton").setText(Translator.translate("Create sections"))
|
||||
self.form.findChild(QtGui.QComboBox, "SectionType").setItemText(0, Translator.translate("Transversal"))
|
||||
self.form.findChild(QtGui.QComboBox, "SectionType").setItemText(1, Translator.translate("Longitudinal"))
|
||||
self.form.findChild(QtGui.QComboBox, "SectionType").setItemText(2, Translator.translate("Water lines"))
|
||||
|
||||
def onSectionType(self):
|
||||
""" Function called when the section type is changed.
|
||||
"""
|
||||
# Search section type
|
||||
ID = self.form.sectionType.currentIndex()
|
||||
self.setSectionType(ID)
|
||||
|
||||
def setSectionType(self, ID):
|
||||
""" Function that set the type section related table.
|
||||
@param ID Id of the section to set: \n
|
||||
0 = Transversal sections \n
|
||||
1 = Longitudinal sections \n
|
||||
2 = Water lines
|
||||
"""
|
||||
SectionList = []
|
||||
if ID == 0:
|
||||
SectionList = self.LSections[:]
|
||||
elif ID == 1:
|
||||
SectionList = self.BSections[:]
|
||||
elif ID == 2:
|
||||
SectionList = self.TSections[:]
|
||||
nRow = len(SectionList)
|
||||
self.form.sections.clearContents()
|
||||
self.form.sections.setRowCount(nRow+1)
|
||||
if not nRow:
|
||||
self.obj = self.preview.update(self.ship.Length, self.ship.Beam, self.ship.Draft, self.LSections,self.BSections,self.TSections, self.ship.Shape)
|
||||
return
|
||||
self.skip = True # Avoid recursive call to OnItem
|
||||
for i in range(0,nRow):
|
||||
if i == nRow-1:
|
||||
self.skip = False
|
||||
string = '%f' % (SectionList[i])
|
||||
item = QtGui.QTableWidgetItem(string)
|
||||
self.form.sections.setItem(i,0,item)
|
||||
|
||||
def onTableItem(self, row, column):
|
||||
""" Function called when an item of table is changed.
|
||||
@param row Changed item row
|
||||
@param column Changed item column
|
||||
"""
|
||||
if self.skip:
|
||||
return
|
||||
# Ensure that exist one empty item at least
|
||||
nRow = self.form.sections.rowCount()
|
||||
item = self.form.sections.item(nRow-1,0)
|
||||
if item :
|
||||
if(item.text() != ''):
|
||||
self.form.sections.setRowCount(nRow+1)
|
||||
# Ensure that new item is a number
|
||||
item = self.form.sections.item(row,column)
|
||||
(number,flag) = item.text().toFloat()
|
||||
if not flag:
|
||||
number = 0.0
|
||||
string = '%f' % (number)
|
||||
item.setText(string)
|
||||
# Regenerate the list
|
||||
SectionList = []
|
||||
for i in range(0,nRow):
|
||||
item = self.form.sections.item(i,0)
|
||||
if item:
|
||||
(number,flag) = item.text().toFloat()
|
||||
SectionList.append(number)
|
||||
# Paste it into the class list
|
||||
ID = self.form.sectionType.currentIndex()
|
||||
if ID == 0:
|
||||
self.LSections = SectionList[:]
|
||||
elif ID == 1:
|
||||
self.BSections = SectionList[:]
|
||||
elif ID == 2:
|
||||
self.TSections = SectionList[:]
|
||||
self.obj = self.preview.update(self.ship.Length, self.ship.Beam, self.ship.Draft, self.LSections,self.BSections,self.TSections, self.ship.Shape)
|
||||
|
||||
def onDeleteButton(self):
|
||||
""" Function called when the delete button is pressed.
|
||||
All sections mustt be erased
|
||||
"""
|
||||
self.form.sections.clearContents()
|
||||
self.form.sections.setRowCount(1)
|
||||
# Clear active list
|
||||
ID = self.form.sectionType.currentIndex()
|
||||
if ID == 0:
|
||||
self.LSections = []
|
||||
elif ID == 1:
|
||||
self.BSections = []
|
||||
elif ID == 2:
|
||||
self.TSections = []
|
||||
self.setSectionType(ID)
|
||||
|
||||
def onCreateButton(self):
|
||||
""" Function called when create button is pressed.
|
||||
Several sections must be added to list
|
||||
"""
|
||||
# Recolect data
|
||||
nSections = self.form.nSections.value()
|
||||
SectionList = []
|
||||
L = 0.0
|
||||
ID = self.form.sectionType.currentIndex()
|
||||
if ID == 0:
|
||||
L = self.ship.Length
|
||||
d = L / (nSections-1) # Distance between sections
|
||||
start = - L/2.0 # Ship must have 0.0 at coordinates origin
|
||||
elif ID == 1:
|
||||
L = -0.5*self.ship.Beam # Ship must be in y<0.0
|
||||
d = L / (nSections+1.0) # Distance between sections
|
||||
start = d
|
||||
elif ID == 2:
|
||||
L = self.ship.Draft
|
||||
d = L / (nSections) # Distance between sections
|
||||
start = d
|
||||
# Calculate sections
|
||||
for i in range(0,nSections):
|
||||
sec = i*d + start
|
||||
SectionList.append(sec)
|
||||
# Paste into class table
|
||||
if ID == 0:
|
||||
self.LSections = SectionList[:]
|
||||
elif ID == 1:
|
||||
self.BSections = SectionList[:]
|
||||
elif ID == 2:
|
||||
self.TSections = SectionList[:]
|
||||
# Print the table
|
||||
self.setSectionType(ID)
|
||||
|
||||
def loadSections(self):
|
||||
""" Loads from ship object previously selected sections.
|
||||
"""
|
||||
# Load sections
|
||||
props = self.ship.PropertiesList
|
||||
flag=True
|
||||
try:
|
||||
props.index("LSections")
|
||||
except ValueError:
|
||||
flag=False
|
||||
if flag:
|
||||
self.LSections = self.ship.LSections[:]
|
||||
self.BSections = self.ship.BSections[:]
|
||||
self.TSections = self.ship.TSections[:]
|
||||
# Load scale too
|
||||
flag=True
|
||||
try:
|
||||
props.index("PlotScale")
|
||||
except ValueError:
|
||||
flag=False
|
||||
if flag:
|
||||
self.form.scale.setValue(self.ship.PlotScale)
|
||||
# Set UI
|
||||
self.setSectionType(self.form.sectionType.currentIndex())
|
||||
|
||||
def saveSections(self):
|
||||
""" Save selected sections into ship object.
|
||||
"""
|
||||
# Test if previous section have been created
|
||||
props = self.ship.PropertiesList
|
||||
try:
|
||||
props.index("LSections")
|
||||
except ValueError:
|
||||
# Create new sections list
|
||||
self.ship.addProperty("App::PropertyFloatList","LSections","Ship", str(Translator.translate("Transversal sections position [m]"))).LSections=[]
|
||||
self.ship.addProperty("App::PropertyFloatList","BSections","Ship", str(Translator.translate("Longitudinal sections position [m]"))).BSections=[]
|
||||
self.ship.addProperty("App::PropertyFloatList","TSections","Ship", str(Translator.translate("Water lines position [m]"))).TSections=[]
|
||||
# Save sections
|
||||
self.ship.LSections = self.LSections[:]
|
||||
self.ship.BSections = self.BSections[:]
|
||||
self.ship.TSections = self.TSections[:]
|
||||
# Save also scale
|
||||
try:
|
||||
props.index("PlotScale")
|
||||
except ValueError:
|
||||
self.ship.addProperty("App::PropertyInteger","PlotScale","Ship", str(Translator.translate("Plot scale (1:scale format)"))).PlotScale=250
|
||||
self.ship.PlotScale = self.form.scale.value()
|
||||
|
||||
def createTask():
|
||||
panel = TaskPanel()
|
||||
Gui.Control.showDialog(panel)
|
||||
if panel.setupUi():
|
||||
Gui.Control.closeDialog(panel)
|
||||
return None
|
||||
return panel
|
277
src/Mod/Ship/shipOutlineDraw/TaskPanel.ui
Normal file
|
@ -0,0 +1,277 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TaskPanel</class>
|
||||
<widget class="QWidget" name="TaskPanel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>298</width>
|
||||
<height>402</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Outline draw</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QComboBox" name="SectionType">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>142</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>160</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="minimumContentsLength">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Transversal</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Longitudinal</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Water lines</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="DeleteButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>142</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>160</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Delete all sections</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="AutoCreateBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>142</width>
|
||||
<height>256</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>160</width>
|
||||
<height>350</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Auto create</string>
|
||||
</property>
|
||||
<widget class="QSpinBox" name="NSections">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>30</y>
|
||||
<width>142</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>142</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>160</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="CreateButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>70</y>
|
||||
<width>142</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>142</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>160</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Create sections</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="Sections">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>128</width>
|
||||
<height>256</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>128</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="rowCount">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<row/>
|
||||
<column/>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QGroupBox" name="ScaleBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>128</width>
|
||||
<height>72</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>256</width>
|
||||
<height>96</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Plane scale</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>30</y>
|
||||
<width>251</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="ScaleLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="Scale">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>250</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
33
src/Mod/Ship/shipOutlineDraw/__init__.py
Normal file
|
@ -0,0 +1,33 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# FreeCAD modules
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
# Qt libraries
|
||||
from PyQt4 import QtGui,QtCore
|
||||
|
||||
# Main object
|
||||
import TaskPanel
|
||||
|
||||
def load():
|
||||
""" Loads the tool """
|
||||
TaskPanel.createTask()
|
54
src/Mod/Ship/shipUtils/Math.py
Normal file
|
@ -0,0 +1,54 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
def isAprox(a,b,tol=0.0001):
|
||||
"""returns if a value is into (b-tol,b+tol)
|
||||
@param a Value to compare.
|
||||
@param b Center of valid interval
|
||||
@param tol Radius of valid interval
|
||||
@return True if a is into (b-tol,b+tol), False otherwise
|
||||
"""
|
||||
if (a < b+abs(tol)) and (a > b-abs(tol)):
|
||||
return True
|
||||
return False
|
||||
|
||||
def isSamePoint(a,b,tol=0.0001):
|
||||
"""returns if two points are the same with a provided tolerance
|
||||
@param a Point to compare.
|
||||
@param b Reference point.
|
||||
@param tol Radius of valid interval
|
||||
@return True if twice point are the same, False otherwise
|
||||
@note FreeCAD::Base::Vector types must be provided
|
||||
"""
|
||||
if isAprox(a.x,b.x,tol) and isAprox(a.y,b.y,tol) and isAprox(a.z,b.z,tol):
|
||||
return True
|
||||
return False
|
||||
|
||||
def isSameVertex(a,b,tol=0.0001):
|
||||
"""returns if two points are the same with a provided tolerance
|
||||
@param a Point to compare.
|
||||
@param b Reference point.
|
||||
@param tol Radius of valid interval
|
||||
@return True if twice point are the same, False otherwise
|
||||
@note FreeCAD::Part::Vertex types must be provided
|
||||
"""
|
||||
if isAprox(a.X,b.X,tol) and isAprox(a.Y,b.Y,tol) and isAprox(a.Z,b.Z,tol):
|
||||
return True
|
||||
return False
|
52
src/Mod/Ship/shipUtils/Paths.py
Normal file
|
@ -0,0 +1,52 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
import FreeCAD, FreeCADGui, os
|
||||
|
||||
def modulePath():
|
||||
"""returns the current Ship design module path
|
||||
@return Module path"""
|
||||
path1 = FreeCAD.ConfigGet("AppHomePath") + "Mod/Ship"
|
||||
path2 = FreeCAD.ConfigGet("UserAppData") + "Mod/Ship"
|
||||
if os.path.exists(path2):
|
||||
return path2
|
||||
else:
|
||||
return path1
|
||||
|
||||
def iconsPath():
|
||||
"""returns the current Ship design module icons path
|
||||
@return Icons path"""
|
||||
path = modulePath() + "/Icons"
|
||||
return path
|
||||
|
||||
def getPathFromFile(fileName):
|
||||
""" Gets the directory path from a file name
|
||||
@param fileName Name of the file
|
||||
@return Directory path.
|
||||
"""
|
||||
if not fileName:
|
||||
return ''
|
||||
i = 1
|
||||
try:
|
||||
while 1:
|
||||
i = fileName.index("/", i+1)
|
||||
except ValueError:
|
||||
pass
|
||||
return fileName[0:i+1]
|
27
src/Mod/Ship/shipUtils/Translator.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
import FreeCAD, FreeCADGui, os
|
||||
from PyQt4 import QtCore,QtGui
|
||||
|
||||
def translate(text,context="ship"):
|
||||
"convenience function for Qt translator"
|
||||
return QtGui.QApplication.translate(context, text, None,
|
||||
QtGui.QApplication.UnicodeUTF8)
|
22
src/Mod/Ship/shipUtils/__init__.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# Author: Jose Luis Cercos Pita <jlcercos@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# Empty file to treat the folder as a package
|
||||
|