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 000000000..131817b54 Binary files /dev/null and b/bin/Lib/HelixToolkit.dll differ