From 6153b0d1660c3e714e4a040efc2544c9e4336e6c Mon Sep 17 00:00:00 2001 From: miks1965 Date: Sun, 7 Jan 2018 22:58:34 +0300 Subject: [PATCH] HelixViewport.DLL 2018 --- Compiler/Compiler.cs | 1 + Configuration/GlobalAssemblyInfo.cs | 4 +-- Configuration/GlobalAssemblyInfo.cs.tmpl | 2 +- Configuration/Version.defs | 4 +-- ReleaseGenerators/PascalABCNET_end.nsh | 3 +++ ReleaseGenerators/PascalABCNET_version.nsh | 2 +- ReleaseGenerators/sect_Core.nsh | 4 +++ TestSuite/CompilationSamples/graph3d.pas | 15 +++++------ _RegisterHelix.bat | 4 ++- bin/Lib/Graph3D.pas | 28 +++++++++++++++------ bin/Lib/HelixToolkit.dll | Bin 0 -> 5632 bytes 11 files changed, 46 insertions(+), 21 deletions(-) create mode 100644 bin/Lib/HelixToolkit.dll diff --git a/Compiler/Compiler.cs b/Compiler/Compiler.cs index 870e30795..440d20687 100644 --- a/Compiler/Compiler.cs +++ b/Compiler/Compiler.cs @@ -2866,6 +2866,7 @@ namespace PascalABCCompiler directives.Add(new TreeRealization.compiler_directive("reference", "%GAC%\\WindowsBase.dll", null)); directives.Add(new TreeRealization.compiler_directive("reference", "%GAC%\\PresentationCore.dll", null)); directives.Add(new TreeRealization.compiler_directive("reference", "%GAC%\\HelixToolkit.Wpf.dll", null)); + directives.Add(new TreeRealization.compiler_directive("reference", "%GAC%\\HelixToolkit.dll", null)); } } } diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 03a26a960..9b330c0ec 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -5,7 +5,7 @@ using System.Runtime.CompilerServices; [assembly: AssemblyDelaySign(false)] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("PascalABC.NET Compiler")] -[assembly: AssemblyCopyright("Copyright © 2005-2017 by Ivan Bondarev, Stanislav Mihalkovich")] +[assembly: AssemblyCopyright("Copyright © 2005-2018 by Ivan Bondarev, Stanislav Mihalkovich")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion(RevisionClass.FullVersion)] @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "3"; public const string Build = "0"; - public const string Revision = "1611"; + public const string Revision = "1612"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/GlobalAssemblyInfo.cs.tmpl b/Configuration/GlobalAssemblyInfo.cs.tmpl index f33bf75da..04c908f22 100644 --- a/Configuration/GlobalAssemblyInfo.cs.tmpl +++ b/Configuration/GlobalAssemblyInfo.cs.tmpl @@ -5,7 +5,7 @@ using System.Runtime.CompilerServices; [assembly: AssemblyDelaySign(false)] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("PascalABC.NET Compiler")] -[assembly: AssemblyCopyright("Copyright © 2005-2017 by Ivan Bondarev, Stanislav Mihalkovich")] +[assembly: AssemblyCopyright("Copyright © 2005-2018 by Ivan Bondarev, Stanislav Mihalkovich")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion(RevisionClass.FullVersion)] diff --git a/Configuration/Version.defs b/Configuration/Version.defs index b11881ed1..9c12c2e2c 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=0 -%REVISION%=1611 %MINOR%=3 +%REVISION%=1612 +%COREVERSION%=0 %MAJOR%=3 diff --git a/ReleaseGenerators/PascalABCNET_end.nsh b/ReleaseGenerators/PascalABCNET_end.nsh index 2e630a940..3d51ef0e0 100644 --- a/ReleaseGenerators/PascalABCNET_end.nsh +++ b/ReleaseGenerators/PascalABCNET_end.nsh @@ -8,6 +8,9 @@ ExecWait '"$INSTDIR\ExecHide.exe" "$INSTDIR\gacutil.exe" /u "HelixToolkit.Wpf"' ExecWait '"$INSTDIR\ExecHide.exe" "$INSTDIR\gacutil.exe" /i "$INSTDIR\Lib\HelixToolkit.Wpf.dll"' + + ExecWait '"$INSTDIR\ExecHide.exe" "$INSTDIR\gacutil.exe" /u "HelixToolkit"' + ExecWait '"$INSTDIR\ExecHide.exe" "$INSTDIR\gacutil.exe" /i "$INSTDIR\Lib\HelixToolkit.dll"' ;\MikhailoMMX Delete "$INSTDIR\gacutil.exe" Delete "$INSTDIR\gacutil.exe.config" diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 9e7bbb89b..af32e09f8 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.3.0.1611' +!define VERSION '3.3.0.1612' diff --git a/ReleaseGenerators/sect_Core.nsh b/ReleaseGenerators/sect_Core.nsh index 753725b17..ef6c8a2cb 100644 --- a/ReleaseGenerators/sect_Core.nsh +++ b/ReleaseGenerators/sect_Core.nsh @@ -111,6 +111,7 @@ File ..\bin\Lib\PABCRtl.dll File ..\bin\Lib\PABCRtl32.dll File ..\bin\Lib\HelixToolkit.Wpf.dll + File ..\bin\Lib\HelixToolkit.dll ${AddFile} "__RedirectIOMode.pcu" ${AddFile} "__RunMode.pcu" @@ -162,6 +163,7 @@ ${AddFile} "Speech.pcu" ${AddFile} "PABCRtl.dll" ${AddFile} "HelixToolkit.Wpf.dll" + ${AddFile} "HelixToolkit.dll" ${AddFile} "PABCRtl.pdb" SetOutPath "$INSTDIR\Doc" @@ -173,6 +175,8 @@ Call NGEN Push "Lib\HelixToolkit.Wpf.dll" Call NGEN + Push "Lib\HelixToolkit.dll" + Call NGEN SetOutPath "$INSTDIR\LibSource" File ..\bin\Lib\__RedirectIOMode.pas diff --git a/TestSuite/CompilationSamples/graph3d.pas b/TestSuite/CompilationSamples/graph3d.pas index d1833fb39..b6a775fe6 100644 --- a/TestSuite/CompilationSamples/graph3d.pas +++ b/TestSuite/CompilationSamples/graph3d.pas @@ -1620,9 +1620,9 @@ type FileModelT = class(ObjectWithChildren3D) private fn: string; - procedure SetMP(mat: GMaterial) := (model as MeshVisual3D).FaceMaterial := mat; + procedure SetMP(mat: GMaterial) := (model as FileModelVisual3D).DefaultMaterial := mat; procedure SetMaterial(mat: GMaterial) := Invoke(SetMP, mat); - function GetMaterial: GMaterial := Invoke&(()->(model as MeshVisual3D).FaceMaterial); + function GetMaterial: GMaterial := Invoke&(()->(model as FileModelVisual3D).DefaultMaterial); public //property Color: GColor write SetColor; property Material: GMaterial read GetMaterial write SetMaterial; // не работает почему-то на запись @@ -1635,7 +1635,7 @@ type public constructor(x, y, z: real; fname: string; mat: GMaterial); begin - model := new MeshVisual3D(); + {model := new MeshVisual3D(); var fs := System.IO.File.OpenRead(fname); fn := fname; @@ -1671,11 +1671,12 @@ type (model as MeshVisual3D).Content := md; end; - fs.Close; + fs.Close;} - {var a := new FileModelVisual3D; - a.Source := fname;} - CreateBase0(model, x, y, z); + var a := new FileModelVisual3D; + a.DefaultMaterial := mat; + a.Source := fname; + CreateBase0(a, x, y, z); end; function Clone := (inherited Clone) as FileModelT; diff --git a/_RegisterHelix.bat b/_RegisterHelix.bat index 8be9088e1..97748f876 100644 --- a/_RegisterHelix.bat +++ b/_RegisterHelix.bat @@ -1,2 +1,4 @@ ReleaseGenerators\gacutil.exe /u HelixToolkit.Wpf -ReleaseGenerators\gacutil.exe /i bin\Lib\HelixToolkit.Wpf.dll \ No newline at end of file +ReleaseGenerators\gacutil.exe /i bin\Lib\HelixToolkit.Wpf.dll +ReleaseGenerators\gacutil.exe /u HelixToolkit +ReleaseGenerators\gacutil.exe /i bin\Lib\HelixToolkit.dll \ No newline at end of file diff --git a/bin/Lib/Graph3D.pas b/bin/Lib/Graph3D.pas index d1833fb39..2adb3ad52 100644 --- a/bin/Lib/Graph3D.pas +++ b/bin/Lib/Graph3D.pas @@ -610,6 +610,13 @@ type property Items[i: integer]: Object3D read GetObj; default; function Count: integer := Invoke&(CountT); + + procedure DestroyP; + begin + hvp.Children.Remove(model); + model := nil; + end; + procedure Destroy := Invoke(DestroyP); end; ObjectWithMaterial3D = class(ObjectWithChildren3D) // model is MeshElement3D @@ -1549,6 +1556,10 @@ type procedure SetFS(r: real) := Invoke(SetFS, r); function GetFS: real := Invoke&(()->(model as TextVisual3D).Height); + procedure SetUP(v: Vector3D) := (model as TextVisual3D).UpDirection := v; + procedure SetU(v: Vector3D) := Invoke(SetUP, v); + function GetU: Vector3D := Invoke&(()->(model as TextVisual3D).UpDirection); + procedure SetNP(fontname: string) := (model as TextVisual3D).FontFamily := new FontFamily(fontname); procedure SetN(fontname: string) := Invoke(SetTP, fontname); function GetN: string := Invoke&(()->fontname); @@ -1562,6 +1573,7 @@ type constructor(x, y, z: real; text: string; height: real; fontname: string; c: Color); begin var a := new TextVisual3D; + //a.UpDirection := V3D(0,-1,0); a.Position := p3D(0, 0, 0); a.Text := text; a.Height := height; @@ -1575,6 +1587,7 @@ type property Text: string read GetT write SetT; property Height: real read GetFS write SetFS; property Name: string read GetN write SetN; + property UpDirection: Vector3D read GetU write SetU; property Color: GColor read GetColor write SetColor; function Clone := (inherited Clone) as TextT; end; @@ -1620,9 +1633,9 @@ type FileModelT = class(ObjectWithChildren3D) private fn: string; - procedure SetMP(mat: GMaterial) := (model as MeshVisual3D).FaceMaterial := mat; + procedure SetMP(mat: GMaterial) := (model as FileModelVisual3D).DefaultMaterial := mat; procedure SetMaterial(mat: GMaterial) := Invoke(SetMP, mat); - function GetMaterial: GMaterial := Invoke&(()->(model as MeshVisual3D).FaceMaterial); + function GetMaterial: GMaterial := Invoke&(()->(model as FileModelVisual3D).DefaultMaterial); public //property Color: GColor write SetColor; property Material: GMaterial read GetMaterial write SetMaterial; // не работает почему-то на запись @@ -1635,7 +1648,7 @@ type public constructor(x, y, z: real; fname: string; mat: GMaterial); begin - model := new MeshVisual3D(); + {model := new MeshVisual3D(); var fs := System.IO.File.OpenRead(fname); fn := fname; @@ -1671,11 +1684,12 @@ type (model as MeshVisual3D).Content := md; end; - fs.Close; + fs.Close;} - {var a := new FileModelVisual3D; - a.Source := fname;} - CreateBase0(model, x, y, z); + var a := new FileModelVisual3D; + a.DefaultMaterial := mat; + a.Source := fname; + CreateBase0(a, x, y, z); end; function Clone := (inherited Clone) as FileModelT; diff --git a/bin/Lib/HelixToolkit.dll b/bin/Lib/HelixToolkit.dll new file mode 100644 index 0000000000000000000000000000000000000000..131817b544a4eaf301d410f2471921aa0b113a6e GIT binary patch literal 5632 zcmeHLYiu0V6+Sa-uOA^B+j$Xi!X$BlBxYDU;Sos4+FmEI@gwmr&I6ZZcK3Qc$?VKB zGn?3=rG^UH@~5FCg-S@JB|HL6fvQLmFVQwFsc70nqOAlGg^E7tgQNvPL6G!2ch>fr z82HyxiMzh%o_p@O=RJ4sxO?j!3K3Bm`svd|2QhMsN%-+#6w8tGo`}$os*Wr?sB|4! zm>e=aE$=#6*T`vU!?qn?O9{;_*qUi;@!o`%b237oKE1l3D0)LXQI`^;vKtz@IB@(RSVS+%$;N zwiu8wdIY_s#o&hS3d;c_hm5wPv#eR@B`rqOS~8WW&v8X#+f*v2lNxM7%&VAK(!RQc zXtZShQRvzm6(mD-U}Cj10|0S5H>%PAHejXJLoTYTRi_riv}MaGoH`(9g`Jrg<}_7? z%N!V8eSWC1G8_ufaHTVwNfpi<3>O`FxwfJJ9%Xt}W4Owh3)=Cpb2f&h3S_G^oi2+L z#KTz^8uQ*ftc|i&FojwZovjL6g2u7hwL*{T%cIMiRx+iWEWlyJZt;youVGw;hhuTV zcTGF%F^7iu^S;H`B&ZQMm)7ES*L1`&uEKnP_qJM23Uh9lDx2o3K|J46mJ^&{?Qlt^ zh;gWp^$SBKjb$>OJNBdfUSXV*{}>h2FwIvO-X>umb*nRJFBrr0D!s3SX|=-edI|d_ z{Gy~El5kK$lJvXiL2&*)AX@kaAehae?K+6>DKry~E3{9osZnV~ zsHP@F^=cKxRF)P~%W0m(7XnsO6JQOkl(0p@4hc6(xJ5!kLQ}%)CEQ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