From d7204c68985d8c79e5298634086feaeb3c1380d9 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Tue, 13 May 2025 16:51:40 +0300 Subject: [PATCH] First_commit --- 123.optset | 17 + ExpertSCS.dof | 135 ++ POWERCAD30/UNITS/DrawEngine.pas | 1 + POWERCAD30/UNITS/form3d.dfm | 27 +- POWERCAD30/UNITS/form3d.pas | 1593 +++++++++++++++-- REPORTS/RCablePaths.frf | Bin 0 -> 16130 bytes REPORTS/RExplicationComponent.frf | Bin 0 -> 22838 bytes REPORTS/RGOSTCableJournal.frf | Bin 0 -> 110598 bytes SCS_RF.optset | 22 + SRC/1.bat | 1 - SRC/ARCH/U_Arch3DNew.pas | 537 +++++- SRC/ExpertGM.dpr | 1 - SRC/Main/U_Common.pas | 8 +- SRC/Main/U_ELCommon.pas | 13 +- SRC/Main/U_MasterNewList.dfm | 22 +- SRC/Main/U_Reserv.dfm | 655 ++++--- SRC/Main/U_Reserv.pas | 475 ++++- SRC/Protection/U_ProtectionCommon.pas | 7 +- SRC/SCSNormBase/U_AddComponent.dfm | 2 - SRC/SCSNormBase/U_BaseCommon.pas | 2 + SRC/SCSNormBase/U_BaseConstants.pas | 11 + SRC/SCSNormBase/U_BaseConstantsPE.pas | 9 + SRC/SCSNormBase/U_BaseConstantsUKR.pas | 9 + SRC/SCSNormBase/U_MAIN.dfm | 21 +- SRC/SCSNormBase/U_MAIN.pas | 45 +- SRC/SCSNormBase/U_MakeEditComponentType.pas | 3 +- SRC/SCSNormBase/U_MakeEditCrossConnection.dfm | 14 +- SRC/SCSNormBase/U_MakeNorm.dfm | 1 + SRC/SCSNormBase/U_MakeNorm.pas | 110 +- SRC/SCSNormBase/U_PECommon.pas | 87 +- TOOLS/license.key | Bin 0 -> 162 bytes 31 files changed, 3283 insertions(+), 545 deletions(-) create mode 100644 123.optset create mode 100644 ExpertSCS.dof create mode 100644 REPORTS/RCablePaths.frf create mode 100644 REPORTS/RExplicationComponent.frf create mode 100644 REPORTS/RGOSTCableJournal.frf create mode 100644 SCS_RF.optset create mode 100644 TOOLS/license.key diff --git a/123.optset b/123.optset new file mode 100644 index 0000000..f92ed1e --- /dev/null +++ b/123.optset @@ -0,0 +1,17 @@ + + + 1251 + C:\Projects\СКС\POWERCAD30\UNITS;$(BRCC_IncludePath) + true + false + true + + + Delphi.Personality.12 + OptionSet + + + + 12 + + diff --git a/ExpertSCS.dof b/ExpertSCS.dof new file mode 100644 index 0000000..3717ca9 --- /dev/null +++ b/ExpertSCS.dof @@ -0,0 +1,135 @@ +[FileVersion] +Version=6.0 +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=0 +J=1 +K=0 +L=1 +M=0 +N=1 +O=0 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=1 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=0 +ShowWarnings=0 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= +[Directories] +OutputDir=D:\Program Files\- 1.8.0 +UnitOutputDir=DCU +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath=$(DELPHI)\Lib\Debug +Packages=vcl;rtl;dbrtl;adortl;vcldb;vclx;bdertl;dsnap;tee;VclSmp;vclshlctrls;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;ip4000clientvcl6;ip4000v6;db211d6r;FR6;cds;vcldbx;visualdbclx;dsnapcrba;dsnapcon;dbexpress;dss;webdsnap;bdecds;dbxcds;soaprtl;inetdb;websnap;ibxpress;indy;dclOffice2k;qrpt;nmfast;teeqr;ip4000word2000vcl6;elmlgnD6;elpackD6;elpkdbD6;elpproD6;elmltgD6;visualclx;Rz30Ctls60;Rz30DBCtls60;xmlide +Conditionals=3D +DebugSourceDirs= +UsePackages=0 +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1049 +CodePage=1251 +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.7.1.1827 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName=- +ProductVersion=2.3.0 +Comments= +[Excluded Packages] +c:\program files\borland\delphi6\Bin\dclclxdb60.bpl=Borland CLX Database Components +C:\Program Files\Borland\Delphi6\Bin\dclclxstd60.bpl=Borland CLX Standard Components +c:\program files\borland\delphi6\Bin\dclite60.bpl=Borland Integrated Translation Environment +c:\program files\borland\delphi6\Bin\dclsoap60.bpl=Borland SOAP Components +D:\Program Files\CADE Control\Tutorial\Delphi\CADEPackage.bpl=CADE Control Component +C:\Program Files\Borland\Delphi6\Bin\dclaxserver60.bpl=Microsoft Office 97 Sample Automation Server Wrapper Components +D:\Program Files\KeverIT\EzPlanIT\Bpl\EzBasicDs_D6.bpl=EzPlan-IT's basic components +D:\Program Files\KeverIT\EzPlanIT\Bpl\EzBasic_D6.bpl=EzPlan-IT's basic components +D:\Program Files\KeverIT\EzPlanIT\Bpl\EZPlanitDs_D6.bpl=EzPlan-IT's main components +D:\Program Files\KeverIT\EzPlanIT\Bpl\EZPlanIT_D6.bpl=EzPlan-IT's main components +[HistoryLists\hlConditionals] +Count=30 +Item0=3D +Item1=FINAL_SCS; SCS_PE; 3D +Item2=FINAL_SCS; SCS_PE; TRIAL_SCS; 3D +Item3=FINAL_SCS; TRIAL_SCS; 3D; PROCAT_SCS +Item4=FINAL_SCS; TELECOM; 3D +Item5=FINAL_SCS; TELECOM; FLASH_SCS; 3D +Item6=FINAL_SCS; TELECOM; TRIAL_SCS; 3D +Item7=FINAL_SCS; TELECOM; SCS_RF; 3D +Item8=FINAL_SCS; TELECOM; SCS_RF; FLASH_SCS; 3D +Item9=FINAL_SCS; TELECOM; TRIAL_SCS; SCS_RF; 3D +Item10=FINAL_SCS; TELECOM; TRIAL_SCS; SCS_RF; 3D; PROCAT_SCS +Item11=FINAL_SCS; TRIAL_SCS; SCS_RF; 3D; PROCAT_SCS +Item12=FINAL_SCS; SCS_RF; 3D +Item13=FINAL_SCS; SCS_RF; FLASH_SCS; 3D +Item14=FINAL_SCS; TRIAL_SCS; SCS_RF; 3D +Item15=FINAL_SCS; FLASH_SCS; 3D +Item16=FINAL_SCS;3D +Item17=FINAL_SCS; TRIAL_SCS; 3D +Item18=FINAL_SCS; SCS_PE; TRIAL_SCS; 3D; PROCAT_SCS; SCS_PANDUIT +Item19=3D; ES_GRAPH_SC +Item20=FINAL_SCS; 3D; ES_GRAPH_SC +Item21=FINAL_SCS; SCS_SPA; 3D +Item22=SCS_SPA; 3D +Item23=FINAL_SCS; 3D +Item24=FINAL_SCS; +Item25=FINAL_SCS; 3D; MSWindows +Item26=FINAL_SCS +Item27=FINAL_SCS; SCS_RF; FLASH_SCS +Item28=FINAL_SCS; SCS_RF +Item29=FINAL_SCS; FLASH_SCS +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +[HistoryLists\hlSearchPath] +Count=1 +Item0=$(DELPHI)\Lib\Debug +[HistoryLists\hlOutputDirectorry] +Count=1 +Item0=..\ diff --git a/POWERCAD30/UNITS/DrawEngine.pas b/POWERCAD30/UNITS/DrawEngine.pas index 9804332..0cbe1f1 100644 --- a/POWERCAD30/UNITS/DrawEngine.pas +++ b/POWERCAD30/UNITS/DrawEngine.pas @@ -1746,6 +1746,7 @@ begin ConvertCoord(pp2.x,pp2.y,pp2.z); rgn1 := CreateEllipticRgn(Round(pp1.x), Round(pp1.y), Round(pp2.x), Round(pp2.y)); CombineRgn(Rgn, Rgn, Rgn1, RGN_XOR); + DeleteObject(Rgn1); // Tolik 14/01/2025 -- end; end else diff --git a/POWERCAD30/UNITS/form3d.dfm b/POWERCAD30/UNITS/form3d.dfm index d7b556f..2e1f4c1 100644 --- a/POWERCAD30/UNITS/form3d.dfm +++ b/POWERCAD30/UNITS/form3d.dfm @@ -294,10 +294,6 @@ object frm3D: Tfrm3D FixedDimension = 19 object TabSheet1: TRzTabSheet Caption = #1052#1086#1076#1077#1083#1100 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 object panObjects: TPanel Left = 0 Top = 0 @@ -335,12 +331,11 @@ object frm3D: Tfrm3D TabOrder = 0 TabStyle = tsRoundCorners OnTabClick = pcTreeTabClick - ExplicitHeight = 21 FixedDimension = 19 object TabArchModel: TRzTabSheet Caption = #1040#1088#1093'. '#1084#1086#1076#1077#1083#1100 ExplicitLeft = 0 - ExplicitTop = 1 + ExplicitTop = 0 ExplicitWidth = 0 ExplicitHeight = 0 object cxGroupBox1: TcxGroupBox @@ -424,16 +419,10 @@ object frm3D: Tfrm3D 000000000000000000000001067200650072006500720065002C000000000000 0000000000FFFFFFFFFFFFFFFF00000000000000000000000001077200650072 007200650072006500} - ExplicitWidth = 0 - ExplicitHeight = 64 end end object TabScsModel: TRzTabSheet Caption = #1057#1050#1057' '#1084#1086#1076#1077#1083#1100 - ExplicitLeft = 0 - ExplicitTop = 1 - ExplicitWidth = 0 - ExplicitHeight = 0 object cxGroupBox2: TcxGroupBox Left = 0 Top = 0 @@ -515,8 +504,14 @@ object frm3D: Tfrm3D 000000000000000000000001067200650072006500720065002C000000000000 0000000000FFFFFFFFFFFFFFFF00000000000000000000000001077200650072 007200650072006500} - ExplicitWidth = 0 - ExplicitHeight = 64 + end + object DuplicateNodeTree: TTreeView + Left = 160 + Top = 80 + Width = 121 + Height = 97 + Indent = 19 + TabOrder = 2 end end end @@ -536,7 +531,7 @@ object frm3D: Tfrm3D ExplicitLeft = 0 ExplicitTop = 0 ExplicitWidth = 0 - ExplicitHeight = 574 + ExplicitHeight = 0 object Panel1: TPanel Left = 0 Top = 0 @@ -3410,7 +3405,7 @@ object frm3D: Tfrm3D Left = 100 Top = 57 Bitmap = { - 494C01013A00B000140210001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 494C01013A00B0006C0210001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 000000000000360000002800000040000000F0000000010020000000000000F0 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 diff --git a/POWERCAD30/UNITS/form3d.pas b/POWERCAD30/UNITS/form3d.pas index 0e758d1..9197767 100644 --- a/POWERCAD30/UNITS/form3d.pas +++ b/POWERCAD30/UNITS/form3d.pas @@ -17,7 +17,7 @@ uses glFileObj, cxGraphics, cxLookAndFeels, GLMaterial, GLCoordinates, GLCrossPlatform, BaseClasses, glNodes, {Tolik 19/03/2019}GlColor, GLKeyboard, U_Common_Classes, OpenGL1x, GLBehaviours, GLParticleFX, IniFiles, RzPanel, - RzSplit, GLContext; + RzSplit, GLContext, GLRenderContextInfo; const // Koeff Cam Move @@ -25,6 +25,23 @@ const kmOrthogonel = 0.003; //04.01.2012 0.03; cmpNearestPointDelta = 0.05; type + //Tolik 19/03/2025 , + TWireTray = class(TGLLines) + private + FLength: Single; + FWidth: Single; + FHeight: Single; + procedure SetLength(const Value: Single); + procedure SetWidth(const Value: Single); + procedure SetHeight(const Value: Single); + public + constructor Create(AOwner: TComponent); override; + procedure BuildList(var rci: TRenderContextInfo); override; + property Length: Single read FLength write SetLength; + property Width: Single read FWidth write SetWidth; + property Height: Single read FHeight write SetHeight; + end; + // TModeType = (F3DFirstPerson, F3DPerspective, F3DOrtho); // Tolik 11/02/2020 -- // Tolik 11/10/2018 TOpen3dsModelDialog = class(TOpenDialog) @@ -336,6 +353,7 @@ type edWallsTransparency: TEdit; Label53: TLabel; RzSizePanel1: TRzSizePanel; + DuplicateNodeTree: TTreeView; //Tolik procedure GLSceneViewerMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); @@ -457,6 +475,8 @@ type procedure DeselectGLObjectsT; public { Public declarations } + //DuplicateNodeTree: TTreeView; //Tolik 07/05/2025 -- , + // FMode: TModeType; // Tolik -- 26/04/2018 -- isProjectModel: Boolean; // (True) (False) @@ -629,6 +649,7 @@ type procedure Move3DConnectorEvent(aObj: TGLBaseSceneObject); procedure Move3DLineEvent(aObj: TGLBaseSceneObject); procedure Move3DConnector(aObj: T3DConnector; dp: T3DPoint; AIsFirstObject: Boolean=false); + Function Get3DPoint(aLine: T3DLine; PointNum: Integer; dist: Double): PDoublePoint; // Tolik 07/04/2025 -- procedure Move3DRaiseConnector(aObj: T3DConnector; dp: T3DPoint); procedure Move3DBetweenRaiseConnector(aObj: T3DConnector; dp: T3DPoint); procedure Move3DLine(aObj: T3DConnector; aLine: T3DLine; aPos: T3DPoint); @@ -702,6 +723,100 @@ uses U_BaseConstants, U_Constants, U_BaseCommon, U_Common, U_SCSComponent, u_ma DrawObjects;} {$R *.dfm} +//Tolik 19/03/2025 -- +constructor TWireTray.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FLength := 1.0; // + FWidth := 1.0; // + FHeight := 0.2; // + LineColor.AsWinColor := clRed; // +end; + +procedure TWireTray.SetLength(const Value: Single); +begin + if FLength <> Value then + begin + ClearStructureChanged; + FLength := Value; + StructureChanged; + end; +end; + +procedure TWireTray.SetWidth(const Value: Single); +begin + if FWidth <> Value then + begin + ClearStructureChanged; + FWidth := Value; + StructureChanged; + end; +end; + +procedure TWireTray.SetHeight(const Value: Single); +begin + if FHeight <> Value then + begin + ClearStructureChanged; + FHeight := Value; + StructureChanged; + end; +end; + +procedure TWireTray.BuildList(var rci: TRenderContextInfo); +var + HalfLength, HalfWidth: Single; +begin + inherited; + + HalfLength := FLength / 2; + HalfWidth := FWidth / 2; + + // + glBegin(GL_LINES); + + // + glVertex3f(-HalfLength, -HalfWidth, 0); + glVertex3f(HalfLength, -HalfWidth, 0); + + glVertex3f(HalfLength, -HalfWidth, 0); + glVertex3f(HalfLength, HalfWidth, 0); + + glVertex3f(HalfLength, HalfWidth, 0); + glVertex3f(-HalfLength, HalfWidth, 0); + + glVertex3f(-HalfLength, HalfWidth, 0); + glVertex3f(-HalfLength, -HalfWidth, 0); + + // + glVertex3f(-HalfLength, -HalfWidth, FHeight); + glVertex3f(HalfLength, -HalfWidth, FHeight); + + glVertex3f(HalfLength, -HalfWidth, FHeight); + glVertex3f(HalfLength, HalfWidth, FHeight); + + glVertex3f(HalfLength, HalfWidth, FHeight); + glVertex3f(-HalfLength, HalfWidth, FHeight); + + glVertex3f(-HalfLength, HalfWidth, FHeight); + glVertex3f(-HalfLength, -HalfWidth, FHeight); + + // + glVertex3f(-HalfLength, -HalfWidth, 0); + glVertex3f(-HalfLength, -HalfWidth, FHeight); + + glVertex3f(HalfLength, -HalfWidth, 0); + glVertex3f(HalfLength, -HalfWidth, FHeight); + + glVertex3f(HalfLength, HalfWidth, 0); + glVertex3f(HalfLength, HalfWidth, FHeight); + + glVertex3f(-HalfLength, HalfWidth, 0); + glVertex3f(-HalfLength, HalfWidth, FHeight); + + glEnd; +end; +// // Tolik 25/12/2019 -- //function comparePoint(aCPoint1, ACPoint2: TDoublePoint): Boolean; @@ -1959,6 +2074,7 @@ var TextureId: GLuint; data: pointer; CreatedMaterial: TGLLibMaterial; + TubeList: TList; // Tolik 20/03/2025 -- //19.06.2012 - {function GetPointsForNormal(arr: T3DPointArray): T3DPointArray; var @@ -3259,16 +3375,34 @@ var dist1, dist2: double; cubeLineLen, cubeLineHeight: Double; canAddCompon: Boolean; + canAddTubetoList: Boolean; + //Tolik 10/4/2025 -- + WireTrayWidth, WireTrayHeight: double; + GLPipe: TGLFreeForm; + ap: T3DPointArray; + ap1, ap2, ap3, ap4, ap5, ap6, ap7, ap8: TDoublePoint; + p1,p2: PDoublePoint; + LineComponProp: PProperty; + HalfWidth, WireStep: Double; + WireNode: TTreeNode; + GLTray: TGLFreeForm; + + begin if LineLen = 0 then exit; currNode := aParentNode; + canAddTubetoList := False; //if ComponOutRadius <> -1 then begin LinearAngle := 0; LinearAngle1:= 0; childNode := Nil; - ComponOutRadius := getLineComponOutRadius(aCompon);//* UOMToMetre(1000 / FCAD.PCad.MapScale) * factor; + if aCompon.ComponentType.SysName = ctsnTube then + canAddTubetoList := True; + ComponOutRadius := -1; // Tolik 10/04/2025 -- + if aCompon.ComponentType.SysName <> ctsnWireTray then // Tolik 10/04/2025 -- + ComponOutRadius := getLineComponOutRadius(aCompon);//* UOMToMetre(1000 / FCAD.PCad.MapScale) * factor; if ComponOutRadius <> -1 then begin if ((aCompon.ComponentType.SysName = ctsnCableChannel) and (aCompon.Componenttype.GUID <> '{80B7A366-98B3-4D3A-A115-C64A3498218E}')) then @@ -3446,7 +3580,8 @@ var // else //CanAddCompon := (CompareValue(ComponOutRadius, StrToFloat_My(a3DLine.ComponDiameterList[1])) = 0); // cableChannel - CanAddCompon := ((FloatToStr(ComponOutRadius) = a3DLine.ComponDiameterList[1]) and CanAddTube); // cableChannel + // CanAddCompon := ((FloatToStr(ComponOutRadius) = a3DLine.ComponDiameterList[1]) and CanAddTube); // cableChannel + CanAddCompon := CanAddTube; if CanAddCompon then begin @@ -3464,8 +3599,10 @@ var begin TGLCyLinder(GLCyl).TopRadius := ComponOutRadius * UOMToMetre(1000 / FCAD.PCad.MapScale) * factor; TGLCyLinder(GLCyl).BottomRadius := ComponOutRadius * UOMToMetre(1000 / FCAD.PCad.MapScale) * factor; + TGLCyLinder(GLCyl).height := max(TGLCyLinder(GLCyl).TopRadius, TGLCyLinder(GLCyl).BottomRadius); end; - + if canAddTubetoList then + TubeList.Add(GLCyl); TGlCylinder(GLCyl).Loops := 2; TubePoint1 := GetPoint(LineFigure, 1, ComponOutRadius); TubePoint2 := GetPoint(LineFigure, 2, ComponOutRadius); @@ -3516,7 +3653,360 @@ var end; end; end; + //Tolik 10/04/2025 -- + if aCompon.ComponentType.SysName = ctsnWireTray then // + begin + CheckInterSection; //Tolik 13/05/2025 -- + WireTrayWidth := 0; + WireTrayHeight := 0; + SetLength(ap, 0); + LineComponProp := aCompon.GetPropertyBySysName(pnWidth); + if LineComponProp <> nil then + WireTrayWidth := aCompon.GetPropertyValueAsFloat(pnWidth); + + LineComponProp := aCompon.GetPropertyBySysName(pnHeight); + if LineComponProp <> nil then + WireTrayHeight := aCompon.GetPropertyValueAsFloat(pnHeight); + + if WireTrayWidth <> 0 then + begin + HalfWidth := WireTrayWidth/2; + + p1 := GetPoint(aLine, 1, HalfWidth); + p2 := GetPoint(aLine, 2, HalfWidth); + + ap1 := RotatePoint(aLine.ap1, p1^, -PI/2); + ap2 := RotatePoint(aLine.ap1, p1^, PI/2); + + ap3 := RotatePoint(aLine.ap2, p2^, -PI/2); + ap4 := RotatePoint(aLine.ap2, p2^, PI/2); + + F3DLineCompon := T3DLineComponent.Create(nil, nil,Self.F3DModel); + Self.F3DModel.FScsObjects.Add(F3DLineCompon); + childNode := ScsModelTree.Items.AddChild(aParentNode, aCompon.GetNameForVisible); + childNode.ImageIndex := 8; + childNode.SelectedIndex := 2; + ChildNode.Data := F3DLineCompon; + F3DLineCompon.FSCSCompon := aCompon; + F3DLineCompon.FSCSComponID := aCompon.ID; + (* + GLTray := TGLFREEFORM(DummyCube.AddNewChild(TGLLines)); + // 10 + TglLines(GLTray).Nodes.AddNode(ap1.x * factor, ap1.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + TglLines(GLTray).Nodes.AddNode(ap2.x * factor, ap2.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + TglLines(GLTray).Nodes.AddNode(ap2.x * factor, ap2.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + TglLines(GLTray).Nodes.AddNode(ap3.x * factor, ap3.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TglLines(GLTray).Nodes.AddNode(ap3.x * factor, ap3.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TglLines(GLTray).Nodes.AddNode(ap4.x * factor, ap4.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TglLines(GLTray).Nodes.AddNode(ap4.x * factor, ap4.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TglLines(GLTray).Nodes.AddNode(ap1.x * factor, ap1.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + + Dispose(p1); + Dispose(p2); + + while comparevalue(HalfWidth, 0.1) = 1 do + begin + HalfWidth := HalfWidth - 0.1; + p1 := GetPoint(aLine, 1, HalfWidth); + p2 := GetPoint(aLine, 2, HalfWidth); + + ap5 := RotatePoint(aLine.ap1, p1^, -PI/2); + ap6 := RotatePoint(aLine.ap1, p1^, PI/2); + ap7 := RotatePoint(aLine.ap2, p2^, -PI/2); + ap8 := RotatePoint(aLine.ap2, p2^, PI/2); + + TglLines(GLTray).Nodes.AddNode(ap6.x * factor, ap6.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap6.y * factor); + TglLines(GLTray).Nodes.AddNode(ap7.x * factor, ap7.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap7.y * factor); + TglLines(GLTray).Nodes.AddNode(ap8.x * factor, ap8.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap8.y * factor); + TglLines(GLTray).Nodes.AddNode(ap5.x * factor, ap5.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap5.y * factor); + + Dispose(p1); + Dispose(p2); + end; + + + if WireTrayHeight > 0 then // , + begin + HalfWidth := WireTrayHeight; + + TglLines(GLTray).Nodes.AddNode(ap1.x * factor, (ap1.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + TglLines(GLTray).Nodes.AddNode(ap1.x * factor, ap1.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + TglLines(GLTray).Nodes.AddNode(ap1.x * factor, ap1.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + TglLines(GLTray).Nodes.AddNode(ap4.x * factor, ap4.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TglLines(GLTray).Nodes.AddNode(ap4.x * factor, ap4.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TglLines(GLTray).Nodes.AddNode(ap4.x * factor, (ap4.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TglLines(GLTray).Nodes.AddNode(ap4.x * factor, (ap4.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TglLines(GLTray).Nodes.AddNode(ap1.x * factor, (ap1.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + + while comparevalue(HalfWidth, 0.1) = 1 do + begin + HalfWidth := HalfWidth - 0.1; + TglLines(GLTray).Nodes.AddNode(ap1.x * factor, (ap1.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + //TglLines(GLTray).Nodes.AddNode(ap1.x * factor, ap1.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + TglLines(GLTray).Nodes.AddNode(ap4.x * factor, ap4.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TglLines(GLTray).Nodes.AddNode(ap4.x * factor, (ap4.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TglLines(GLTray).Nodes.AddNode(ap1.x * factor, (ap1.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + end; + + // + HalfWidth := WireTrayHeight; + + TglLines(GLTray).Nodes.AddNode(ap2.x * factor, (ap2.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + TglLines(GLTray).Nodes.AddNode(ap2.x * factor, ap2.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + TglLines(GLTray).Nodes.AddNode(ap2.x * factor, ap2.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + TglLines(GLTray).Nodes.AddNode(ap3.x * factor, ap3.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TglLines(GLTray).Nodes.AddNode(ap3.x * factor, ap3.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TglLines(GLTray).Nodes.AddNode(ap3.x * factor, (ap3.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TglLines(GLTray).Nodes.AddNode(ap3.x * factor, (ap3.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TglLines(GLTray).Nodes.AddNode(ap2.x * factor, (ap2.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + + while comparevalue(HalfWidth, 0.1) = 1 do + begin + HalfWidth := HalfWidth - 0.1; + //TglLines(GLTray).Nodes.AddNode(ap2.x * factor, (ap2.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + TglLines(GLTray).Nodes.AddNode(ap2.x * factor, ap2.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + TglLines(GLTray).Nodes.AddNode(ap3.x * factor, ap3.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TglLines(GLTray).Nodes.AddNode(ap3.x * factor, (ap3.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TglLines(GLTray).Nodes.AddNode(ap2.x * factor, (ap2.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + end; + end; + + //TglLines(GLTray).SplineMode := lsmSegments; + + if GLTray.Material.Texture.Disabled then + begin + ComponColor := getLineComponColor(aCompon);//ConvertWinColor(clGreen); + GLTray.Material.FrontProperties.Ambient.Color := ComponColor; + GLTray.Material.FrontProperties.Diffuse.Color := ComponColor; + GLTray.Material.FrontProperties.Emission.Color := ComponColor; + GLTray.Material.BackProperties.Ambient.Color := ComponColor; + GLTray.Material.BackProperties.Diffuse.Color := ComponColor; + GLTray.Material.BackProperties.Emission.Color := ComponColor; + end; + + GLTray.Material.MaterialOptions := []; + GLTray.Material.Texture.Disabled := False; + GLTray.TagObject := ChildNode; + F3DLineCompon.FGLObject := GLTray; + TglLines(GLTray).ShowAxes := False; + TglLines(GLTray).LineColor.AsWinColor := clgreen;//TGLColor(ComponColor); + TglLines(GLTray).LineWidth := 4; + TglLines(GLTray).NodeSize := 0; + TglLines(GLTray).NodesAspect := lnaInvisible; + TglLines(GLTray).AntiAliased := true; + *) + + GLPipe := TGLFREEFORM(DummyCube.AddNewChild(TGLPipe)); + TGLPipe(GLPipe).Radius := 0.01 * UOMToMetre(1000 / FCAD.PCad.MapScale) * factor; + // 10 + TGLPipe(GLPipe).Nodes.AddNode(ap1.x * factor, ap1.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap2.x * factor, ap2.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap2.x * factor, ap2.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap3.x * factor, ap3.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap3.x * factor, ap3.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap4.x * factor, ap4.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap4.x * factor, ap4.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap1.x * factor, ap1.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + + Dispose(p1); + Dispose(p2); + + while comparevalue(HalfWidth, 0.1) = 1 do + begin + HalfWidth := HalfWidth - 0.1; + p1 := GetPoint(aLine, 1, HalfWidth); + p2 := GetPoint(aLine, 2, HalfWidth); + + ap5 := RotatePoint(aLine.ap1, p1^, -PI/2); + ap6 := RotatePoint(aLine.ap1, p1^, PI/2); + ap7 := RotatePoint(aLine.ap2, p2^, -PI/2); + ap8 := RotatePoint(aLine.ap2, p2^, PI/2); + + TGLPipe(GLPipe).Nodes.AddNode(ap6.x * factor, ap6.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap6.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap7.x * factor, ap7.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap7.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap8.x * factor, ap8.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap8.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap5.x * factor, ap5.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap5.y * factor); + //TGLPipe(GLPipe).Nodes.AddNode(ap2.x * factor, ap2.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + Dispose(p1); + Dispose(p2); + end; + + //TGLPipe(GLPipe).Nodes.AddNode(ap2.x * factor, ap2.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + //TGLPipe(GLPipe).Nodes.AddNode(ap3.x * factor, ap3.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + + if GLPipe.Material.Texture.Disabled then + begin + ComponColor := getLineComponColor(aCompon);//ConvertWinColor(clGreen); + GLPipe.Material.FrontProperties.Ambient.Color := ComponColor; + GLPipe.Material.FrontProperties.Diffuse.Color := ComponColor; + GLPipe.Material.FrontProperties.Emission.Color := ComponColor; + GLPipe.Material.BackProperties.Ambient.Color := ComponColor; + GLPipe.Material.BackProperties.Diffuse.Color := ComponColor; + GLPipe.Material.BackProperties.Emission.Color := ComponColor; + end; + + GLPipe.Material.MaterialOptions := []; + //GLPipe.Material.Texture.Disabled := False; + GLPipe.Material.Texture.Disabled := true; + GLPipe.TagObject := ChildNode; + F3DLineCompon.FGLObject := GLPipe; + TGLPipe(GLPipe).ObjectStyle := TGLPipe(GLPipe).ObjectStyle + [osDirectDraw]; + TGLPipe(GLPipe).SplineMode := lsmSegments;//lsmLines; // + if WireTrayHeight > 0 then // , + begin + HalfWidth := WireTrayHeight; + // + TGLPipe(GLPipe).Nodes.AddNode(ap1.x * factor, ap1.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + + TGLPipe(GLPipe).Nodes.AddNode(ap1.x * factor, (ap1.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap1.x * factor, ap1.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap1.x * factor, ap1.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap4.x * factor, ap4.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap4.x * factor, ap4.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap4.x * factor, (ap4.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap4.x * factor, (ap4.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap1.x * factor, (ap1.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + + while comparevalue(HalfWidth, 0.1) = 1 do + begin + HalfWidth := HalfWidth - 0.1; + TGLPipe(GLPipe).Nodes.AddNode(ap1.x * factor, (ap1.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + //TGLPipe(GLPipe).Nodes.AddNode(ap1.x * factor, ap1.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + //TGLPipe(GLPipe).Nodes.AddNode(ap4.x * factor, ap4.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap4.x * factor, (ap4.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + //TGLPipe(GLPipe).Nodes.AddNode(ap1.x * factor, (ap1.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + end; + + // + HalfWidth := WireTrayHeight; + TGLPipe(GLPipe).Nodes.AddNode(ap4.x * factor, ap4.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap4.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap1.x * factor, ap1.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap1.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap2.x * factor, ap2.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + + TGLPipe(GLPipe).Nodes.AddNode(ap2.x * factor, (ap2.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap2.x * factor, ap2.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap2.x * factor, ap2.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap3.x * factor, ap3.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap3.x * factor, ap3.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap3.x * factor, (ap3.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap3.x * factor, (ap3.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap2.x * factor, (ap2.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + + while comparevalue(HalfWidth, 0.1) = 1 do + begin + HalfWidth := HalfWidth - 0.1; + TGLPipe(GLPipe).Nodes.AddNode(ap2.x * factor, (ap2.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + //TGLPipe(GLPipe).Nodes.AddNode(ap2.x * factor, ap2.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + //TGLPipe(GLPipe).Nodes.AddNode(ap3.x * factor, ap3.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap3.x * factor, (ap3.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap3.y * factor); + //TGLPipe(GLPipe).Nodes.AddNode(ap2.x * factor, (ap2.z + HalfWidth)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap2.y * factor); + end; + + // + WireStep := 0.1; // 10 + HalfWidth := WireTrayWidth/2; + if WireTrayHeight = 0 then + begin + while WireStep < aLine.LineLength do + begin + F3DLineCompon := T3DLineComponent.Create(nil, nil,Self.F3DModel); + Self.F3DModel.FScsObjects.Add(F3DLineCompon); + childNode := DuplicateNodeTree.Items.AddChild(aParentNode, aCompon.GetNameForVisible); + childNode.ImageIndex := 8; + childNode.SelectedIndex := 2; + ChildNode.Data := F3DLineCompon; + F3DLineCompon.FSCSCompon := aCompon; + F3DLineCompon.FSCSComponID := aCompon.ID; + + GLPipe := TGLFREEFORM(DummyCube.AddNewChild(TGLPipe)); + TGLPipe(GLPipe).Radius := 0.01 * UOMToMetre(1000 / FCAD.PCad.MapScale) * factor; + p1 := GetPoint(aLine, 1, WireStep); + p2 := GetPointA(p1^, aLine.ap2, HalfWidth); + ap5 := RotatePoint(p1^, p2^, -PI/2); + ap6 := RotatePoint(p1^, p2^, PI/2); + TGLPipe(GLPipe).Nodes.AddNode(ap5.x * factor, ap5.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap5.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap6.x * factor, ap6.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap6.y * factor); + + if GLPipe.Material.Texture.Disabled then + begin + ComponColor := getLineComponColor(aCompon);//ConvertWinColor(clGreen); + GLPipe.Material.FrontProperties.Ambient.Color := ComponColor; + GLPipe.Material.FrontProperties.Diffuse.Color := ComponColor; + GLPipe.Material.FrontProperties.Emission.Color := ComponColor; + GLPipe.Material.BackProperties.Ambient.Color := ComponColor; + GLPipe.Material.BackProperties.Diffuse.Color := ComponColor; + GLPipe.Material.BackProperties.Emission.Color := ComponColor; + end; + + GLPipe.Material.MaterialOptions := []; + //GLPipe.Material.Texture.Disabled := False; + GLPipe.Material.Texture.Disabled := true; + GLPipe.TagObject := ChildNode; + F3DLineCompon.FGLObject := GLPipe; + TGLPipe(GLPipe).ObjectStyle := TGLPipe(GLPipe).ObjectStyle + [osDirectDraw]; + TGLPipe(GLPipe).SplineMode := lsmSegments;//lsmLines; // + + WireStep := WireStep + 0.1; + end; + end + else + begin + while WireStep < aLine.LineLength do + begin + F3DLineCompon := T3DLineComponent.Create(nil, nil,Self.F3DModel); + Self.F3DModel.FScsObjects.Add(F3DLineCompon); + childNode := DuplicateNodeTree.Items.AddChild(nil, aCompon.GetNameForVisible); + childNode.ImageIndex := 8; + childNode.SelectedIndex := 2; + ChildNode.Data := F3DLineCompon; + F3DLineCompon.FSCSCompon := aCompon; + F3DLineCompon.FSCSComponID := aCompon.ID; + + GLPipe := TGLFREEFORM(DummyCube.AddNewChild(TGLPipe)); + TGLPipe(GLPipe).Radius := 0.01 * UOMToMetre(1000 / FCAD.PCad.MapScale) * factor; + + p1 := GetPoint(aLine, 1, WireStep); + + ap7.x := aLine.ap2.x; + ap7.y := aLine.ap2.y; + ap7.z := aLine.ActualZOrder[2]; + + p2 := GetPointA(p1^, ap7, HalfWidth); + + ap5 := RotatePoint(p1^, p2^, -PI/2); + ap6 := RotatePoint(p1^, p2^, PI/2); + TGLPipe(GLPipe).Nodes.AddNode(ap5.x * factor, (ap5.z + WireTrayHeight) * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap5.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap5.x * factor, ap5.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap5.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap6.x * factor, ap6.z * factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap6.y * factor); + TGLPipe(GLPipe).Nodes.AddNode(ap6.x * factor, (ap6.z + WireTrayHeight)* factor * UOMToMetre(1000 / FCAD.PCad.MapScale) + FZOrder*factor*(UOMToMetre(1000 / FCAD.PCad.MapScale)), ap6.y * factor); + + if GLPipe.Material.Texture.Disabled then + begin + ComponColor := getLineComponColor(aCompon);//ConvertWinColor(clGreen); + GLPipe.Material.FrontProperties.Ambient.Color := ComponColor; + GLPipe.Material.FrontProperties.Diffuse.Color := ComponColor; + GLPipe.Material.FrontProperties.Emission.Color := ComponColor; + GLPipe.Material.BackProperties.Ambient.Color := ComponColor; + GLPipe.Material.BackProperties.Diffuse.Color := ComponColor; + GLPipe.Material.BackProperties.Emission.Color := ComponColor; + end; + + GLPipe.Material.MaterialOptions := []; + //GLPipe.Material.Texture.Disabled := False; + GLPipe.Material.Texture.Disabled := true; + GLPipe.TagObject := ChildNode; + F3DLineCompon.FGLObject := GLPipe; + TGLPipe(GLPipe).ObjectStyle := TGLPipe(GLPipe).ObjectStyle + [osDirectDraw]; + TGLPipe(GLPipe).SplineMode := lsmSegments;//lsmLines; // + + WireStep := WireStep + 0.1; + end; + end; + end; + // + end; + end; { if ChildNode <> nil then currNode := ChildNode;} @@ -3525,6 +4015,54 @@ var end; end; + Procedure OffsetTubesOnLine; + var i, HalfCount: integer; + LeftList, RightList: TList; + CenterTube: TglCylinder; + LeftOffset, RightOffset: Double; + LineAngle: double; + begin + if TubeList.Count < 2 then + exit; + LineAngle := LineFigure.GetAngleInRad(LineFigure.ap1.x, LineFigure.ap1.y, LineFigure.ap2.x, LineFigure.ap2.y); + HalfCount := TubeList.Count div 2; + LeftList := TList.Create; + RightList := TList.Create; + LeftOffset := 0; + RightOffset := 0; + CenterTube := nil; + if ((TubeList.Count mod 2) <> 0) then + begin + CenterTube := TglCylinder(TubeList[HalfCount]); + LeftOffset := max(CenterTube.TopRadius, CenterTube.BottomRadius) + 0.1; + RightOffset := max(CenterTube.TopRadius, CenterTube.BottomRadius) + 0.1; + end; + + for I := HalfCount - 1 downto 0 do + begin + LeftList.Add(TglCylinder(TubeList[i])); + RightList.Add(TglCylinder(TubeList[TubeList.Count - i - 1])); + end; + + for I := 0 to HalfCount - 1 do + begin + LeftOffset := LeftOffset + max(TglCylinder(LeftList[i]).TopRadius,TglCylinder(LeftList[i]).BottomRadius) + 0.1; + RightOffset := RightOffset + max(TglCylinder(RightList[i]).TopRadius,TglCylinder(RightList[i]).BottomRadius) + 0.1; + TglCylinder(LeftList[i]).Position.z := TglCylinder(LeftList[i]).Position.z + LeftOffset*cos(LineAngle); + TglCylinder(RightList[i]).Position.z := TglCylinder(RightList[i]).Position.z - RightOffset*cos(LineAngle); + TglCylinder(LeftList[i]).Position.z := TglCylinder(LeftList[i]).Position.z + LeftOffset*cos(LineAngle); + TglCylinder(RightList[i]).Position.z := TglCylinder(RightList[i]).Position.z - RightOffset*cos(LineAngle); + + TglCylinder(LeftList[i]).Position.x := TglCylinder(LeftList[i]).Position.x + LeftOffset*sin(LineAngle); + TglCylinder(RightList[i]).Position.x := TglCylinder(RightList[i]).Position.x - RightOffset*sin(LineAngle); + TglCylinder(LeftList[i]).Position.x := TglCylinder(LeftList[i]).Position.x + LeftOffset*sin(LineAngle); + TglCylinder(RightList[i]).Position.x := TglCylinder(RightList[i]).Position.x - RightOffset*sin(LineAngle); + end; + + LeftList.Free; + RightList.Free; + end; + begin LineComponOffset := 0; CanAddCableCompon := True; @@ -3548,15 +4086,27 @@ var LineCatalog := LineList.GetCatalogFromReferencesBySCSID(LineFigure.ID); if LineCatalog <> nil then begin + TubeList.Clear; // Tolik 20/03/2025 -- for i := 0 to LineCatalog.ComponentReferences.Count - 1 do begin LineComponent := LineCatalog.ComponentReferences[i]; if LineComponent.IsTop then begin ParentNode := xNode; - AddLineCompon(ParentNode, LineComponent, LineFigure, aLine); + //Tolik 20/03/2025 + if LineComponent.Componenttype.sysname = ctsnTube then + begin + AddLineCompon(ParentNode, LineComponent, LineFigure, aLine); + CanAddTube := False; + end + else + begin + if LineComponent.Componenttype.sysname = ctsnWireTray then + AddLineCompon(ParentNode, LineComponent, LineFigure, aLine); + end; end; end; + //OffsetTubesOnLine; end; end; end; @@ -3936,15 +4486,12 @@ begin Result := Result + (arr[high(arr)][0] * arr[0][2]); Result := Result - (arr[high(arr)][2] * arr[0][0]); end; - end; - -// begin try bb := TBitmap.Create; bb.LoadFromFile(ExeDir + '\3DTextures\inner_wall_PE.bmp'); - + TubeList := TList.create; //bb_jpg := TJPEGImage.Create; //bb_jpg.LoadFromFile(ExeDir + '\3DTextures\inner_wall_PE.jpg'); @@ -4182,7 +4729,8 @@ try TGLPipe(glObject).Slices := 32; TGLPipe(glObject).NodesColorMode := pncmAmbient; TGLPipe(glObject).Division := 3; - TGLPipe(glObject).SplineMode := lsmNURBSCurve;//lsmBezierSpline; //lsmCubicSpline; + //TGLPipe(glObject).SplineMode := lsmNURBSCurve;//lsmBezierSpline; //lsmCubicSpline; + TGLPipe(glObject).SplineMode := lsmCubicSpline; end //Tolik 10/12/2018 -- else @@ -4368,8 +4916,19 @@ try if xConn.FisPipeElement then begin //TGLPipeNode(glPipe.Nodes[k]).RadiusFactor := xConn.FPipeRadius * UOMToMetre(1000 / FCAD.PCad.MapScale) * factor; - if k = 0 then - xConn.FGLPoint := p; + //Tolik 08/04/2025 -- + //if k = 0 then + if pCnt = 2 then + begin + if k = 0 then + xConn.FGLPoint := p + end + else + begin + if pCnt = 3 then + if k = 1 then + xConn.FGLPoint := p; + end; //TGLPipeNode(glPipe.Nodes[k]).RadiusFactor := Round(xConn.FPipeRadiusArray[k]); end else @@ -4828,6 +5387,23 @@ try end; if ((xConn <> nil) and xConn.FisPipeElement) then begin + //Tolik 04/04/2025 -- + if glPipe.Nodes.Count = 2 then + begin + xConn.FGLPoint.x := glPipe.Nodes[0].x; + xConn.FGLPoint.y := glPipe.Nodes[0].y; + xConn.FGLPoint.z := glPipe.Nodes[0].z; + end + else + begin + if glPipe.Nodes.Count = 3 then + begin + xConn.FGLPoint.x := glPipe.Nodes[1].x; + xConn.FGLPoint.y := glPipe.Nodes[1].y; + xConn.FGLPoint.z := glPipe.Nodes[1].z; + end; + end; + // { glPipe.Position.X := xConn.FGLPoint.x; glPipe.Position.y := xConn.FGLPoint.y; glPipe.Position.z := xConn.FGLPoint.z;} @@ -5852,11 +6428,13 @@ try //Tolik 25/09/2018 -- //glPipe.Radius := Face.Size + { if xConn = nil then glPipe.Radius := Face.Size else if not xConn.FisPipeElement then glPipe.Radius := Face.Size; + } // {$IFEND} glPipe.Parts := [ppOutSide,ppInSide,ppStartDisk,ppStopDisk]; @@ -6019,6 +6597,15 @@ try //******************\ROOF******************* end; end; + //Tolik 19/03/2025 - , + glObject := TWireTray.Create(frm3D.DummyCube); + //TWireTray(glObject).BeginUpdate; + TWireTray(glObject).SetScene(GLScene); + TWireTray(glObject).Length := 100; + TWireTray(glObject).Width := 20; + TWireTray(glObject).Height := 20; + //TWireTray(glObject).EndUpdate; + // //// *********** FACES.COUNT ************************************************* //FCAD.FActiveNet; @@ -6324,7 +6911,7 @@ if ObjMatList.Count > 0 then except on E: Exception do AddExceptionToLogEx('Form3d.UpdateFaces', E.Message); end; - +TubeList.free; // Tolik 20/03/2025 end; procedure Tfrm3D.SetCubeBounds(var glCube: TGLCube; Points: T3dPointArray; Factor:Double); @@ -7353,8 +7940,11 @@ var xLine: T3DLine; xTube: T3DTube; Str: string; + LastConnID: integer;// Tolik 18/04/2025 -- begin try + LastConnID := -1; // Tolik 18/04/2025 -- + xModelNode := ScsModelTree.Items.GetFirstNode; // Str := FCAD.FCADListName + ' ' + IntToStr(FCAD.FCADListIndex); @@ -7383,11 +7973,38 @@ begin end else begin + //Tolik 07/05/2025 -- + if ((xConn.FSCSComponID <> -1) and (xConn.FSCSComponID = LastConnID)) then + begin + xScsNode := DuplicateNodeTree.Items.AddChild(nil, xConn.FName);; + xScsNode.Data := xConn; + xScsNode.ImageIndex := 3; + xScsNode.SelectedIndex := xScsNode.ImageIndex; + xConn.FFace.FTreeNode := xScsNode; + end + else + begin + LastConnID := xConn.FSCSComponID; + xScsNode := ScsModelTree.Items.AddChild(xListNode, xConn.FName); + xScsNode.Data := xConn; + xScsNode.ImageIndex := 3; + xScsNode.SelectedIndex := xScsNode.ImageIndex; + xConn.FFace.FTreeNode := xScsNode; + end; + { xScsNode := ScsModelTree.Items.AddChild(xListNode, xConn.FName); xScsNode.Data := xConn; xScsNode.ImageIndex := 3; xScsNode.SelectedIndex := xScsNode.ImageIndex; xConn.FFace.FTreeNode := xScsNode; + if xConn.FSCSComponID <> -1 then + begin + if xConn.FSCSComponID <> LastConnID then + LastConnID := xConn.FSCSComponID; + { else + xSCSNode.IsVisible := False; + end; + } end; end else @@ -8529,9 +9146,11 @@ var end; // begin - FMode := F3DPerspective; // Tolik 11/02/2020 - trWallTransparency.Position := 50; // Tolik 17/09/2021 -- - tbSetWallsTransparency.Enabled := False; // Tolik 17/09/2021 -- + DuplicateNodeTree.Visible := False; + + FMode := F3DPerspective; // Tolik 11/02/2020 + trWallTransparency.Position := 50; // Tolik 17/09/2021 -- + tbSetWallsTransparency.Enabled := False; // Tolik 17/09/2021 -- // Tolik 03/10/2019 -- , .obj // trWallTransparency.enabled := False; // Tolik 12/10/2021 -- @@ -8628,6 +9247,7 @@ var childNode: TTreeNode; // Tolik 18/10/2018 -- begin try + xObj := nil; // Tolik 12/05/2025 -- Result := TList.Create; xNodes := GetAllSidesNodesByNodes(aNodes); for i := 0 to xNodes.Count - 1 do @@ -8647,6 +9267,15 @@ begin if (TObject(xNode.Data).ClassName = 'T3DComponent') then xObj := TGLBaseSceneObject(T3DComponent(xNode.Data).FGLObject) else + //Tolik 17/04/2025 -- + if (TObject(xNode.Data).ClassName = 'T3DLineComponent') then + begin + //if T3DLineComponent(xNode.Data).FSCSCompon.ComponentType.SysName = ctsnWireTray then + if (T3DLineComponent(xNode.Data).FSCSCompon.ComponentType.SysName = ctsnWireTray) or + (T3DLineComponent(xNode.Data).FSCSCompon.ComponentType.SysName = ctsnTube) then // //Tolik 12/05/2025 -- + xObj := TGLBaseSceneObject(T3DLineComponent(xNode.Data).FGLObject) + end + else if (TObject(xNode.Data).ClassName = 'T3DConnector') then begin xObj := TGLBaseSceneObject(T3DConnector(xNode.Data).FGLObject); @@ -8757,6 +9386,7 @@ var LineComponentNode, LineComponentParentNode: TTreeNode; LineComponObject: TGLSceneObject; breakCounter: integer; + ComponID: integer; // Tolik 12/05/2025 -- begin try FSelection.Clear; @@ -8863,59 +9493,182 @@ begin end; if (xObj is TGLPipe) then begin - xConn := T3DConnector(TTreeNode(xObj.TagObject).Data); - // TO - if xConn.FConnType = ct_Full then + //Tolik 17/04/2025 -- + if TObject(TTreeNode(xObj.TagObject).Data).ClassName = 'T3DLineComponent' then begin - if (xConn.FGLObject1 is TGLFreeForm) then + ComponID := -1; + if T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon <> nil then + ComponID := T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon.ID; + + with TGLPipe(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FGLObject).Material do begin - with TGLFreeForm(xConn.FGLObject1).Material do + if (TGLPipe(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FGLObject).Material.MaterialOptions = []) and + (TGLPipe(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FGLObject).Material.Texture.Disabled = False) then begin - if (TGLFreeForm(xConn.FGLObject1).Material.MaterialOptions = []) and (TGLFreeForm(xConn.FGLObject1).Material.Texture.Disabled = False) then + TGLPipe(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FGLObject).Material.MaterialOptions := [moNoLighting]; + TGLPipe(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FGLObject).Material.Texture.Disabled := True; + end + else + begin + BackProperties.Ambient.Color := SelObjColor; + BackProperties.Diffuse.Color := SelObjColor; + BackProperties.Emission.Color := SelObjColor; + FrontProperties.Ambient.Color := SelObjColor; + FrontProperties.Diffuse.Color := SelObjColor; + FrontProperties.Emission.Color := SelObjColor; + end; + end; + //Tolik 12/05/2025 -- + if ComponID <> -1 then + begin + for j := 0 to DuplicateNodeTree.Items.Count - 1 do + begin + if TObject(DuplicateNodeTree.Items[j].Data).ClassName = 'T3DLineComponent' then begin - TGLFreeForm(xConn.FGLObject1).Material.MaterialOptions := [moNoLighting]; - TGLFreeForm(xConn.FGLObject1).Material.Texture.Disabled := True; - end - else - begin - BackProperties.Ambient.Color := SelObjColor; - BackProperties.Diffuse.Color := SelObjColor; - BackProperties.Emission.Color := SelObjColor; - FrontProperties.Ambient.Color := SelObjColor; - FrontProperties.Diffuse.Color := SelObjColor; - FrontProperties.Emission.Color := SelObjColor; + if T3DLineComponent(DuplicateNodeTree.Items[j].Data).FSCSCompon <> nil then + begin + if T3DLineComponent(DuplicateNodeTree.Items[j].Data).FSCSCompon.ID = ComponID then + begin + with TglPipe(T3DLineComponent(DuplicateNodeTree.Items[j].Data).FGLObject).Material do + begin + if (TGLPipe(T3DLineComponent(DuplicateNodeTree.Items[j].Data).FGLObject).Material.MaterialOptions = []) and + (TGLPipe(T3DLineComponent(DuplicateNodeTree.Items[j].Data).FGLObject).Material.Texture.Disabled = False) then + begin + TGLPipe(T3DLineComponent(DuplicateNodeTree.Items[j].Data).FGLObject).Material.MaterialOptions := [moNoLighting]; + TGLPipe(T3DLineComponent(DuplicateNodeTree.Items[j].Data).FGLObject).Material.Texture.Disabled := True; + end + else + begin + BackProperties.Ambient.Color := SelObjColor; + BackProperties.Diffuse.Color := SelObjColor; + BackProperties.Emission.Color := SelObjColor; + FrontProperties.Ambient.Color := SelObjColor; + FrontProperties.Diffuse.Color := SelObjColor; + FrontProperties.Emission.Color := SelObjColor; + end; + end; + end; + end; end; end; end; end else - // Clear Connector - begin - if xConn.FisPipeElement then + begin // + xConn := T3DConnector(TTreeNode(xObj.TagObject).Data); + // TO + if xConn.FConnType = ct_Full then begin - with TGLPipe(xConn.FGLObject).Material do + if (xConn.FGLObject1 is TGLFreeForm) then begin - if (TGLPipe(xConn.FGLObject).Material.MaterialOptions = []) and (TGLPipe(xConn.FGLObject).Material.Texture.Disabled = False) then + with TGLFreeForm(xConn.FGLObject1).Material do begin - TGLPipe(xConn.FGLObject).Material.MaterialOptions := [moNoLighting]; - TGLPipe(xConn.FGLObject).Material.Texture.Disabled := True; - end - else - begin - BackProperties.Ambient.Color := SelObjColor; - BackProperties.Diffuse.Color := SelObjColor; - BackProperties.Emission.Color := SelObjColor; - FrontProperties.Ambient.Color := SelObjColor; - FrontProperties.Diffuse.Color := SelObjColor; - FrontProperties.Emission.Color := SelObjColor; + if (TGLFreeForm(xConn.FGLObject1).Material.MaterialOptions = []) and (TGLFreeForm(xConn.FGLObject1).Material.Texture.Disabled = False) then + begin + TGLFreeForm(xConn.FGLObject1).Material.MaterialOptions := [moNoLighting]; + TGLFreeForm(xConn.FGLObject1).Material.Texture.Disabled := True; + end + else + begin + BackProperties.Ambient.Color := SelObjColor; + BackProperties.Diffuse.Color := SelObjColor; + BackProperties.Emission.Color := SelObjColor; + FrontProperties.Ambient.Color := SelObjColor; + FrontProperties.Diffuse.Color := SelObjColor; + FrontProperties.Emission.Color := SelObjColor; + end; end; end; + end + else + // Clear Connector + begin + if xConn.FisPipeElement then + begin + for j := 0 to SCSModelTree.Items.Count - 1 do + begin + if TObject(TTreeNode(SCSModelTree.Items[j]).Data).ClassName = 'T3DConnector' then + begin + if T3DConnector(TTreeNode(SCSModelTree.Items[j]).Data).FSCSComponID = xConn.FSCSComponID then + begin + with TGLPipe(T3DConnector(TTreeNode(SCSModelTree.Items[j]).Data).FGLObject).Material do + begin + if (TGLPipe(T3DConnector(TTreeNode(SCSModelTree.Items[j]).Data).FGLObject).Material.MaterialOptions = []) and + (TGLPipe(T3DConnector(TTreeNode(SCSModelTree.Items[j]).Data).FGLObject).Material.Texture.Disabled = False) then + begin + TGLPipe(T3DConnector(TTreeNode(SCSModelTree.Items[j]).Data).FGLObject).Material.MaterialOptions := [moNoLighting]; + TGLPipe(T3DConnector(TTreeNode(SCSModelTree.Items[j]).Data).FGLObject).Material.Texture.Disabled := True; + end + else + begin + BackProperties.Ambient.Color := SelObjColor; + BackProperties.Diffuse.Color := SelObjColor; + BackProperties.Emission.Color := SelObjColor; + FrontProperties.Ambient.Color := SelObjColor; + FrontProperties.Diffuse.Color := SelObjColor; + FrontProperties.Emission.Color := SelObjColor; + end; + end; + end; + end; + end; + + for j := 0 to DuplicateNodeTree.Items.Count - 1 do + begin + if TObject(TTreeNode(DuplicateNodeTree.Items[j]).Data).ClassName = 'T3DConnector' then + begin + if T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FSCSComponID = xConn.FSCSComponID then + begin + with TGLPipe(T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FGLObject).Material do + begin + if (TGLPipe(T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FGLObject).Material.MaterialOptions = []) and + (TGLPipe(T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FGLObject).Material.Texture.Disabled = False) then + begin + TGLPipe(T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FGLObject).Material.MaterialOptions := [moNoLighting]; + TGLPipe(T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FGLObject).Material.Texture.Disabled := True; + end + else + begin + BackProperties.Ambient.Color := SelObjColor; + BackProperties.Diffuse.Color := SelObjColor; + BackProperties.Emission.Color := SelObjColor; + FrontProperties.Ambient.Color := SelObjColor; + FrontProperties.Diffuse.Color := SelObjColor; + FrontProperties.Emission.Color := SelObjColor; + end; + end; + end; + end; + end; + //Tolik 09/05/2025 -- + + { + with TGLPipe(xConn.FGLObject).Material do + begin + if (TGLPipe(xConn.FGLObject).Material.MaterialOptions = []) and (TGLPipe(xConn.FGLObject).Material.Texture.Disabled = False) then + begin + TGLPipe(xConn.FGLObject).Material.MaterialOptions := [moNoLighting]; + TGLPipe(xConn.FGLObject).Material.Texture.Disabled := True; + end + else + begin + BackProperties.Ambient.Color := SelObjColor; + BackProperties.Diffuse.Color := SelObjColor; + BackProperties.Emission.Color := SelObjColor; + FrontProperties.Ambient.Color := SelObjColor; + FrontProperties.Diffuse.Color := SelObjColor; + FrontProperties.Emission.Color := SelObjColor; + end; + end; + } + end; end; end; end; // Tolik 03/10/2018 -- if (xObj is TGLCylinder) then begin + //if TObject(TTreeNode(xObj.TagObject).Data).ClassName = 'T3DTube' then if TObject(TTreeNode(xObj.TagObject).Data).ClassName = 'T3DTube' then begin xTube := T3DTube(TTreeNode(xObj.TagObject).Data); @@ -8958,8 +9711,9 @@ begin if not isUserTransparency then begin ComponColor := ConvertWinColor(clGray); - if F3DLineComponent.FSCSCompon <> nil then - ComponColor := getLineComponColor(F3DLineComponent.FSCSCompon); + //Tolik 12/05/2025 -- + { if F3DLineComponent.FSCSCompon <> nil then + ComponColor := getLineComponColor(F3DLineComponent.FSCSCompon);} BackProperties.Ambient.Color := ComponColor; BackProperties.Diffuse.Color := ComponColor; @@ -9170,7 +9924,7 @@ var // Tolik 23/11/2018 -- LineComponentNode, LineComponentParentNode: TTreeNode; LineComponObject: TGLSceneObject; - + ComponID: integer; // Tolik 12/05/2025 -- begin try JoinConn1 := nil; @@ -9269,46 +10023,167 @@ begin end; if (xObj is TGLPipe) then begin - xConn := T3DConnector(TTreeNode(xObj.TagObject).Data); - if (xConn.FGLObject1 is TGLFreeForm) then + if TObject(TTreeNode(xObj.TagObject).Data).ClassName = 'T3DLineComponent' then begin - with TGLFreeForm(xConn.FGLObject1).Material do + ComponID := -1; + if T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon <> nil then + ComponID := T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon.ID; + + with TGLFreeForm(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FGLObject).Material do begin - if (TGLFreeForm(xConn.FGLObject1).Material.MaterialOptions = [moNoLighting]) and (TGLFreeForm(xConn.FGLObject1).Material.Texture.Disabled = True) then + if (TGLFreeForm(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FGLObject).Material.MaterialOptions = [moNoLighting]) and + (TGLFreeForm(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FGLObject).Material.Texture.Disabled = True) then begin - TGLFreeForm(xConn.FGLObject1).Material.MaterialOptions := []; - TGLFreeForm(xConn.FGLObject1).Material.Texture.Disabled := False; + TGLFreeForm(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FGLObject).Material.MaterialOptions := []; + TGLFreeForm(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FGLObject).Material.Texture.Disabled := False; end else begin - BackProperties.Ambient.Color := xConn.FColor; - BackProperties.Diffuse.Color := xConn.FColor; - BackProperties.Emission.Color := xConn.FColor; - FrontProperties.Ambient.Color := xConn.FColor; - FrontProperties.Diffuse.Color := xConn.FColor; - FrontProperties.Emission.Color := xConn.FColor; + BackProperties.Ambient.Color := getLineComponColor(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon); + BackProperties.Diffuse.Color := getLineComponColor(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon); + BackProperties.Emission.Color := getLineComponColor(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon); + FrontProperties.Ambient.Color := getLineComponColor(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon); + FrontProperties.Diffuse.Color := getLineComponColor(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon); + FrontProperties.Emission.Color := getLineComponColor(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon); end; end; - end; - if xConn.FisPipeElement then - begin - with TGLPipe(xConn.FGLObject).Material do + if ComponID <> -1 then begin - if (TGLPipe(xConn.FGLObject).Material.MaterialOptions = [moNoLighting]) and (TGLPipe(xConn.FGLObject).Material.Texture.Disabled = True) then + for j := 0 to DuplicateNodeTree.Items.Count - 1 do begin - TGLPipe(xConn.FGLObject).Material.MaterialOptions := []; - TGLPipe(xConn.FGLObject).Material.Texture.Disabled := False; - end - else - begin - BackProperties.Ambient.Color := xConn.FColor; - BackProperties.Diffuse.Color := xConn.FColor; - BackProperties.Emission.Color := xConn.FColor; - FrontProperties.Ambient.Color := xConn.FColor; - FrontProperties.Diffuse.Color := xConn.FColor; - FrontProperties.Emission.Color := xConn.FColor; + if TObject(DuplicateNodeTree.Items[j].data).ClassName = 'T3DLineComponent' then + begin + if T3DLineComponent(DuplicateNodeTree.Items[j].data).FSCSCompon <> nil then + begin + if T3DLineComponent(DuplicateNodeTree.Items[j].data).FSCSCompon.ID = ComponID then + begin + with TGLFreeForm(T3DLineComponent(DuplicateNodeTree.Items[j].data).FGLObject).Material do + begin + if (TGLFreeForm(T3DLineComponent(DuplicateNodeTree.Items[j].data).FGLObject).Material.MaterialOptions = [moNoLighting]) and + (TGLFreeForm(T3DLineComponent(DuplicateNodeTree.Items[j].data).FGLObject).Material.Texture.Disabled = True) then + begin + TGLFreeForm(T3DLineComponent(DuplicateNodeTree.Items[j].data).FGLObject).Material.MaterialOptions := []; + TGLFreeForm(T3DLineComponent(DuplicateNodeTree.Items[j].data).FGLObject).Material.Texture.Disabled := False; + end + else + begin + BackProperties.Ambient.Color := getLineComponColor(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon); + BackProperties.Diffuse.Color := getLineComponColor(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon); + BackProperties.Emission.Color := getLineComponColor(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon); + FrontProperties.Ambient.Color := getLineComponColor(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon); + FrontProperties.Diffuse.Color := getLineComponColor(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon); + FrontProperties.Emission.Color := getLineComponColor(T3DLineComponent(TTreeNode(xObj.TagObject).Data).FSCSCompon); + end; + end; + end; + end; + end; end; end; + end + else + begin + // + xConn := T3DConnector(TTreeNode(xObj.TagObject).Data); + if (xConn.FGLObject1 is TGLFreeForm) then + begin + with TGLFreeForm(xConn.FGLObject1).Material do + begin + if (TGLFreeForm(xConn.FGLObject1).Material.MaterialOptions = [moNoLighting]) and (TGLFreeForm(xConn.FGLObject1).Material.Texture.Disabled = True) then + begin + TGLFreeForm(xConn.FGLObject1).Material.MaterialOptions := []; + TGLFreeForm(xConn.FGLObject1).Material.Texture.Disabled := False; + end + else + begin + BackProperties.Ambient.Color := xConn.FColor; + BackProperties.Diffuse.Color := xConn.FColor; + BackProperties.Emission.Color := xConn.FColor; + FrontProperties.Ambient.Color := xConn.FColor; + FrontProperties.Diffuse.Color := xConn.FColor; + FrontProperties.Emission.Color := xConn.FColor; + end; + end; + end; + if xConn.FisPipeElement then + begin + //Tolik 18/04/2025 -- + for j := 0 to ScsModelTree.Items.Count - 1 do + begin + if TObject(TTreeNode(ScsModelTree.Items[j]).Data).ClassName = 'T3DConnector' then + begin + if T3DConnector(TTreeNode(ScsModelTree.Items[j]).Data).FSCSComponID = xConn.FSCSComponID then + begin + with TGLPipe(T3DConnector(TTreeNode(ScsModelTree.Items[j]).Data).FGLObject).Material do + begin + if (TGLPipe(T3DConnector(TTreeNode(ScsModelTree.Items[j]).Data).FGLObject).Material.MaterialOptions = [moNoLighting]) and + (TGLPipe(T3DConnector(TTreeNode(ScsModelTree.Items[j]).Data).FGLObject).Material.Texture.Disabled = True) then + begin + TGLPipe(T3DConnector(TTreeNode(ScsModelTree.Items[j]).Data).FGLObject).Material.MaterialOptions := []; + TGLPipe(T3DConnector(TTreeNode(ScsModelTree.Items[j]).Data).FGLObject).Material.Texture.Disabled := False; + end + else + begin + BackProperties.Ambient.Color := T3DConnector(TTreeNode(ScsModelTree.Items[j]).Data).FColor; + BackProperties.Diffuse.Color := T3DConnector(TTreeNode(ScsModelTree.Items[j]).Data).FColor; + BackProperties.Emission.Color := T3DConnector(TTreeNode(ScsModelTree.Items[j]).Data).FColor; + FrontProperties.Ambient.Color := T3DConnector(TTreeNode(ScsModelTree.Items[j]).Data).FColor; + FrontProperties.Diffuse.Color := T3DConnector(TTreeNode(ScsModelTree.Items[j]).Data).FColor; + FrontProperties.Emission.Color := T3DConnector(TTreeNode(ScsModelTree.Items[j]).Data).FColor; + end; + end; + end; + end; + end; + + // Tolik 09/05/2025 -- + for j := 0 to DuplicateNodeTree.Items.Count - 1 do + begin + if TObject(TTreeNode(DuplicateNodeTree.Items[j]).Data).ClassName = 'T3DConnector' then + begin + if T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FSCSComponID = xConn.FSCSComponID then + begin + with TGLPipe(T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FGLObject).Material do + begin + if (TGLPipe(T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FGLObject).Material.MaterialOptions = [moNoLighting]) and + (TGLPipe(T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FGLObject).Material.Texture.Disabled = True) then + begin + TGLPipe(T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FGLObject).Material.MaterialOptions := []; + TGLPipe(T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FGLObject).Material.Texture.Disabled := False; + end + else + begin + BackProperties.Ambient.Color := T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FColor; + BackProperties.Diffuse.Color := T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FColor; + BackProperties.Emission.Color := T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FColor; + FrontProperties.Ambient.Color := T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FColor; + FrontProperties.Diffuse.Color := T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FColor; + FrontProperties.Emission.Color := T3DConnector(TTreeNode(DuplicateNodeTree.Items[j]).Data).FColor; + end; + end; + end; + end; + end; + { + with TGLPipe(xConn.FGLObject).Material do + begin + if (TGLPipe(xConn.FGLObject).Material.MaterialOptions = [moNoLighting]) and (TGLPipe(xConn.FGLObject).Material.Texture.Disabled = True) then + begin + TGLPipe(xConn.FGLObject).Material.MaterialOptions := []; + TGLPipe(xConn.FGLObject).Material.Texture.Disabled := False; + end + else + begin + BackProperties.Ambient.Color := xConn.FColor; + BackProperties.Diffuse.Color := xConn.FColor; + BackProperties.Emission.Color := xConn.FColor; + FrontProperties.Ambient.Color := xConn.FColor; + FrontProperties.Diffuse.Color := xConn.FColor; + FrontProperties.Emission.Color := xConn.FColor; + end; + end; + } + end; end; end; // Tolik 03/10/2018 -- @@ -9763,7 +10638,9 @@ begin end; procedure Tfrm3D.FormDestroy(Sender: TObject); +var i: integer; begin + ObjMatList.Free; // Tolik 02/10/2019 -- if FSelection <> nil then //FreeAndNil(FSelection); @@ -18176,31 +19053,35 @@ var tmpdir, tmpfname: string; begin try - xObject := T3DLine(aObject.Data); - xGLObject := TGLBaseSceneObject(xObject.FGLObject); - edScsName.Text := xObject.FName; - edScsIndex.Text := IntToStr(xObject.FIndex); + //Tolik 17/04/2025 -- + if TObject(aObject.Data).ClassName = 'T3DLine' then + begin + xObject := T3DLine(aObject.Data); + xGLObject := TGLBaseSceneObject(xObject.FGLObject); + edScsName.Text := xObject.FName; + edScsIndex.Text := IntToStr(xObject.FIndex); - mScsDesc.Clear; - for i := 0 to xObject.FDescription.Count - 1 do - mScsDesc.Lines.Add(xObject.FDescription[i]); + mScsDesc.Clear; + for i := 0 to xObject.FDescription.Count - 1 do + mScsDesc.Lines.Add(xObject.FDescription[i]); - mScsCaption.Clear; - for i := 0 to xObject.FCaptions.Count - 1 do - mScsCaption.Lines.Add(xObject.FCaptions[i]); + mScsCaption.Clear; + for i := 0 to xObject.FCaptions.Count - 1 do + mScsCaption.Lines.Add(xObject.FCaptions[i]); - mScsNote.Clear; - for i := 0 to xObject.FNotes.Count - 1 do - mScsNote.Lines.Add(xObject.FNotes[i]); + mScsNote.Clear; + for i := 0 to xObject.FNotes.Count - 1 do + mScsNote.Lines.Add(xObject.FNotes[i]); - edScsLength.Text := FormatFloat(ffMask, xObject.FLength); + edScsLength.Text := FormatFloat(ffMask, xObject.FLength); - edScsLineX1.Text := FormatFloat(ffMask, xObject.FPoint1.x); - edScsLineY1.Text := FormatFloat(ffMask, xObject.FPoint1.y); - edScsLineZ1.Text := FormatFloat(ffMask, xObject.FPoint1.z); - edScsLineX2.Text := FormatFloat(ffMask, xObject.FPoint2.x); - edScsLineY2.Text := FormatFloat(ffMask, xObject.FPoint2.y); - edScsLineZ2.Text := FormatFloat(ffMask, xObject.FPoint2.z); + edScsLineX1.Text := FormatFloat(ffMask, xObject.FPoint1.x); + edScsLineY1.Text := FormatFloat(ffMask, xObject.FPoint1.y); + edScsLineZ1.Text := FormatFloat(ffMask, xObject.FPoint1.z); + edScsLineX2.Text := FormatFloat(ffMask, xObject.FPoint2.x); + edScsLineY2.Text := FormatFloat(ffMask, xObject.FPoint2.y); + edScsLineZ2.Text := FormatFloat(ffMask, xObject.FPoint2.z); + end; except on E: Exception do AddExceptionToLogEx('Tfrm3D.LoadPropertiesForSingleLine', E.Message); @@ -20552,10 +21433,94 @@ begin end; end; +Function Tfrm3D.Get3DPoint(aLine: T3DLine; PointNum: Integer; dist: Double): PDoublePoint; // Tolik 07/04/2025 -- + var p1, p2: TDoublePoint; + i, direction: Integer; + TubeCompon: TSCSComponent; + distx, disty, distz, koefx, koefy, koefz, LineLen: Double; + LineCatalog: TSCSCatalog; + CirclePoint: PDoublePoint; + RealRadius: Double; + PointsAngle: Double; + Conn1,Conn2: T3DConnector; + MaxX, MaxY, MinX, MinY, DistToPoint: Double; + + begin + Result := Nil; + New(Result); + + DistToPoint := Dist; + + Conn1 := T3DConnector(aLine.FJoinConnector1); + Conn2 := T3DConnector(aLine.FJoinConnector2); + + if PointNum = 1 then + begin + p1.x := Conn1.FGLPoint.x; + p1.y := Conn1.FGLPoint.y; + p1.z := Conn1.FGLPoint.z; + + p2.x := Conn2.FGLPoint.x; + p2.y := Conn2.FGLPoint.y; + p2.z := Conn2.FGLPoint.z; + end + else + if PointNum = 2 then + begin + p2.x := Conn1.FGLPoint.x; + p2.y := Conn1.FGLPoint.y; + p2.z := Conn1.FGLPoint.z; + + p1.x := Conn2.FGLPoint.x; + p1.y := Conn2.FGLPoint.y; + p1.z := Conn2.FGLPoint.z; + end + else + begin + Dispose(Result); + Result := Nil; + exit; + end; + + LineLen := SQRT(SQR(p1.x - p2.x) + SQR(p1.y - p2.y) + SQR(p1.z - p2.z)); + + koefx := ABS((p2.x - p1.x))/LineLen; + koefy := ABS((p2.y - p1.y))/LineLen; + koefz := ABS((p2.z - p1.z))/LineLen; + + direction := 0; + if comparevalue(p2.x, p1.x) = -1 then + direction := -1 + else + if comparevalue(p2.x, p1.x) = 1 then + direction := 1; + + Result.x := p1.x + direction * DistTopoint * koefx; + + direction := 0; + if comparevalue(p2.y, p1.y) = -1 then + direction := -1 + else + if comparevalue(p2.y, p1.y) = 1 then + direction := 1; + + Result.y := p1.y + direction * DistTopoint * koefy; + + direction := 0; + + if comparevalue(p2.z, p1.z) = -1 then + direction := -1 + else + if comparevalue(p2.z, p1.z) = 1 then + direction := 1; + + Result.z := p1.z + direction * DistTopoint * koefz; + end; + // Tolik 18/10/2018 -- -- procedure Tfrm3D.Move3DConnector(aObj: T3DConnector; dp: T3DPoint; AIsFirstObject: Boolean=false); var - i, j: integer; + i, j, k, l: integer; xConn, xConn1, xConn2, xGetConn, xRaiseConn, xObjFromRaise: T3DConnector; xLine: T3DLine; pos: T3DPoint; @@ -20569,6 +21534,8 @@ var OldParentAngle: double; ObjPos: TVector4F; OldParentPos: TDoublePoint; + //*Tolik 27/03/2025 -- + MovedLineList, OtherSideConnList, RelatedPipeConns, OtherRelatedPipeConns: TList; Function GetSelfNode: TTreeNode; var i: Integer; @@ -20694,6 +21661,191 @@ var if ConnNode <> nil then Result := CheckCanMoveChildCompons(ConnNode); end; + // Tolik 27/03/2025 -- + Procedure GetRelatedObjects; // , , , + // + var i: integer; + begin + // , + for I := 0 to DummyCube.Count - 1 do + begin + if DummyCube.Children[i] is TGLPipe then + begin + RelatedPipeConns.Add(DummyCube.Children[i]); + end; + end; + end; + + Procedure AlignPipeObjects; + var i, j: integer; + currPipe: TGLPipe; + PipePoint: PDoublePoint; + RelatedLine, RelatedLine2: T3DLine; + RelatedSCSLine: TOrthoLine; + A3DConn: T3DConnector; + begin + for j := 0 to RelatedPipeConns.Count - 1 do + begin + A3DConn := T3DConnector(RelatedPipeConns[j]); + if A3DConn.FRelatedLines.Count > 0 then + begin + if A3DConn.FRelatedLines.Count = 1 then // + begin + RelatedSCSLine := TOrthoLine(A3DConn.FRelatedLines[0]); + RelatedLine := nil; + for i := 0 to SCSModelTree.Items.Count - 1 do + begin + if TObject(TTreeNode(SCSModelTree.Items[i]).Data) is T3DLine then + begin + if T3DLine(TTreeNode(SCSModelTree.Items[i]).Data).FSCSObject <> nil then + begin + if T3DLine(TTreeNode(SCSModelTree.Items[i]).Data).FSCSObject.ID = RelatedSCSLine.ID then + begin + RelatedLine := T3DLine(TTreeNode(SCSModelTree.Items[i]).Data); + break; + end; + end; + end; + end; + if RelatedLine <> nil then + begin + if A3DConn.FSCSObject.ID = RelatedLine.FJoinConnector1.FSCSObject.ID then + PipePoint := Get3DPoint(RelatedLine, 1, A3DConn.FLength * UOMToMetre(1000 / FCAD.PCad.MapScale) * factor) + else + PipePoint := Get3DPoint(RelatedLine, 2, A3DConn.FLength * UOMToMetre(1000 / FCAD.PCad.MapScale) * factor); + + {TGLPiPe(A3DConn.FGLObject).Nodes[0].X := TGLPiPe(A3DConn.FGLObject).Nodes[0].X + dp.x; + TGLPiPe(A3DConn.FGLObject).Nodes[0].Y := TGLPiPe(A3DConn.FGLObject).Nodes[0].Y + dp.y; + TGLPiPe(A3DConn.FGLObject).Nodes[0].Z := TGLPiPe(A3DConn.FGLObject).Nodes[0].Z + dp.z;} + + TGLPiPe(A3DConn.FGLObject).Nodes[1].X := PipePoint.x; + TGLPiPe(A3DConn.FGLObject).Nodes[1].Y := PipePoint.y; + TGLPiPe(A3DConn.FGLObject).Nodes[1].Z := PipePoint.z; + DisPose(PipePoint); + end; + end; + if A3DConn.FRelatedLines.Count = 2 then //, , + begin + RelatedSCSLine := TOrthoLine(A3DConn.FRelatedLines[0]); + RelatedLine := nil; + + for i := 0 to SCSModelTree.Items.Count - 1 do + begin + if TObject(TTreeNode(SCSModelTree.Items[i]).Data) is T3DLine then + begin + if T3DLine(TTreeNode(SCSModelTree.Items[i]).Data).FSCSObject <> nil then + begin + if T3DLine(TTreeNode(SCSModelTree.Items[i]).Data).FSCSObject.ID = RelatedSCSLine.ID then + begin + RelatedLine := T3DLine(TTreeNode(SCSModelTree.Items[i]).Data); + break; + end; + end; + end; + end; + + if RelatedLine <> nil then + begin + if A3DConn.FSCSObject.ID = RelatedLine.FJoinConnector1.FSCSObject.ID then + PipePoint := Get3DPoint(RelatedLine, 1, A3DConn.FLength * UOMToMetre(1000 / FCAD.PCad.MapScale) * factor) + else + PipePoint := Get3DPoint(RelatedLine, 2, A3DConn.FLength * UOMToMetre(1000 / FCAD.PCad.MapScale) * factor); + + RelatedSCSLine := A3DConn.FRelatedLines[1]; + RelatedLine := nil; + + for i := 0 to SCSModelTree.Items.Count - 1 do + begin + if TObject(TTreeNode(SCSModelTree.Items[i]).Data) is T3DLine then + begin + if T3DLine(TTreeNode(SCSModelTree.Items[i]).Data).FSCSObject <> nil then + begin + if T3DLine(TTreeNode(SCSModelTree.Items[i]).Data).FSCSObject.ID = RelatedSCSLine.ID then + begin + RelatedLine := T3DLine(TTreeNode(SCSModelTree.Items[i]).Data); + break; + end; + end; + end; + end; + + if RelatedLine <> nil then + begin + TGLPiPe(A3DConn.FGLObject).Nodes[0].X := PipePoint.x; + TGLPiPe(A3DConn.FGLObject).Nodes[0].Y := PipePoint.y; + TGLPiPe(A3DConn.FGLObject).Nodes[0].Z := PipePoint.z; + { + TGLPiPe(A3DConn.FGLObject).Nodes[1].X := TGLPiPe(A3DConn.FGLObject).Nodes[0].X + dp.x; + TGLPiPe(A3DConn.FGLObject).Nodes[1].Y := TGLPiPe(A3DConn.FGLObject).Nodes[0].Y + dp.y; + TGLPiPe(A3DConn.FGLObject).Nodes[1].Z := TGLPiPe(A3DConn.FGLObject).Nodes[0].Z + dp.z; + } + Dispose(PipePoint); + if A3DConn.FSCSObject.ID = RelatedLine.FJoinConnector1.FSCSObject.ID then + PipePoint := Get3DPoint(RelatedLine, 1, A3DConn.FLength * UOMToMetre(1000 / FCAD.PCad.MapScale) * factor) + else + PipePoint := Get3DPoint(RelatedLine, 2, A3DConn.FLength * UOMToMetre(1000 / FCAD.PCad.MapScale) * factor); + + TGLPiPe(A3DConn.FGLObject).Nodes[2].X := PipePoint.x; + TGLPiPe(A3DConn.FGLObject).Nodes[2].Y := PipePoint.y; + TGLPiPe(A3DConn.FGLObject).Nodes[2].Z := PipePoint.z; + + DisPose(PipePoint); + end; + end; + end; + end; + end; + end; + + Procedure AlignRelatedConns; + var i, j: integer; + LineConn1, LineConn2, NextSideConn: T3DConnector; + SelfLine, JoinedLine: T3DLine; + NextSideConnsList: TList; + SCSLineList: TList; + SCSConn: TConnectorObject; + SCSLine: TOrtholine; + + begin + SelfLine := nil; + NextSideConnsList := TList.Create; + SCSLineList := TList.Create; + RelatedPipeConns.Clear; + + if xConn.FSCSObject <> nil then + begin + for i := 0 to TConnectorObject(xConn.FSCSObject).JoinedOrtholinesList.Count - 1 do + begin + SCSLine := TConnectorObject(xConn.FSCSObject).JoinedOrtholinesList[i]; + if SCSLine.JoinConnector1.ID = TConnectorObject(xConn.FSCSObject).ID then + SCSConn := TConnectorObject(SCSLine.JoinConnector2) + else + SCSConn := TConnectorObject(SCSLine.JoinConnector1); + + for j := 0 to SCSModelTree.Items.Count - 1 do + begin + if TObject(TTreeNode(SCSModelTree.Items[j]).Data) is T3DConnector then + begin + if T3DConnector(TTreeNode(SCSModelTree.Items[j]).Data).FSCSObject <> nil then + begin + if T3DConnector(TTreeNode(SCSModelTree.Items[j]).Data).FSCSObject.ID = SCSConn.ID then + begin + if T3DConnector(TTreeNode(SCSModelTree.Items[j]).Data).FisPipeElement then + begin + if T3DConnector(TTreeNode(SCSModelTree.Items[j]).Data) <> xConn then + RelatedPipeConns.Add(T3DConnector(TTreeNode(SCSModelTree.Items[j]).Data)); + end; + end; + end; + end; + end; + end; + end; + AlignPipeObjects; + NextSideConnsList.Free; + SCSLineList.Free; + end; + // begin try @@ -20701,6 +21853,7 @@ begin exit; xGLObject := nil; xConn := aObj; + // Tolik 26/04/2018 -- { if dp.y <> 0 then @@ -20710,7 +21863,11 @@ begin // if IsConnectorMoved(xConn) then exit; // object already moved! - + MovedLineList := TList.create; + OtherSideConnList := TList.create; + RelatedPipeConns := TList.create; + OtherRelatedPipeConns := TList.create; + //GetRelatedObjects; if WasShiftMouse then begin if FMovedComponent <> nil then @@ -20797,6 +21954,7 @@ begin begin if TglBasesceneObject(xConn.FGLObject).TagObject <> nil then if TTreeNode(TglBasesceneObject(xConn.FGLObject).TagObject).Count > 0 then + //if (TTreeNode(TglBasesceneObject(xConn.FGLObject).TagObject).Count > 0) or (xConn.FGLObject is TGLPipe) then begin TglBasesceneObject(xConn.FGLObject).Position.X := TglBasesceneObject(xConn.FGLObject).Position.X + dp.x; TglBasesceneObject(xConn.FGLObject).Position.Y := TglBasesceneObject(xConn.FGLObject).Position.Y + dp.y; @@ -20883,9 +22041,87 @@ begin begin if xGLObject <> nil then begin - xGLObject.Nodes[0].X := xGLObject.Nodes[0].X + dp.x; - xGLObject.Nodes[0].Y := xGLObject.Nodes[0].Y + dp.y; - xGLObject.Nodes[0].Z := xGLObject.Nodes[0].Z + dp.z; + //Tolik 26/03/2025 ** + if xConn.FisPipeElement then + begin + if xGLObject is TGLPipe then + begin + if xConn.FSCSObject <> nil then + begin + RelatedPipeConns.Clear; + for k := 0 to SCSModelTree.Items.Count - 1 do + begin + if TObject(TTreeNode(SCSModelTree.Items[k]).Data) is T3DConnector then + begin + if T3DConnector(TTreeNode(SCSModelTree.Items[k]).Data).FSCSObject <> nil then + begin + if T3DConnector(TTreeNode(SCSModelTree.Items[k]).Data).FSCSObject.ID = xConn.FSCSObject.ID then + begin + if T3DConnector(TTreeNode(SCSModelTree.Items[k]).Data).FGLObject <> nil then + begin + if T3DConnector(TTreeNode(SCSModelTree.Items[k]).Data).FGLObject is TGLPipe then + begin + RelatedPipeConns.Add(T3DConnector(TTreeNode(SCSModelTree.Items[k]).Data)); + end; + end; + end; + end; + end; + end; + { + for l := 0 to RelatedPipeConns.Count - 1 do + begin + for k := 0 to TGLPipe(RelatedPipeConns[l]).Nodes.Count - 1 do + begin + TGLPipe(RelatedPipeConns[l]).Nodes[k].X := TGLPipe(RelatedPipeConns[l]).Nodes[k].X + dp.x; + TGLPipe(RelatedPipeConns[l]).Nodes[k].Y := TGLPipe(RelatedPipeConns[l]).Nodes[k].Y + dp.y; + TGLPipe(RelatedPipeConns[l]).Nodes[k].Z := TGLPipe(RelatedPipeConns[l]).Nodes[k].Z + dp.z; + end; + end; + for k := 0 to xConn.FJoinedLinesList.Count - 1 do + MovedLineList.Add(xConn.FJoinedLinesList[k]); + } + for l := 0 to RelatedPipeConns.Count - 1 do + begin + if TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes.Count = 2 then + begin + TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes[0].X := TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes[0].X + dp.x; + TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes[0].Y := TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes[0].Y + dp.y; + TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes[0].Z := TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes[0].Z + dp.z; + end; + + if TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes.Count = 3 then + begin + TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes[1].X := TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes[1].X + dp.x; + TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes[1].Y := TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes[1].Y + dp.y; + TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes[1].Z := TglPipe(T3DConnector(RelatedPipeConns[l]).FGLObject).Nodes[1].Z + dp.z; + end; + end; + //AlignPipeObjects; + end + else + begin + for k := 0 to xGLObject.Nodes.Count - 1 do + begin + xGLObject.Nodes[k].X := xGLObject.Nodes[k].X + dp.x; + xGLObject.Nodes[k].Y := xGLObject.Nodes[k].Y + dp.y; + xGLObject.Nodes[k].Z := xGLObject.Nodes[k].Z + dp.z; + end; + end; + end + else + begin + xGLObject.Nodes[0].X := xGLObject.Nodes[0].X + dp.x; + xGLObject.Nodes[0].Y := xGLObject.Nodes[0].Y + dp.y; + xGLObject.Nodes[0].Z := xGLObject.Nodes[0].Z + dp.z; + end; + end + else + begin + xGLObject.Nodes[0].X := xGLObject.Nodes[0].X + dp.x; + xGLObject.Nodes[0].Y := xGLObject.Nodes[0].Y + dp.y; + xGLObject.Nodes[0].Z := xGLObject.Nodes[0].Z + dp.z; + end; end; end; @@ -20915,9 +22151,59 @@ begin begin if xGLObject <> nil then begin - xConn.FGLPoint.x := xGLObject.Nodes[0].X; - xConn.FGLPoint.y := xGLObject.Nodes[0].Y - xConn.FZOrder; - xConn.FGLPoint.z := xGLObject.Nodes[0].Z; + //Tolik 03/04/2025 -- + if xGLObject is TGLPipe then + begin + //Tolik 03/04/2025 -- + if xConn.FisPipeelement then + begin + for i := 0 to RelatedPipeConns.Count - 1 do + begin + if TglPipe(T3DConnector(RelatedPipeConns[i]).FGLObject).Nodes.Count = 2 then + begin + T3DConnector(RelatedPipeConns[i]).FGLPoint.x := TGLPipe(T3DConnector(RelatedPipeConns[i]).FGLObject).Nodes[0].X; + T3DConnector(RelatedPipeConns[i]).FGLPoint.y := TGLPipe(T3DConnector(RelatedPipeConns[i]).FGLObject).Nodes[0].Y - xConn.FZOrder; + T3DConnector(RelatedPipeConns[i]).FGLPoint.z := TGLPipe(T3DConnector(RelatedPipeConns[i]).FGLObject).Nodes[0].Z; + end + else + begin + if TglPipe(T3DConnector(RelatedPipeConns[i]).FGLObject).Nodes.Count = 3 then + begin + T3DConnector(RelatedPipeConns[i]).FGLPoint.x := TGLPipe(T3DConnector(RelatedPipeConns[i]).FGLObject).Nodes[1].X; + T3DConnector(RelatedPipeConns[i]).FGLPoint.y := TGLPipe(T3DConnector(RelatedPipeConns[i]).FGLObject).Nodes[1].Y - xConn.FZOrder; + T3DConnector(RelatedPipeConns[i]).FGLPoint.z := TGLPipe(T3DConnector(RelatedPipeConns[i]).FGLObject).Nodes[1].Z; + end; + end; + end; + { + if xConn.FRelatedLines.Count = 1 then + begin + xConn.FGLPoint.x := xGLObject.Nodes[0].X; + xConn.FGLPoint.y := xGLObject.Nodes[0].Y - xConn.FZOrder; + xConn.FGLPoint.z := xGLObject.Nodes[0].Z; + end + else + begin + xConn.FGLPoint.x := xGLObject.Nodes[1].X; + xConn.FGLPoint.y := xGLObject.Nodes[1].Y - xConn.FZOrder; + xConn.FGLPoint.z := xGLObject.Nodes[1].Z; + end; + } + end + else + begin + xConn.FGLPoint.x := xGLObject.Nodes[0].X; + xConn.FGLPoint.y := xGLObject.Nodes[0].Y - xConn.FZOrder; + xConn.FGLPoint.z := xGLObject.Nodes[0].Z; + end; + end + else + begin + // + xConn.FGLPoint.x := xGLObject.Nodes[0].X; + xConn.FGLPoint.y := xGLObject.Nodes[0].Y - xConn.FZOrder; + xConn.FGLPoint.z := xGLObject.Nodes[0].Z; + end; end else begin @@ -20928,14 +22214,25 @@ begin xConn.FGLPoint.z := TGLDummyCube(xConn.FGLObject).Position.Z + dp.z; end; end; - - xConn.FPoint.x := xConn.FGLPoint.x / Factor; - {TODO ZCoord} - //xConn.FPoint.z := xConn.FGLPoint.y / Factor / FScaleDelta; - xConn.FPoint.z := xConn.FGLPoint.y / Factor / FScaleDeltaSCS; // NEWNEW - xConn.FPoint.y := xConn.FGLPoint.z / Factor; + if RelatedPipeConns.Count = 0 then + begin + xConn.FPoint.x := xConn.FGLPoint.x / Factor; + {TODO ZCoord} + //xConn.FPoint.z := xConn.FGLPoint.y / Factor / FScaleDelta; + xConn.FPoint.z := xConn.FGLPoint.y / Factor / FScaleDeltaSCS; // NEWNEW + xConn.FPoint.y := xConn.FGLPoint.z / Factor; + end + else + begin + for i := 0 to RelatedPipeConns.Count - 1 do + begin + T3DConnector(RelatedPipeConns[i]).FPoint.x := T3DConnector(RelatedPipeConns[i]).FGLPoint.x / Factor; + T3DConnector(RelatedPipeConns[i]).FPoint.z := T3DConnector(RelatedPipeConns[i]).FGLPoint.y / Factor / FScaleDeltaSCS; // NEWNEW + T3DConnector(RelatedPipeConns[i]).FPoint.y := T3DConnector(RelatedPipeConns[i]).FGLPoint.z / Factor; + end; + end; end; - + //AlignPipeObjects; if xConn.FGLCaption <> nil then begin xGLCaption := TGLSpaceText(xConn.FGLCaption); @@ -21001,13 +22298,30 @@ begin // if empty connector if xConn.FConnType = ct_Empty then begin - for i := 0 to xConn.FJoinedLinesList.Count - 1 do + //Tolik 07/04/2025 -- + if xConn.FisPipeElement then begin - xLine := T3DLine(xConn.FJoinedLinesList[i]); - pos.x := xGLObject.Nodes[0].X; - pos.y := xGLObject.Nodes[0].Y; - pos.z := xGLObject.Nodes[0].Z; - Move3DLine(xConn, xLine, pos); + pos.x := xConn.FglPoint.x; + pos.y := xConn.FglPoint.y; + pos.z := xConn.FglPoint.z; + + for i := 0 to xConn.FJoinedLinesList.Count - 1 do + begin + xLine := T3DLine(xConn.FJoinedLinesList[i]); + Move3DLine(xConn, xLine, pos); + end; + end + else + begin + // + for i := 0 to xConn.FJoinedLinesList.Count - 1 do + begin + xLine := T3DLine(xConn.FJoinedLinesList[i]); + pos.x := xGLObject.Nodes[0].X; + pos.y := xGLObject.Nodes[0].Y; + pos.z := xGLObject.Nodes[0].Z; + Move3DLine(xConn, xLine, pos); + end; end; end else @@ -21069,6 +22383,12 @@ begin if G3DModelForProject then Move3DBetweenRaiseConnector(xConn, dp); end; + AlignPipeObjects; + AlignRelatedConns; + MovedLineList.free; + OtherSideConnList.free; + RelatedPipeConns.free; + OtherRelatedPipeConns.free; except on E: Exception do AddExceptionToLogEx('Tfrm3D.Move3DConnector', E.Message); end; @@ -21561,10 +22881,12 @@ var F3DLineCompon: T3DLineComponent; pN, pP: TVector3f; childNode: TTreeNode; + TubeRadius: double; + TubePoint: PDoublePoint; begin if aNode <> nil then begin - + if TObject(aNode.Data).ClassName = 'T3DLineComponent' then begin if T3DLineComponent(aNode.Data).FGLObject <> nil then @@ -21579,6 +22901,29 @@ var pP[1] := xGLLine.Nodes[1].y; pP[2] := xGLLine.Nodes[1].z; + //Tolik 09/04/2025 -- + TubeRadius := TGLCylinder(T3DLineComponent(aNode.Data).FGLObject).TopRadius; + + if T3DLineComponent(aNode.Data).FSCSCompon.ComponentType.SysName = ctsnTube then + begin + if aLine.FJoinConnector1.FisPipeElement then + begin + TubePoint := Get3DPoint(aLine, 1, TubeRadius); + pN[0] := TubePoint.x; + pN[1] := TubePoint.y; + pN[2] := TubePoint.z; + Dispose(TubePoint); + end; + end; + if aLine.FJoinConnector2.FisPipeElement then + begin + TubePoint := Get3DPoint(aLine, 2, TubeRadius); + pP[0] := TubePoint.x; + pP[1] := TubePoint.y; + pP[2] := TubePoint.z; + Dispose(TubePoint); + end; + // TGLCylinder(T3DLineComponent(aNode.Data).FGLObject).Align(pN, pP); end else @@ -21617,7 +22962,8 @@ begin // xGLLine.Nodes[0].Y := aPos.y; xGLLine.Nodes[0].Z := aPos.z; - end; + end + else if xConn = xLine.FJoinConnector2 then begin xGLLine.Nodes[1].X := aPos.x; @@ -23302,6 +24648,7 @@ procedure Tfrm3D.N1Click(Sender: TObject); if ChildNode.Count > 0 then SetObjectsTransparency(ChildNode, TrCableChannel, TrTube, TrCorrugation); end; + isUserTransparency := True; end; begin diff --git a/REPORTS/RCablePaths.frf b/REPORTS/RCablePaths.frf new file mode 100644 index 0000000000000000000000000000000000000000..1e7addee707e824676366e204474d9eef2dc0208 GIT binary patch literal 16130 zcmeHOTWl2989v9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5+UrnahB^kumI}m@p@P1ov>_=}UfnZIk>(NJDhPM&g$(^QGP6#eAtc zo~TPC;>d9h4EAaZ$z>?N$vlWkuBMt{n60HwLCbZ*d~_()(}OaKVXO8hcw^#vMw(yW zd7jOwc{b6c+=Y2EKKPY0Pu{DV6(*^9el@CjZZaD<)md3!lSK6vJ8*J)2G!)6=|h;G zc>)uB5hH6?d83X#uWQoKXI=VSJb>CvEy6w(^mb#TsW_ z`cy9N(m8(RP;)Q4ema{H>8c{kq(huR}3=3r7`UexyXy$z8|M}+^QJab$W;$Og94=0M z%hIXkLK;!rmcZV~evp8jP`o~lA}6Q7&ALt!Y@f=5`}cnFYW!4f<`3_-S3YJWpIrA| G`+osTM9Pc+ literal 0 HcmV?d00001 diff --git a/REPORTS/RGOSTCableJournal.frf b/REPORTS/RGOSTCableJournal.frf new file mode 100644 index 0000000000000000000000000000000000000000..8681b48148121c4368f7d6692efffa8eb55cf309 GIT binary patch literal 110598 zcmeHw3wT|{b?%lez)+O(N(xN_2V<~}!PYr?M+xCrmTiHoqe`*^c72VokFgTj@|9#R z6lhXHX-m>1ZD~u=G)a>tO(;#cy|hhVw}CVXP16ua`fkz`3Qd3j>6d%IzH`?Aaj(6Mp`Fxh8v-g@c|NhsS*P7Wg7bMAdzH?c!V`l&S+``x8Haj~$ z4|*v1*6G=W=3qyX;NKdO8K0kfLv#P)*z{p>f6unzsqu-%HN!(wWAz=w>(=ib?6{D` zMoE({GdePv3y`Ysg{tWV%Iq+*ftLE@(&o;Y@nN)Hi6Ntb8}>ojoX_uHysj> zQ|syVLG1YVEx&-diNRc!fo}f}W+^iosFta!_cVv3D zv$}ED%)-o#vx4Wv`D0`TMyeJi)fFYx9VOKhCDj`x)fXkzA0;&qBUSB;l8WNK8pVB; z;r>*zcJs)Af)7+u9~eKlb!L8Hk#m5e2!o&~!en0*VeDQMVT@iBVJu!0Va#0=VQgI# zVGLam;jCN~VN6^U3A4)?x2Pq|ZZ*tqHOy``%x*QzZZ*tqjVV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Program Files\Эксперт-СКС 1.8.0\ + false + false + SCS_RF;PROCAT_SCS;FINAL_SCS;$(DCC_Define) + 1251 + false + false + false + false + 0 + + + Delphi.Personality.12 + OptionSet + + + + 12 + + diff --git a/SRC/1.bat b/SRC/1.bat index a031c45..df2992c 100644 --- a/SRC/1.bat +++ b/SRC/1.bat @@ -1,4 +1,3 @@ set DELPHI=C:\Program Files\Borland\Delphi6 - @SET PATH=%PATH%;%DELPHI%\bin dcc32.exe -B %1 -LU > 1.log \ No newline at end of file diff --git a/SRC/ARCH/U_Arch3DNew.pas b/SRC/ARCH/U_Arch3DNew.pas index b59f8b5..8e8a8ec 100644 --- a/SRC/ARCH/U_Arch3DNew.pas +++ b/SRC/ARCH/U_Arch3DNew.pas @@ -356,6 +356,8 @@ type F3D_Length: Double; FUse3DSize: Boolean; HasPipeElements: Boolean; // , , . + FRelatedLines: TList; // Tolik 03/04/2025 -- , + FLength: Double; // Tolik 03/04/2025 // //Tolik -- 24//09/2018 -- //constructor Create(aFaces: TList; aSCSObject: TConnectorObject; aParent: T3DModel); @@ -535,6 +537,7 @@ type function ConverResultToUom(aResult: Double; aIzm: String): Double; // Tolik 18/10/2018 -- Function GetPoint(aLine: TOrthoLine; PointNum: Integer; dist: Double): PDoublePoint; // Tolik 18/10/2018 -- + Function GetPointA(apoint1, aPoint2: TDoublePoint; dist: Double): PDoublePoint; // Tolik 12/10/2025 -- const {TODO} FDeltaZ: Double = 0.030; @@ -708,8 +711,8 @@ function ConverResultToUom(aResult: Double; aIzm: String): Double; umFoot : CadUomIzm := 0.3; end; - //Result := aResult * (CadUomIzm/UomIzm); - Result := aResult * (UomIzm/CadUomIzm); + Result := aResult * (CadUomIzm/UomIzm); + //Result := aResult * (UomIzm/CadUomIzm); end; end; @@ -724,7 +727,6 @@ function ConverResultToUom(aResult: Double; aIzm: String): Double; PointsAngle: Double; Conn1,Conn2: TConnectorObject; MaxX, MaxY, MinX, MinY, DistToPoint: Double; - begin Result := Nil; New(Result); @@ -796,6 +798,37 @@ function ConverResultToUom(aResult: Double; aIzm: String): Double; //Result.z := MetreToUom((p1.z + ((Dist) * (UOMToMetre(1000 / GCadForm.PCad.MapScale)) * koefz))/(UOMToMetre(1000 / GCadForm.PCad.MapScale))); end; + // ( , , ) + Function GetPointA(aPoint1, aPoint2: TDoublePoint; dist: Double): PDoublePoint; // Tolik 12/10/2025 -- + var + p1, p2: TDoublePoint; + distx, disty, distz, koefx, koefy, koefz, LineLen: Double; + DistToPoint: Double; + begin + Result := Nil; + New(Result); + + DistToPoint := Dist; + + p1.x := aPoint1.x; + p1.y := aPoint1.y; + p1.z := UomToMetre(aPoint1.z) * (UOMToMetre(1000 / GCadForm.PCad.MapScale)); + //p1.z := TConnectorObject(aLine.JoinConnector1).ActualZOrder[1]; + p2.x := aPoint2.x; + p2.y := aPoint2.y; + p2.z := UomToMetre(aPoint2.z) * (UOMToMetre(1000 / GCadForm.PCad.MapScale)); + + LineLen := SQRT(SQR(P1.x - P2.x) + SQR(P1.y - P2.y) + SQR(P1.z - P2.z)); + koefx := (P2.x - P1.x)/LineLen; + koefy := (P2.y - P1.y)/LineLen; + koefz := (P2.z - P1.z)/LineLen; + + Result.x := P1.x + (DistTopoint * (UOMToMetre(1000 / GCadForm.PCad.MapScale)) * koefx); + Result.y := P1.y + (DistTopoint * (UOMToMetre(1000 / GCadForm.PCad.MapScale)) * koefy); + Result.z := MetreToUom(P1.z + DistTopoint * (UOMToMetre(1000 / GCadForm.PCad.MapScale)) * koefz)/(UOMToMetre(1000 / GCadForm.PCad.MapScale)); + //Result.x := p1.x + ((Dist) * (UOMToMetre(1000 / GCadForm.PCad.MapScale)) * koefx); + end; + function GetTubeRadius(aSCSCompon: TSCSComponent): Double; var i : Integer; NBProp: TNBProperty; @@ -4426,7 +4459,7 @@ var if Result.IndexOf(LineCatalog.ComponentReferences[i]) = -1 then begin Result.Add(LineCatalog.ComponentReferences[i]); - break; + //break; end; end; end; @@ -4462,17 +4495,19 @@ var Procedure CreatePipeElement(aConn: TConnectorObject); // Cable var i, j, k : Integer; - PrevPipeRadius, PipeRadius: Double; + MaxPipeRadius, PrevPipeRadius, PipeRadius: Double; LineCatalog: TSCSCatalog; - LineComponent: TSCSComponent; + LineComponent, LineComponent1: TSCSComponent; LineList, TubeList: TList; PipePoint, PrevPipePoint, addPoint: PDoublePoint; apArray: T3DPointArray; - TubeLine: TOrthoLine; + TubeLine, TubeLine1: TOrthoLine; JoinedConn: TConnectorObject; CableList: TList; CableOffset: Double; + ConnSide: integer; + exVals: Boolean; //Tolik 12/11/2021 -- function CheckisPipeElement(aConnector: TConnectorObject): Boolean; @@ -4508,6 +4543,8 @@ var TubeList := TList.Create; PipeList := TList.Create; CableList:= TList.Create; + PipePoint := nil; + PrevPipePoint := nil; //Collect Lines //Tolik 12/11/2021 -- //if aConn.ConnectorType = ct_Clear then @@ -4556,29 +4593,37 @@ var for k := 0 to LineCatalog.ComponentReferences.Count - 1 do begin LineComponent := LineCatalog.ComponentReferences[k]; - { + if LineComponent.ComponentType.SysName = ctsnTube then begin LineList.Add(TOrthoLine(JoinedConn.JoinedOrthoLineslist[i])); TubeList.Add(LineComponent); break; - end; - } + end + else + begin if isCableComponent(LineComponent) then if CableList.IndexOf(LineComponent) = - 1 then CableList.Add(LineComponent); + end; end; end; end; end; end; +(* for i := 0 to CableList.Count - 1 do begin SetLength(apArray, 3); TubeLine := TOrthoLine(LineList[0]); LineComponent := TSCSComponent(TubeList[0]); + PipeRadius := GetTubeRadius(LineComponent); + if PipeRadius = -1 then //Tolik 28/03/2025 -- - + Exit; + + PipeRadius := PipeRadius + PipeRadius /10; PipePoint := nil; if aConn.ConnectorType = ct_Clear then begin @@ -4614,6 +4659,7 @@ var TubeLine := TOrthoLine(LineList[0]); LineComponent := TSCSComponent(TubeList[0]); PrevPipeRadius := GetTubeRadius(LineComponent); + PrevPipeRadius := PrevPipeRadius + PrevPipeRadius /10; if aConn.ConnectorType = ct_Clear then begin if TConnectorObject(TubeLine.JoinConnector1).Id = aConn.ID then @@ -4632,6 +4678,7 @@ var TubeLine := TOrthoLine(LineList[i]); LineComponent := TSCSComponent(TubeList[j]); PipeRadius := GetTubeRadius(LineComponent); + PipeRadius := PipeRadius + PipeRadius /10; if PipeRadius <> -1 then // !!!! begin SetLength(apArray, 2); @@ -4803,9 +4850,438 @@ var SetLength(apArray, 0); end; end; + *) + // , + for i := LineList.Count - 1 downto 0 do + begin + LineComponent := TSCSComponent(TubeList[i]); + PipeRadius := GetTubeRadius(LineComponent); + if PipeRadius = -1 then + begin + LineList.Delete(i); + TubeList.Delete(i); + CableList.Delete(i); + end; + end; + + if LineList.Count > 0 then + begin + if LineList.Count = 1 then // + begin + SetLength(apArray, 2); + TubeLine := TOrthoLine(LineList[0]); + LineComponent := TSCSComponent(TubeList[0]); + + PipeRadius := GetTubeRadius(LineComponent); + PipeRadius := PipeRadius + PipeRadius /10; + PipePoint := nil; + if aConn.ConnectorType = ct_Clear then + begin + if TConnectorObject(TubeLine.JoinConnector1).Id = aConn.ID then + PipePoint := GetPoint(TubeLine, 1, PipeRadius) + else + PipePoint := GetPoint(TubeLine, 2, PipeRadius); + end + else + begin + if aConn.JoinedConnectorsList.IndexOf(TConnectorObject(TubeLine.JoinConnector1)) <> -1 then + PipePoint := GetPoint(TubeLine, 1, PipeRadius) + else + PipePoint := GetPoint(TubeLine, 2, PipeRadius) + end; + + apArray[1].x := PipePoint.x; + apArray[1].y := PipePoint.y; + apArray[1].z := PipePoint.z; + + DisPose(PipePoint); // 21/12/2019 -- Tolik + PipePoint := nil; + + apArray[0].x := aConn.ap1.x; + apArray[0].y := aConn.ap1.y; + apArray[0].z := aConn.ActualZOrder[1]; + + x3DConnector := T3DConnector.Create(aFaces, xConn, Self, True); + x3DConnector.CollectConnector(aFaces, apArray); + x3DConnector.FPipeRadius := PipeRadius; + FScsObjects.Add(x3DConnector); + x3DConnector.FSCSObject.F3DObject := x3DConnector; + x3DConnector.FColor := ConvertWinColor(clGreen); + x3DConnector.FRelatedLines.Add(TubeLine); + x3DConnector.FLength := PipeRadius; + end + else // + if LineList.Count = 2 then + begin + PipeRadius := GetTubeRadius(TSCSComponent(TubeList[0])); + PipeRadius := PipeRadius + PipeRadius /10; + PipePoint := nil; + PrevPipeRadius := GetTubeRadius(TSCSComponent(TubeList[1])); + PrevPipeRadius := PrevPipeRadius + PrevPipeRadius /10; + + if CompareValue(PipeRadius, PrevPipeRadius) = 0 then // , + begin + SetLength(apArray, 3 ); + if aConn.ConnectorType = ct_Clear then + begin + if TConnectorObject(TOrthoLine(LineList[0]).JoinConnector1).Id = aConn.ID then + PipePoint := GetPoint(TOrthoLine(LineList[0]), 1, PipeRadius) + else + PipePoint := GetPoint(TOrthoLine(LineList[0]), 2, PipeRadius); + + if TConnectorObject(TOrthoLine(LineList[1]).JoinConnector1).Id = aConn.ID then + PrevPipePoint := GetPoint(TOrthoLine(LineList[1]), 1, PipeRadius) + else + PrevPipePoint := GetPoint(TOrthoLine(LineList[1]), 2, PipeRadius); + end + else + begin + if aConn.JoinedConnectorsList.IndexOf(TConnectorObject(TOrthoLine(LineList[0]).JoinConnector1)) <> -1 then + PipePoint := GetPoint(TOrthoLine(LineList[0]), 1, PipeRadius) + else + PipePoint := GetPoint(TOrthoLine(LineList[0]), 2, PipeRadius); + + if aConn.JoinedConnectorsList.IndexOf(TConnectorObject(TOrthoLine(LineList[1]).JoinConnector1)) <> -1 then + PrevPipePoint := GetPoint(TOrthoLine(LineList[1]), 1, PipeRadius) + else + PrevPipePoint := GetPoint(TOrthoLine(LineList[1]), 2, PipeRadius); + end; + SetLength(apArray, 3); + apArray[0].x := PipePoint.x; + apArray[0].y := PipePoint.y; + apArray[0].z := PipePoint.z; + + DisPose(PipePoint); + PipePoint := nil; + + apArray[1].x := aConn.ap1.x; + apArray[1].y := aConn.ap1.y; + apArray[1].z := aConn.ActualZOrder[1]; + + apArray[2].x := PrevPipePoint.x; + apArray[2].y := PrevPipePoint.y; + apArray[2].z := PrevPipePoint.z; + + Dispose(PrevPipePoint); + PrevPipePoint := nil; + + x3DConnector := T3DConnector.Create(aFaces, xConn, Self, True); + x3DConnector.CollectConnector(aFaces, apArray); + x3DConnector.FPipeRadius := PipeRadius; + FScsObjects.Add(x3DConnector); + x3DConnector.FSCSObject.F3DObject := x3DConnector; + x3DConnector.FColor := ConvertWinColor(clGreen); + x3DConnector.FRelatedLines.Add(TOrthoLine(LineList[0])); + x3DConnector.FRelatedLines.Add(TOrthoLine(LineList[1])); + x3DConnector.FLength := PipeRadius; + end + else + begin + exVals := False; + + if CompareValue(PipeRadius, PrevPiperadius) = -1 then + begin + ExchangeDouble(PipeRadius, PrevPipeRadius); // + exVals := True; + end; + + SetLength(apArray, 3); + if aConn.ConnectorType = ct_Clear then + begin + if TConnectorObject(TOrthoLine(LineList[0]).JoinConnector1).Id = aConn.ID then + PipePoint := GetPoint(TOrthoLine(LineList[0]), 1, PipeRadius) + else + PipePoint := GetPoint(TOrthoLine(LineList[0]), 2, PipeRadius); + + if TConnectorObject(TOrthoLine(LineList[1]).JoinConnector1).Id = aConn.ID then + PrevPipePoint := GetPoint(TOrthoLine(LineList[1]), 1, PipeRadius) + else + PrevPipePoint := GetPoint(TOrthoLine(LineList[1]), 2, PipeRadius); + end + else + begin + if aConn.JoinedConnectorsList.IndexOf(TConnectorObject(TOrthoLine(LineList[0]).JoinConnector1)) <> -1 then + PipePoint := GetPoint(TOrthoLine(LineList[0]), 1, PipeRadius) + else + PipePoint := GetPoint(TOrthoLine(LineList[0]), 2, PipeRadius); + + if aConn.JoinedConnectorsList.IndexOf(TConnectorObject(TOrthoLine(LineList[1]).JoinConnector1)) <> -1 then + PrevPipePoint := GetPoint(TOrthoLine(LineList[1]), 1, PipeRadius) + else + PrevPipePoint := GetPoint(TOrthoLine(LineList[1]), 2, PipeRadius); + end; + SetLength(apArray, 3); + apArray[0].x := PipePoint.x; + apArray[0].y := PipePoint.y; + apArray[0].z := PipePoint.z; + + DisPose(PipePoint); + PipePoint := nil; + + apArray[1].x := aConn.ap1.x; + apArray[1].y := aConn.ap1.y; + apArray[1].z := aConn.ActualZOrder[1]; + + apArray[2].x := PrevPipePoint.x; + apArray[2].y := PrevPipePoint.y; + apArray[2].z := PrevPipePoint.z; + + Dispose(PrevPipePoint); + PrevPipePoint := nil; + + x3DConnector := T3DConnector.Create(aFaces, xConn, Self, True); + x3DConnector.CollectConnector(aFaces, apArray); + x3DConnector.FPipeRadius := PipeRadius; + FScsObjects.Add(x3DConnector); + x3DConnector.FSCSObject.F3DObject := x3DConnector; + x3DConnector.FColor := ConvertWinColor(clGreen); + x3DConnector.FRelatedLines.Add(TOrthoLine(LineList[0])); + x3DConnector.FRelatedLines.Add(TOrthoLine(LineList[1])); + x3DConnector.FLength := PipeRadius; + + if exVals then + TubeLine := LineList[0] + else + TubeLine := LineList[1]; + + if aConn.ConnectorType = ct_Clear then + begin + if TConnectorObject(TubeLine.JoinConnector1).Id = aConn.ID then + PipePoint := GetPoint(TubeLine, 1, PipeRadius + PrevPipeRadius) + else + PipePoint := GetPoint(TubeLine, 2, PipeRadius + PrevPipeRadius); + end + else + begin + if aConn.JoinedConnectorsList.IndexOf(TubeLine.JoinConnector1) <> -1 then + PipePoint := GetPoint(TubeLine, 1, PipeRadius + PrevPipeRadius) + else + PipePoint := GetPoint(TubeLine, 2, PipeRadius + PrevPipeRadius); + end; + + SetLength(apArray, 2); + + apArray[0].x := aConn.ap1.x; + apArray[0].y := aConn.ap1.y; + apArray[0].z := aConn.ActualZOrder[1]; + + apArray[1].x := PipePoint.x; + apArray[1].y := PipePoint.y; + apArray[1].z := PipePoint.z; + + x3DConnector := T3DConnector.Create(aFaces, xConn, Self, True); + x3DConnector.CollectConnector(aFaces, apArray); + x3DConnector.FPipeRadius := PrevPipeRadius; + FScsObjects.Add(x3DConnector); + x3DConnector.FSCSObject.F3DObject := x3DConnector; + x3DConnector.FColor := ConvertWinColor(clGreen); + x3DConnector.FRelatedLines.Add(TubeLine); + x3DConnector.FLength := PipeRadius + PrevPipeRadius; + end; + end + else + if LineList.Count > 2 then + begin + MaxPipeRadius := -1; + TubeLine1 := nil; + TubeLine := nil; + + for i := 0 to TubeList.Count - 1 do //get Max tube Radius + begin + PipeRadius := GetTubeRadius(TSCSComponent(TubeList[i])); + if CompareValue(MaxPipeRadius, PipeRadius) = -1 then + begin + MaxPipeRadius := PipeRadius; + TubeLine := TOrthoLine(LineList[i]); + LineComponent := TSCSComponent(TubeList[i]); + j := i; + end; + end; + + Tubelist.Delete(j); // + LineList.Delete(j); + CableList.Delete(j); + + for i := 0 to TubeList.Count - 1 do //get next tube with Max Radius + begin + PipeRadius := GetTubeRadius(TSCSComponent(TubeList[i])); + if CompareValue(MaxPipeRadius, PipeRadius) = 0 then + begin + TubeLine1 := TOrthoLine(LineList[i]); + LineComponent1 := TSCSComponent(Tubelist[i]); + j := i; + break; + end; + end; + + MaxPipeRadius := MaxPipeRadius + MaxPipeRadius/10; + + if TubeLine1 = nil then // , , + begin + PipeRadius := -1; + for i := 0 to LineList.Count - 1 do + begin + PrevPipeRadius := GetTubeRadius(TSCSComponent(TubeList[i])); + if CompareValue(PipeRadius, PrevPipeRadius) = -1 then + begin + PipeRadius := PrevPipeRadius; + TubeLine1 := TOrthoLine(LineList[i]); + LineComponent1 := TSCSComponent(TubeList[i]); + j := i; + end; + end; + end; + + PipeRadius := PipeRadius + PipeRadius/10; + + Tubelist.Delete(j); // + LineList.Delete(j); + CableList.Delete(j); + + // + if aConn.ConnectorType = ct_Clear then + begin + if TConnectorObject(TOrthoLine(TubeLine).JoinConnector1).Id = aConn.ID then + PipePoint := GetPoint(TOrthoLine(TubeLine), 1, MaxPipeRadius) + else + PipePoint := GetPoint(TOrthoLine(TubeLine), 2, MaxPipeRadius); + + if TConnectorObject(TOrthoLine(TubeLine1).JoinConnector1).Id = aConn.ID then + PrevPipePoint := GetPoint(TOrthoLine(TubeLine1), 1, MaxPipeRadius) + else + PrevPipePoint := GetPoint(TOrthoLine(TubeLine1), 2, MaxPipeRadius); + end + else + begin + if aConn.JoinedConnectorsList.IndexOf(TConnectorObject(TOrthoLine(TubeLine).JoinConnector1)) <> -1 then + PipePoint := GetPoint(TOrthoLine(TubeLine), 1, MaxPipeRadius) + else + PipePoint := GetPoint(TOrthoLine(TubeLine), 2, MaxPipeRadius); + + if aConn.JoinedConnectorsList.IndexOf(TConnectorObject(TOrthoLine(TubeLine1).JoinConnector1)) <> -1 then + PrevPipePoint := GetPoint(TOrthoLine(TubeLine1), 1, MaxPipeRadius) + else + PrevPipePoint := GetPoint(TOrthoLine(TubeLine1), 2, MaxPipeRadius); + end; + + SetLength(apArray, 3); + apArray[0].x := PipePoint.x; + apArray[0].y := PipePoint.y; + apArray[0].z := PipePoint.z; + + DisPose(PipePoint); + PipePoint := nil; + + apArray[1].x := aConn.ap1.x; + apArray[1].y := aConn.ap1.y; + apArray[1].z := aConn.ActualZOrder[1]; + + apArray[2].x := PrevPipePoint.x; + apArray[2].y := PrevPipePoint.y; + apArray[2].z := PrevPipePoint.z; + + Dispose(PrevPipePoint); + PrevPipePoint := nil; + + x3DConnector := T3DConnector.Create(aFaces, xConn, Self, True); + x3DConnector.CollectConnector(aFaces, apArray); + x3DConnector.FPipeRadius := MaxPipeRadius; + FScsObjects.Add(x3DConnector); + x3DConnector.FSCSObject.F3DObject := x3DConnector; + x3DConnector.FColor := ConvertWinColor(clGreen); + x3DConnector.FRelatedLines.Add(TubeLine); + x3DConnector.FRelatedLines.Add(TubeLine1); + x3DConnector.FLength := MaxPipeRadius; + + // - + if CompareValue(MaxPipeRadius, PipeRadius) <> 0 then + begin + if aConn.ConnectorType = ct_Clear then + begin + if TConnectorObject(TOrthoLine(TubeLine1).JoinConnector1).Id = aConn.ID then + PipePoint := GetPoint(TOrthoLine(TubeLine1), 1, PipeRadius + MaxPipeRadius) + else + PipePoint := GetPoint(TOrthoLine(TubeLine1), 2, PipeRadius + MaxPipeRadius); + end + else + begin + if aConn.JoinedConnectorsList.IndexOf(TConnectorObject(TOrthoLine(TubeLine1).JoinConnector1)) <> -1 then + PipePoint := GetPoint(TOrthoLine(TubeLine1), 1, PipeRadius + MaxPipeRadius) + else + PipePoint := GetPoint(TOrthoLine(TubeLine1), 2, PipeRadius + MaxPipeRadius); + end; + + SetLength(apArray, 2); + + apArray[0].x := aConn.ap1.x; + apArray[0].y := aConn.ap1.y; + apArray[0].z := aConn.ActualZOrder[1]; + + apArray[1].x := PipePoint.x; + apArray[1].y := PipePoint.y; + apArray[1].z := PipePoint.z; + + Dispose(PipePoint); + PipePoint := nil; + + x3DConnector := T3DConnector.Create(aFaces, xConn, Self, True); + x3DConnector.CollectConnector(aFaces, apArray); + x3DConnector.FPipeRadius := PipeRadius; + FScsObjects.Add(x3DConnector); + x3DConnector.FSCSObject.F3DObject := x3DConnector; + x3DConnector.FColor := ConvertWinColor(clGreen); + x3DConnector.FRelatedLines.Add(TubeLine1); + x3DConnector.FLength := PipeRadius + MaxPipeRadius; + end; + // + for i := 0 to TubeList.Count - 1 do + begin + PipeRadius := GetTubeRadius(TSCSComponent(TubeList[i])); + PipeRadius := PipeRadius + PipeRadius/10; + if aConn.ConnectorType = ct_Clear then + begin + if TConnectorObject(TOrthoLine(LineList[i]).JoinConnector1).Id = aConn.ID then + PipePoint := GetPoint(TOrthoLine(LineList[i]), 1, PipeRadius + MaxPipeRadius) + else + PipePoint := GetPoint(TOrthoLine(LineList[i]), 2, PipeRadius + MaxPipeRadius); + end + else + begin + if aConn.JoinedConnectorsList.IndexOf(TConnectorObject(TOrthoLine(LineList[i]).JoinConnector1)) <> -1 then + PipePoint := GetPoint(TOrthoLine(LineList[i]), 1, PipeRadius + MaxPipeRadius) + else + PipePoint := GetPoint(TOrthoLine(LineList[i]), 2, PipeRadius + MaxPipeRadius); + end; + + SetLength(apArray, 2); + + apArray[0].x := aConn.ap1.x; + apArray[0].y := aConn.ap1.y; + apArray[0].z := aConn.ActualZOrder[1]; + + apArray[1].x := PipePoint.x; + apArray[1].y := PipePoint.y; + apArray[1].z := PipePoint.z; + + Dispose(PipePoint); + PipePoint := nil; + + x3DConnector := T3DConnector.Create(aFaces, xConn, Self, True); + x3DConnector.CollectConnector(aFaces, apArray); + x3DConnector.FPipeRadius := PipeRadius; + FScsObjects.Add(x3DConnector); + x3DConnector.FSCSObject.F3DObject := x3DConnector; + x3DConnector.FColor := ConvertWinColor(clGreen); + x3DConnector.FRelatedLines.Add(LineList[i]); + x3DConnector.FLength := PipeRadius + MaxPipeRadius; + end; + end; + LineList.Free; TubeList.Free; PipeList.Free; + CableList.Free; + end; end; // Function Get3dModelFileName(aConn: TConnectorObject): String; @@ -4981,7 +5457,11 @@ begin CheckAddZones(xConn); // end - else if xConn.JoinedConnectorsList.Count >= 0 then + //Tolik 08/04/2025 -- + //else if xConn.JoinedConnectorsList.Count >= 0 then + else + if ((xConn.JoinedConnectorsList.Count >= 0) and (not CheckisPipeElement(xConn))) then + // begin x3DConnector := T3DConnector.Create(aFaces, xConn, Self); x3DConnector.CollectConnector(aFaces, a3DPointArr); @@ -5003,7 +5483,7 @@ begin CreatePipeElement(TConnectorObject(xConn.JoinedConnectorsList[0])) else CreatePipeElement(xConn); - end; + end; // Tolik 20/09/2018 -- { @@ -5046,8 +5526,8 @@ begin FScsObjects.Add(x3DLine); x3DLine.FSCSObject.F3DObject := x3DLine; // Tolik 17/09/2018 -- - //TubeList := GetTubeList(xLine); //15/09/2021 -- - TubeList := nil; + TubeList := GetTubeList(xLine); //15/09/2021 -- + //TubeList := nil; ComponOffset := 0; if TubeList <> nil then @@ -5056,7 +5536,7 @@ begin for j := 0 to TubeList.Count - 1 do begin TubeRadius := GetTubeRadius(TSCSComponent(TubeList[j])); - + (* if TubeRadius <> -1 then begin x3DTube := T3DTube.create(aFaces, xLine, Self, TSCSComponent(TubeList[j]), TubeRadius*2, TailTubeList); @@ -5083,7 +5563,7 @@ begin x3DTube.FSCSObject.F3DObject := x3DTube; end; ComponOffset := ComponOffset + TubeRadius * 2; - + *) { if TailTubeList <> nil then // , , , , "" begin @@ -13729,7 +14209,18 @@ var i: Integer; begin try - FPoint := ap[0]; + //Tolik 08/04/2025 + //FPoint := ap[0]; + if Self.FisPipeElement then + begin + if Length(ap) = 3 then + FPoint := ap[1] + else + FPoint := ap[0]; + end + else + FPoint := ap[0]; + // {TODO ZCoord} //ap[0].z := ap[0].z * FScaleDelta; for i := 0 to (Length(ap) - 1) do @@ -13792,7 +14283,10 @@ begin else begin FSCSCompon := nil; - FSCSComponID := -1; + //Tolik 18/4/2025 -- + //FSCSComponID := -1; + FSCSComponID := aSCSObject.ID; + // end; FName := FSCSObject.Name; FIndex := FSCSObject.FIndex; @@ -13832,6 +14326,8 @@ begin FColor := clrBlack; FJoinedConnectorsList := TList.Create; FJoinedLinesList := TList.Create; + FRelatedLines := TList.Create; // -- Tolik 03/4/2025 , + FLength := 0; // Tolik 03/04/05 -- except on E: Exception do AddExceptionToLogEx('T3DConnector.Create', E.Message); end; @@ -14206,7 +14702,9 @@ var for i := 0 to SCSCatalog.ComponentReferences.Count - 1 do begin SCSCompon := SCSCatalog.ComponentReferences[i]; - if SCSCompon.ComponentType.SysName <> ctsnCableChannelAccessory then + //Tolik 10/04/2025 -- + //if SCSCompon.ComponentType.SysName <> ctsnCableChannelAccessory then + if ((SCSCompon.ComponentType.SysName <> ctsnCableChannelAccessory) and (SCSCompon.ComponentType.SysName <> ctsnWireTray)) then begin ComponDiam := getLineComponOutRadius(SCSCompon); if isCableComponent(SCSCompon) then // @@ -15257,6 +15755,7 @@ begin FNotes.Free; FJoinedConnectorsList.Free; FJoinedLinesList.Free; + FRelatedLines.Free; inherited; end; //*************** -\ROOF- ************************** diff --git a/SRC/ExpertGM.dpr b/SRC/ExpertGM.dpr index e629566..fc4a60c 100644 --- a/SRC/ExpertGM.dpr +++ b/SRC/ExpertGM.dpr @@ -637,7 +637,6 @@ var Req: string; TimeStr: string; begin - Randomize; Randomize; TimeStr := DateTimeToStr(Now); while Pos(':', TimeStr) > 0 do diff --git a/SRC/Main/U_Common.pas b/SRC/Main/U_Common.pas index 29f3ea0..f738ae7 100644 --- a/SRC/Main/U_Common.pas +++ b/SRC/Main/U_Common.pas @@ -6900,14 +6900,14 @@ var if ResultList.Count > 0 then begin ATraveledIndex := ATraveledIndex; - showmessage('CurrTick > 0.00009 and ResultList.Count = '+ inttostr(ResultList.Count)); + //showmessage('CurrTick > 0.00009 and ResultList.Count = '+ inttostr(ResultList.Count)); exit; end; end; if CurrTick > 0.00013 then begin ATraveledIndex := ATraveledIndex; - showmessage('CurrTick > 0.00013 '); + //showmessage('CurrTick > 0.00013 '); exit; end; @@ -6915,7 +6915,7 @@ var if ResultList.Count > 2 then begin ATraveledIndex := ATraveledIndex; - showmessage('ATraveledIndex > 60 and ResultList.Count > 2'); + //showmessage('ATraveledIndex > 60 and ResultList.Count > 2'); exit; end else @@ -6924,7 +6924,7 @@ var if CurrTick > 0.00006 then begin ATraveledIndex := ATraveledIndex; - showmessage('ATraveledIndex > 60 ResultList.Count > 100'); + //showmessage('ATraveledIndex > 60 ResultList.Count > 100'); exit; end; end; diff --git a/SRC/Main/U_ELCommon.pas b/SRC/Main/U_ELCommon.pas index 83a3bfb..ccb5516 100644 --- a/SRC/Main/U_ELCommon.pas +++ b/SRC/Main/U_ELCommon.pas @@ -1,6 +1,9 @@ + + //Tolik 23/01/2025 -- + {$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+,Z1} //{$MINSTACKSIZE $00004000} -//{$MAXSTACKSIZE $00100000} +//{$MAXSTACKSIZE $00100000} // //{$IMAGEBASE $00400000} //{$APPTYPE GUI} //{$J+} @@ -38,7 +41,7 @@ var i, j, k, l, m: integer; Line_Count: Integer; Switches, Connections, UzoList: TSCSComponents; ConnectedCompon: TSCSComponent; - CurrText: TRichText; + CurrText, elText: TRichText; TextList: TStringList; IconFigList: TList; ParentCatalog: TSCSCatalog; @@ -809,6 +812,10 @@ var i, j, k, l, m: integer; //SLine := TLine.create(GCadForm.PCad.WorkWidth/10 - 20, by - 8, GCadForm.PCad.WorkWidth/10 - 10, by - 8, 2, ord(psSolid), clBlack, 0, GCadForm.PCad.GetLayerHandle(0), mydsNormal, GCadForm.PCad); SLine := TLine.create(GCadForm.PCad.WorkWidth/10 - 20, by - 5, GCadForm.PCad.WorkWidth/10 - 10, by - 5, 2, ord(psSolid), clBlack, 0, GCadForm.PCad.GetLayerHandle(0), mydsNormal, GCadForm.PCad); GCadForm.PCad.AddCustomFigure(1, TFigure(SLine), false); + // Tolik 22/01/2025 + elText.Move((((GCadForm.PCad.WorkWidth/10 - 20) + (GCadForm.PCad.WorkWidth/10 - 10))/2) - elText.CenterPoint.x, + (((190 - 3 - MaxTableHeightArray[0]) + (by - 5))/2) - elText.CenterPoint.y); + // end; end; //bx := bx + 10; @@ -1202,7 +1209,7 @@ Begin CurrText := CreateTextObject(Line_x1 - 80, Line_y1 + 80, TextList); CurrText.Rotate(((-90)/180) * PI, CurrText.CenterPoint); //TextFigList.Add(CurrText); - + elText := CurrText; // Tolik 22/01/2025 -- ColObjList := TList.Create; TextList.Clear; diff --git a/SRC/Main/U_MasterNewList.dfm b/SRC/Main/U_MasterNewList.dfm index 2d93f0b..af0e189 100644 --- a/SRC/Main/U_MasterNewList.dfm +++ b/SRC/Main/U_MasterNewList.dfm @@ -521,10 +521,6 @@ object F_MasterNewList: TF_MasterNewList end object tsProjOptionsObjectProps: TRzTabSheet Caption = #1055#1072#1088#1072#1084#1077#1090#1088#1099' '#1086#1073#1098#1077#1082#1090#1086#1074 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 object RzGroupBox18: TRzGroupBox Left = 4 Top = 6 @@ -1051,7 +1047,7 @@ object F_MasterNewList: TF_MasterNewList Width = 626 Height = 481 HelpContext = 33002 - ActivePage = TabPageParams + ActivePage = TabAll Align = alTop Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -1062,7 +1058,7 @@ object F_MasterNewList: TF_MasterNewList HotTrackStyle = htsText ParentFont = False ShowShadow = False - TabIndex = 1 + TabIndex = 0 TabOrder = 0 TabStyle = tsSquareCorners OnChange = ListPageControlChange @@ -3606,10 +3602,6 @@ object F_MasterNewList: TF_MasterNewList end object TabSheet5: TRzTabSheet Caption = #1050#1072#1073#1080#1085#1077#1090#1099 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 object cbShowCabinetsBounds: TRzCheckBox Left = 4 Top = 32 @@ -3635,10 +3627,6 @@ object F_MasterNewList: TF_MasterNewList end object TabSheet4: TRzTabSheet Caption = #1055#1077#1095#1072#1090#1100 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 object cbBlackPrint: TcxRadioButton Left = 5 Top = 8 @@ -4137,10 +4125,6 @@ object F_MasterNewList: TF_MasterNewList object tsListSpravochniki: TRzTabSheet HelpContext = 33006 Caption = #1058#1080#1087#1099' '#1082#1086#1084#1087#1086#1085#1077#1085#1090 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 object pnComponentType: TRzPanel Left = 0 Top = 434 @@ -12667,8 +12651,6 @@ object F_MasterNewList: TF_MasterNewList object tsProjectSpravochniki: TRzTabSheet TabVisible = False Caption = #1057#1087#1088#1072#1074#1086#1095#1085#1080#1082#1080 - ExplicitWidth = 0 - ExplicitHeight = 0 end end object RzGroupBox20: TRzGroupBox diff --git a/SRC/Main/U_Reserv.dfm b/SRC/Main/U_Reserv.dfm index 63bd852..69954f1 100644 --- a/SRC/Main/U_Reserv.dfm +++ b/SRC/Main/U_Reserv.dfm @@ -1,10 +1,11 @@ object F_Reserv: TF_Reserv - Left = 380 - Top = 178 - BorderIcons = [biSystemMenu] + Left = 414 + Top = 175 + BorderIcons = [] + BorderStyle = bsSingle Caption = #1059#1087#1088#1072#1074#1083#1077#1085#1080#1077' '#1088#1077#1079#1077#1088#1074#1085#1099#1084#1080' '#1082#1086#1087#1080#1103#1084#1080' '#1085#1072' '#1091#1076#1072#1083#1077#1085#1085#1086#1084' '#1089#1077#1088#1074#1077#1088#1077 - ClientHeight = 311 - ClientWidth = 532 + ClientHeight = 344 + ClientWidth = 556 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -17,8 +18,8 @@ object F_Reserv: TF_Reserv PixelsPerInch = 96 TextHeight = 13 object Label1: TLabel - Left = 32 - Top = 4 + Left = 8 + Top = 43 Width = 180 Height = 16 Caption = #1057#1087#1080#1089#1086#1082' '#1092#1072#1081#1083#1086#1074' '#1085#1072' '#1089#1077#1088#1074#1077#1088#1077 @@ -30,8 +31,8 @@ object F_Reserv: TF_Reserv ParentFont = False end object Label2: TLabel - Left = 32 - Top = 256 + Left = 8 + Top = 301 Width = 286 Height = 13 Caption = #1047#1072#1085#1103#1090#1086' '#1076#1080#1089#1082#1086#1074#1086#1075#1086' '#1087#1088#1086#1089#1090#1088#1072#1085#1089#1090#1074#1072' '#1085#1072' '#1089#1077#1088#1074#1077#1088#1077', '#1052#1073' ' @@ -43,8 +44,8 @@ object F_Reserv: TF_Reserv ParentFont = False end object Label3: TLabel - Left = 32 - Top = 280 + Left = 8 + Top = 325 Width = 279 Height = 13 Caption = #1051#1080#1084#1080#1090' '#1076#1080#1089#1082#1086#1074#1086#1075#1086' '#1087#1088#1086#1089#1090#1088#1072#1085#1089#1090#1074#1072' '#1085#1072' '#1089#1077#1088#1074#1077#1088#1077', '#1052#1073' ' @@ -56,8 +57,8 @@ object F_Reserv: TF_Reserv ParentFont = False end object lbAllowedSpace: TLabel - Left = 320 - Top = 280 + Left = 296 + Top = 325 Width = 3 Height = 13 Caption = ' ' @@ -69,8 +70,8 @@ object F_Reserv: TF_Reserv ParentFont = False end object lbUsedSpace: TLabel - Left = 320 - Top = 256 + Left = 296 + Top = 301 Width = 3 Height = 13 Caption = ' ' @@ -81,201 +82,112 @@ object F_Reserv: TF_Reserv Font.Style = [fsBold] ParentFont = False end - object Button1: TButton - Left = 437 - Top = 278 - Width = 75 - Height = 25 - Caption = #1047#1072#1082#1088#1099#1090#1100 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False + object ToolBar1: TToolBar + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 550 + Height = 34 + ButtonHeight = 30 + ButtonWidth = 31 + Caption = 'ToolBar1' + DisabledImages = FSCS_Main.imagePanel + DoubleBuffered = True + Images = FSCS_Main.imagePanel + ParentDoubleBuffered = False + ParentShowHint = False + ShowHint = True TabOrder = 0 - OnClick = Button1Click + object ToolButton1: TToolButton + Left = 0 + Top = 0 + Action = aRefresh + end + object ToolButton2: TToolButton + Left = 31 + Top = 0 + Action = aUpload + end + object ToolButton3: TToolButton + Left = 62 + Top = 0 + Hint = #1047#1072#1075#1088#1091#1079#1080#1090#1100' '#1092#1072#1081#1083' '#1089' '#1089#1077#1088#1074#1077#1088#1072 + Action = aLoad + end + object ToolButton4: TToolButton + Left = 93 + Top = 0 + Action = aDelFileFrom + end + object ToolButton6: TToolButton + Left = 124 + Top = 0 + Hint = #1054#1090#1082#1088#1099#1090#1100' '#1092#1072#1081#1083' '#1074' '#1087#1088#1080#1083#1086#1078#1077#1085#1080#1080 + Action = aToPM + ImageIndex = 7 + end + object ToolButton7: TToolButton + Left = 155 + Top = 0 + Hint = #1057#1086#1093#1088#1072#1085#1080#1090#1100' '#1090#1077#1082#1091#1097#1080#1081' '#1087#1088#1086#1077#1082#1090' '#1085#1072' '#1089#1077#1088#1074#1077#1088 + Action = aFromPM + ImageIndex = 6 + end + object ToolButton5: TToolButton + Left = 186 + Top = 0 + Action = aExit + end end - object ListBox1: TListBox - Left = 32 - Top = 24 - Width = 345 - Height = 226 - ItemHeight = 13 + object cxGrid1: TcxGrid + Left = 8 + Top = 62 + Width = 537 + Height = 233 + PopupMenu = PopupMenu1 TabOrder = 1 - end - object btnSave: TBitBtn - Left = 389 - Top = 24 - Width = 135 - Height = 41 - Caption = 'btnSave' - DoubleBuffered = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - Glyph.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000FF00FF00FF00 - FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 - FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF000808 - 0800A59CA500A59CA500A59CA500A59CA500A59CA500A59CA500181818000808 - 080000000000FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00181818000808 - 0800C6C6C60029292900424242009C9C9C00C6C6C600CECECE00181818000808 - 080008080800FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00101010000808 - 0800C6C6C60018181800292929009C9C9C00BDBDBD00C6C6C600181818000808 - 0800080808000808080000000000FF00FF00FF00FF00FF00FF00101010000808 - 0800CECECE00C6C6C600C6C6C600C6C6C600BDBDBD00BDBDBD00181818000808 - 0800101010000808080008080800FF00FF00FF00FF00FF00FF00101010000808 - 0800080808000808080008080800080808000808080008080800080808000808 - 08001010100008080800080808000808080000000000FF00FF00212121000808 - 0800FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F7000808 - 08001818180008080800101010000808080008080800FF00FF00212121000808 - 0800FFF7F700C6C6C6009C9C9C009C9C9C009C9C9C00E7E7E700FFF7F7000808 - 08002929290008080800101010000808080008080800FF00FF00292929000808 - 0800FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F7000808 - 08002929290008080800181818000808080010101000FF00FF00292929000808 - 0800FFF7F700C6C6C6009C9C9C009C9C9C009C9C9C00E7E7E700FFF7F7000808 - 08002929290008080800292929000808080010101000FF00FF00292929000808 - 0800FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F7000808 - 08002929290008080800292929000808080018181800FF00FF00292929000808 - 0800DE842100DE7B2100D67B1800D6731800CE731800CE6B1000CE6B10000808 - 08002929290008080800292929000808080029292900FF00FF00FF00FF00FF00 - FF002929290008080800FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7 - F700FFF7F70008080800292929000808080029292900FF00FF00FF00FF00FF00 - FF002929290008080800DE842100DE7B2100D67B1800D6731800CE731800CE6B - 1000CE6B100008080800292929000808080029292900FF00FF00FF00FF00FF00 - FF00FF00FF00FF00FF002929290008080800FFF7F700FFF7F700FFF7F700FFF7 - F700FFF7F700FFF7F700FFF7F7000808080029292900FF00FF00FF00FF00FF00 - FF00FF00FF00FF00FF002929290008080800DE842100DE7B2100D67B1800D673 - 1800CE731800CE6B1000CE6B10000808080029292900FF00FF00} - ParentDoubleBuffered = False - ParentFont = False - TabOrder = 2 - OnClick = btnSaveClick - end - object btnLoad: TBitBtn - Left = 389 - Top = 96 - Width = 135 - Height = 41 - Caption = 'btnLoad' - DoubleBuffered = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - Glyph.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000000000000000000000000000000000000FF00FF00FF00 - FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 - FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00944A - 0000E7DEB500E7DEB500E7DEB500E7DEB500E7DEB500E7DEB500AD5A0800944A - 000084420000FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00A55A0800944A - 0000DEDED600C66B1000DE8C3100EFDEB500DEDED600E7E7DE00AD5A0800944A - 00008C420000FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00A5520800944A - 0000DEDED600AD5A0800C66B1000EFDEB500DEDECE00DEDED600AD5A0800944A - 0000944A0000944A000084420000FF00FF00FF00FF00FF00FF00A5520800944A - 0000E7E7D600DEDED600DEDED600DEDECE00DEDECE00DEDECE00AD5A0800944A - 00009C520000944A00008C420000FF00FF00FF00FF00FF00FF00A5520800944A - 0000944A0000944A0000944A0000944A0000944A0000944A0000944A0000944A - 0000A5520800944A0000944A0000944A000084420000FF00FF00B5630800944A - 0000FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700944A - 0000AD5A0800944A00009C520000944A00008C420000FF00FF00BD631000944A - 0000FFF7F700E7E7D600EFDEB500EFDEB500EFDEB500EFEFEF00FFF7F700944A - 0000C66B1800944A0000A5520800944A0000944A0000FF00FF00BD6B1000944A - 0000FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700944A - 0000C6731800944A0000AD5A0800944A00009C520000FF00FF00BD6B1000944A - 0000FFF7F700E7E7D600EFDEB500EFDEB500EFDEB500EFEFEF00FFF7F700944A - 0000C6731800944A0000C66B1800944A0000A5520800FF00FF00C66B1000944A - 0000FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700944A - 0000C6731800944A0000C6731800944A0000AD5A0800FF00FF00C66B1000944A - 0000E79C2900E7942900E7942100DE8C2100DE8C2100DE8C1800DE841800944A - 0000C6731800944A0000C6731800944A0000C66B1800FF00FF00FF00FF00FF00 - FF00C66B1800944A0000FFF7F700FFF7F700FFF7F700FFF7F700FFF7F700FFF7 - F700FFF7F700944A0000C6731800944A0000C6731800FF00FF00FF00FF00FF00 - FF00C66B1000944A0000E79C2900E7942900E7942100DE8C2100DE8C2100DE8C - 1800DE841800944A0000C6731800944A0000C6731800FF00FF00FF00FF00FF00 - FF00FF00FF00FF00FF00C66B1800944A0000FFF7F700FFF7F700FFF7F700FFF7 - F700FFF7F700FFF7F700FFF7F700944A0000C6731800FF00FF00FF00FF00FF00 - FF00FF00FF00FF00FF00C66B1000944A0000E79C2900E7942900E7942100DE8C - 2100DE8C2100DE8C1800DE841800944A0000C66B1000FF00FF00} - ParentDoubleBuffered = False - ParentFont = False - TabOrder = 3 - OnClick = btnLoadClick - end - object btnDelete: TBitBtn - Left = 389 - Top = 168 - Width = 135 - Height = 41 - Caption = 'btnDelete' - DoubleBuffered = True - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - Glyph.Data = { - 36060000424D3606000000000000360400002800000020000000100000000100 - 08000000000000020000630E0000630E00000001000000000000000000003300 - 00006600000099000000CC000000FF0000000033000033330000663300009933 - 0000CC330000FF33000000660000336600006666000099660000CC660000FF66 - 000000990000339900006699000099990000CC990000FF99000000CC000033CC - 000066CC000099CC0000CCCC0000FFCC000000FF000033FF000066FF000099FF - 0000CCFF0000FFFF000000003300330033006600330099003300CC003300FF00 - 330000333300333333006633330099333300CC333300FF333300006633003366 - 33006666330099663300CC663300FF6633000099330033993300669933009999 - 3300CC993300FF99330000CC330033CC330066CC330099CC3300CCCC3300FFCC - 330000FF330033FF330066FF330099FF3300CCFF3300FFFF3300000066003300 - 66006600660099006600CC006600FF0066000033660033336600663366009933 - 6600CC336600FF33660000666600336666006666660099666600CC666600FF66 - 660000996600339966006699660099996600CC996600FF99660000CC660033CC - 660066CC660099CC6600CCCC6600FFCC660000FF660033FF660066FF660099FF - 6600CCFF6600FFFF660000009900330099006600990099009900CC009900FF00 - 990000339900333399006633990099339900CC339900FF339900006699003366 - 99006666990099669900CC669900FF6699000099990033999900669999009999 - 9900CC999900FF99990000CC990033CC990066CC990099CC9900CCCC9900FFCC - 990000FF990033FF990066FF990099FF9900CCFF9900FFFF99000000CC003300 - CC006600CC009900CC00CC00CC00FF00CC000033CC003333CC006633CC009933 - CC00CC33CC00FF33CC000066CC003366CC006666CC009966CC00CC66CC00FF66 - CC000099CC003399CC006699CC009999CC00CC99CC00FF99CC0000CCCC0033CC - CC0066CCCC0099CCCC00CCCCCC00FFCCCC0000FFCC0033FFCC0066FFCC0099FF - CC00CCFFCC00FFFFCC000000FF003300FF006600FF009900FF00CC00FF00FF00 - FF000033FF003333FF006633FF009933FF00CC33FF00FF33FF000066FF003366 - FF006666FF009966FF00CC66FF00FF66FF000099FF003399FF006699FF009999 - FF00CC99FF00FF99FF0000CCFF0033CCFF0066CCFF0099CCFF00CCCCFF00FFCC - FF0000FFFF0033FFFF0066FFFF0099FFFF00CCFFFF00FFFFFF00000080000080 - 000000808000800000008000800080800000C0C0C00080808000191919004C4C - 4C00B2B2B200E5E5E500C8AC2800E0CC6600F2EABF00B59B2400D8E9EC009933 - 6600D075A300ECC6D900646F710099A8AC00E2EFF10000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000E8E8E8E8E8E8 - E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E86CE8E8 - E8E8E8E8E8E8E8E8B4E8E8E8E881E8E8E8E8E8E8E8E8E8E8ACE8E8E897B46CE8 - E8E8E8E8E8E8E8E8E8E8E8E881AC81E8E8E8E8E8E8E8E8E8E8E8E8E897C7B46C - E8E8E8E8E8E8E8B4E8E8E8E881E3AC81E8E8E8E8E8E8E8ACE8E8E8E8E897C090 - E8E8E8E8E8E8B4E8E8E8E8E8E881E381E8E8E8E8E8E8ACE8E8E8E8E8E8E890B4 - 6CE8E8E8E8B46CE8E8E8E8E8E8E881AC81E8E8E8E8AC81E8E8E8E8E8E8E8E890 - B46CE8E8B46CE8E8E8E8E8E8E8E8E881AC81E8E8AC81E8E8E8E8E8E8E8E8E8E8 - 90B46CB46CE8E8E8E8E8E8E8E8E8E8E881AC81AC81E8E8E8E8E8E8E8E8E8E8E8 - E890B46CE8E8E8E8E8E8E8E8E8E8E8E8E881AC81E8E8E8E8E8E8E8E8E8E8E8E8 - 90B46C906CE8E8E8E8E8E8E8E8E8E8E881AC818181E8E8E8E8E8E8E8E8E8E890 - B46CE8E8906CE8E8E8E8E8E8E8E8E881AC81E8E88181E8E8E8E8E8E8E890B4B4 - 6CE8E8E8E8906CE8E8E8E8E8E881ACAC81E8E8E8E88181E8E8E8E8E890C7B46C - E8E8E8E8E8E8906CE8E8E8E881E3AC81E8E8E8E8E8E88181E8E8E8E87A907AE8 - E8E8E8E8E8E8E8E890E8E8E8AC81ACE8E8E8E8E8E8E8E8E881E8E8E8E8E8E8E8 - E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8 - E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8} - NumGlyphs = 2 - ParentDoubleBuffered = False - ParentFont = False - TabOrder = 4 - OnClick = btnDeleteClick + LookAndFeel.NativeStyle = True + object cxGrid1DBTableView1: TcxGridDBTableView + Navigator.Buttons.CustomButtons = <> + DataController.DataSource = DataSource1 + DataController.Summary.DefaultGroupSummaryItems = <> + DataController.Summary.FooterSummaryItems = <> + DataController.Summary.SummaryGroups = <> + OptionsBehavior.CopyRecordsToClipboard = False + OptionsBehavior.ImmediateEditor = False + OptionsBehavior.ColumnHeaderHints = False + OptionsData.Deleting = False + OptionsData.Editing = False + OptionsData.Inserting = False + OptionsSelection.CellSelect = False + OptionsView.FocusRect = False + OptionsView.GroupByBox = False + object cxGrid1DBTableView1FileName: TcxGridDBColumn + Caption = #1060#1072#1081#1083 + DataBinding.FieldName = 'FileName' + Options.Editing = False + Options.Filtering = False + Options.Moving = False + Width = 280 + end + object cxGrid1DBTableView1FileSize: TcxGridDBColumn + Caption = #1056#1072#1079#1084#1077#1088', '#1052#1073 + DataBinding.FieldName = 'FileSize' + Options.Editing = False + Options.Filtering = False + Options.Moving = False + end + object cxGrid1DBTableView1FileDate: TcxGridDBColumn + Caption = #1044#1072#1090#1072 + DataBinding.FieldName = 'FileDate' + Options.Editing = False + Options.Filtering = False + Options.Moving = False + end + end + object cxGrid1Level1: TcxGridLevel + GridView = cxGrid1DBTableView1 + end end object siLangLinked1: TsiLangLinked Version = '6.5.2' @@ -365,59 +277,284 @@ object F_Reserv: TF_Reserv 01000D000A006C00620041006C006C006F007700650064005300700061006300 65000100200001000100010001000100010001000D000A006C00620055007300 6500640053007000610063006500010020000100010001000100010001000100 - 0D000A0042007500740074006F006E0031000100170430043A0440044B044204 - 4C040100170430043A044004380442043804010043006C006F00730065000100 - 01000100010001000D000A00620074006E005300610076006500010062007400 - 6E00530061007600650001000100010001000100010001000D000A0062007400 - 6E004C006F00610064000100620074006E004C006F0061006400010001000100 - 01000100010001000D000A00620074006E00440065006C006500740065000100 - 620074006E00440065006C006500740065000100010001000100010001000100 - 0D000A0073007400480069006E00740073005F0055006E00690063006F006400 - 65000D000A007300740044006900730070006C00610079004C00610062006500 - 6C0073005F0055006E00690063006F00640065000D000A007300740046006F00 - 6E00740073005F0055006E00690063006F00640065000D000A00540046005F00 - 52006500730065007200760001005400610068006F006D006100010001000100 - 01000100010001000D000A004C006100620065006C0031000100540061006800 - 6F006D00610001000100010001000100010001000D000A004C00610062006500 - 6C00320001005400610068006F006D0061000100010001000100010001000100 - 0D000A004C006100620065006C00330001005400610068006F006D0061000100 - 0100010001000100010001000D000A006C00620041006C006C006F0077006500 - 64005300700061006300650001005400610068006F006D006100010001000100 - 01000100010001000D000A006C00620055007300650064005300700061006300 - 650001005400610068006F006D00610001000100010001000100010001000D00 - 0A0042007500740074006F006E00310001005400610068006F006D0061000100 - 0100010001000100010001000D000A00620074006E0053006100760065000100 - 5400610068006F006D00610001000100010001000100010001000D000A006200 - 74006E004C006F006100640001005400610068006F006D006100010001000100 - 01000100010001000D000A00620074006E00440065006C006500740065000100 - 5400610068006F006D00610001000100010001000100010001000D000A007300 - 74004D0075006C00740069004C0069006E00650073005F0055006E0069006300 - 6F00640065000D000A007300740053007400720069006E00670073005F005500 - 6E00690063006F00640065000D000A00730074004F0074006800650072005300 - 7400720069006E00670073005F0055006E00690063006F00640065000D000A00 - 7300740043006F006C006C0065006300740069006F006E0073005F0055006E00 - 690063006F00640065000D000A00730074004300680061007200530065007400 - 73005F0055006E00690063006F00640065000D000A00540046005F0052006500 - 73006500720076000100440045004600410055004C0054005F00430048004100 - 520053004500540001000100010001000100010001000D000A004C0061006200 - 65006C0031000100440045004600410055004C0054005F004300480041005200 - 53004500540001000100010001000100010001000D000A004C00610062006500 - 6C0032000100440045004600410055004C0054005F0043004800410052005300 - 4500540001000100010001000100010001000D000A004C006100620065006C00 - 33000100440045004600410055004C0054005F00430048004100520053004500 - 540001000100010001000100010001000D000A006C00620041006C006C006F00 - 770065006400530070006100630065000100440045004600410055004C005400 + 0D000A0054006F006F006C004200610072003100010054006F006F006C004200 + 61007200310001000100010001000100010001000D000A006100520065006600 + 7200650073006800010052006500660072006500730068000100010001000100 + 0100010001000D000A006100550070006C006F00610064000100170430043304 + 400443043704380442044C0420004404300439043B0420003D04300420004104 + 35044004320435044004010017043004320430043D0442043004360438044204 + 380420004404300439043B0420003D0430042000410435044004320435044004 + 0100550070006C006F00610064002000660069006C006500200074006F002000 + 730065007200760065007200010001000100010001000D000A0061004C006F00 + 610064000100170430043304400443043704380442044C042000440430043904 + 3B04200041042000410435044004320435044004300401001704300432043004 + 3D0442043004360438044204380420004404300439043B042000370420004104 + 35044004320435044004300401004C006F00610064002000660069006C006500 + 2000660072006F006D0020007300650072007600650072000100010001000100 + 01000D000A006100440065006C00460069006C006500460072006F006D000100 + 2304340430043B04380442044C0420004404300439043B040100120438043404 + 30043B0438044204380420004404300439043B040100440065006C0065007400 + 65002000660069006C006500010001000100010001000D000A00610054006F00 + 50004D000100610054006F0050004D0001000100010001000100010001000D00 + 0A006100460072006F006D0050004D0001006100460072006F006D0050004D00 + 01000100010001000100010001000D000A006100450078006900740001006100 + 450078006900740001000100010001000100010001000D000A00630078004700 + 7200690064003100440042005400610062006C00650056006900650077003100 + 460069006C0065004E0061006D0065000100460069006C0065004E0061006D00 + 650001000100010001000100010001000D000A00630078004700720069006400 + 3100440042005400610062006C00650056006900650077003100460069006C00 + 6500530069007A0065000100460069006C006500530069007A00650001000100 + 010001000100010001000D000A00630078004700720069006400310044004200 + 5400610062006C00650056006900650077003100460069006C00650044006100 + 740065000100460069006C006500440061007400650001000100010001000100 + 010001000D000A0073007400480069006E00740073005F0055006E0069006300 + 6F00640065000D000A0054006F006F006C0042007500740074006F006E003300 + 0100170430043304400443043704380442044C0420004404300439043B042000 + 410420004104350440043204350440043004010017043004320430043D044204 + 3004360438044204380420004404300439043B04200037042000410435044004 + 320435044004300401004C006F00610064002000660069006C00650020006600 + 72006F006D002000730065007200760065007200010001000100010001000D00 + 0A0054006F006F006C0042007500740074006F006E00360001001E0442043A04 + 40044B0442044C0420004404300439043B042000320420003F04400438043B04 + 3E04360435043D043804380401001204560434043A0440043804420438042000 + 4404300439043B042000320420003F0440043E043304400430043C0456042000 + 01004F00700065006E002000660069006C006500200069006E00200061007000 + 70006C00690063006100740069006F006E00010001000100010001000D000A00 + 54006F006F006C0042007500740074006F006E003700010021043E0445044004 + 30043D04380442044C042000420435043A04430449043804390420003F044004 + 3E0435043A04420420003D043004200041043504400432043504400401001704 + 310435044004350433044204380420003F043E0442043E0447043D0438043904 + 20003F0440043E0435043A04420420003D043004200041043504400432043504 + 40040100550070006C006F00610064002000630075007200720065006E007400 + 2000700072006F006A00650063007400200074006F0020007300650072007600 + 65007200010001000100010001000D000A006100520065006600720065007300 + 680001001E0431043D043E043204380442044C04200041043F04380441043E04 + 3A0420004404300439043B043E04320401001F043E043D043E04320438044204 + 3804200041043F04380441043E043A0420004404300439043B04560432040100 + 52006500660072006500730068002000660069006C006500730020006C006900 + 73007400010001000100010001000D000A006100550070006C006F0061006400 + 0100170430043304400443043704380442044C0420004404300439043B042000 + 3D0430042000410435044004320435044004010017043004320430043D044204 + 3004360438044204380420004404300439043B0420003D043004200041043504 + 40043204350440040100550070006C006F00610064002000660069006C006500 + 200074006F002000730065007200760065007200010001000100010001000D00 + 0A006100440065006C00460069006C006500460072006F006D00010023043404 + 30043B04380442044C0420004404300439043B04010012043804340430043B04 + 38044204380420004404300439043B040100440065006C006500740065002000 + 660069006C006500010001000100010001000D000A0061004500780069007400 + 010012044B0445043E0434040100120438044504560434040100450078006900 + 7400010001000100010001000D000A007300740044006900730070006C006100 + 79004C006100620065006C0073005F0055006E00690063006F00640065000D00 + 0A00460069006C0065005400610062006C006500460069006C00650053006900 + 7A0065000100460069006C006500530069007A00650001000100010001000100 + 010001000D000A00460069006C0065005400610062006C006500460069006C00 + 650044006100740065000100460069006C006500440061007400650001000100 + 010001000100010001000D000A00460069006C0065005400610062006C006500 + 3100460069006C006500530069007A0065000100460069006C00650053006900 + 7A00650001000100010001000100010001000D000A00460069006C0065005400 + 610062006C0065003100460069006C0065004400610074006100010046006900 + 6C006500440061007400610001000100010001000100010001000D000A007300 + 740046006F006E00740073005F0055006E00690063006F00640065000D000A00 + 540046005F0052006500730065007200760001005400610068006F006D006100 + 01000100010001000100010001000D000A004C006100620065006C0031000100 + 5400610068006F006D00610001000100010001000100010001000D000A004C00 + 6100620065006C00320001005400610068006F006D0061000100010001000100 + 0100010001000D000A004C006100620065006C00330001005400610068006F00 + 6D00610001000100010001000100010001000D000A006C00620041006C006C00 + 6F007700650064005300700061006300650001005400610068006F006D006100 + 01000100010001000100010001000D000A006C00620055007300650064005300 + 700061006300650001005400610068006F006D00610001000100010001000100 + 010001000D000A00730074004D0075006C00740069004C0069006E0065007300 + 5F0055006E00690063006F00640065000D000A00730074005300740072006900 + 6E00670073005F0055006E00690063006F00640065000D000A00730074004F00 + 740068006500720053007400720069006E00670073005F0055006E0069006300 + 6F00640065000D000A00460069006C0065005400610062006C0065002E004300 + 75007200720065006E007400560065007200730069006F006E00010039002E00 + 30003000200001000100010001000100010001000D000A00460069006C006500 + 5400610062006C00650031002E00560065007200730069006F006E0001003700 + 2E00370034002E00300030002000500072006F00660065007300730069006F00 + 6E0061006C002000450064006900740069006F006E0001000100010001000100 + 010001000D000A007300740043006F006C006C0065006300740069006F006E00 + 73005F0055006E00690063006F00640065000D000A00460069006C0065005400 + 610062006C0065002E0049006E0064006500780044006500660073005B003000 + 5D002E0044006500730063004600690065006C00640073000100460069006C00 + 65004E0061006D00650001000100010001000100010001000D000A0046006900 + 6C0065005400610062006C0065002E0049006E00640065007800440065006600 + 73005B0030005D002E004600690065006C00640073000100460069006C006500 + 4E0061006D00650001000100010001000100010001000D000A00730074004300 + 68006100720053006500740073005F0055006E00690063006F00640065000D00 + 0A00540046005F00520065007300650072007600010044004500460041005500 + 4C0054005F004300480041005200530045005400010001000100010001000100 + 01000D000A004C006100620065006C0031000100440045004600410055004C00 + 54005F0043004800410052005300450054000100010001000100010001000100 + 0D000A004C006100620065006C0032000100440045004600410055004C005400 5F00430048004100520053004500540001000100010001000100010001000D00 - 0A006C0062005500730065006400530070006100630065000100440045004600 - 410055004C0054005F0043004800410052005300450054000100010001000100 - 0100010001000D000A0042007500740074006F006E0031000100440045004600 - 410055004C0054005F0043004800410052005300450054000100010001000100 - 0100010001000D000A00620074006E0053006100760065000100440045004600 - 410055004C0054005F0043004800410052005300450054000100010001000100 - 0100010001000D000A00620074006E004C006F00610064000100440045004600 - 410055004C0054005F0043004800410052005300450054000100010001000100 - 0100010001000D000A00620074006E00440065006C0065007400650001004400 + 0A004C006100620065006C0033000100440045004600410055004C0054005F00 + 430048004100520053004500540001000100010001000100010001000D000A00 + 6C00620041006C006C006F007700650064005300700061006300650001004400 45004600410055004C0054005F00430048004100520053004500540001000100 - 010001000100010001000D000A00} + 010001000100010001000D000A006C0062005500730065006400530070006100 + 630065000100440045004600410055004C0054005F0043004800410052005300 + 4500540001000100010001000100010001000D000A00} + end + object DataSource1: TDataSource + DataSet = FileTable + Left = 136 + Top = 56 + end + object FileTable: TSQLMemTable + CurrentVersion = '9.00 ' + StoreDefs = True + DatabaseName = 'MEMORY' + ReadOnly = False + CaseInsensitive = False + IndexDefs = < + item + Name = 'FileTableIndex1' + DescFields = 'FileName' + Fields = 'FileName' + Options = [ixDescending] + end> + FieldDefs = < + item + Name = 'FileName' + DataType = ftString + Size = 255 + end + item + Name = 'FileSize' + DataType = ftString + Size = 20 + end + item + Name = 'FileDate' + DataType = ftString + Size = 20 + end> + TableName = 'Table1997262626_14648' + Exclusive = False + MemoryTableAllocBy = 1000 + Left = 256 + Top = 64 + object FileTableFileName: TStringField + FieldName = 'FileName' + Size = 255 + end + object FileTableFileSize: TStringField + FieldName = 'FileSize' + end + object FileTableFileDate: TStringField + FieldName = 'FileDate' + end + end + object ActionList1: TActionList + Images = FSCS_Main.imagePanel + Left = 464 + Top = 120 + object aRefresh: TAction + Caption = 'Refresh' + Hint = #1054#1073#1085#1086#1074#1080#1090#1100' '#1089#1087#1080#1089#1086#1082' '#1092#1072#1081#1083#1086#1074 + ImageIndex = 96 + OnExecute = aRefreshExecute + end + object aUpload: TAction + Caption = #1047#1072#1075#1088#1091#1079#1080#1090#1100' '#1092#1072#1081#1083' '#1085#1072' '#1089#1077#1088#1074#1077#1088 + Hint = #1047#1072#1075#1088#1091#1079#1080#1090#1100' '#1092#1072#1081#1083' '#1085#1072' '#1089#1077#1088#1074#1077#1088 + ImageIndex = 1 + OnExecute = aUploadExecute + end + object aLoad: TAction + Caption = #1047#1072#1075#1088#1091#1079#1080#1090#1100' '#1092#1072#1081#1083' '#1089' '#1089#1077#1088#1074#1077#1088#1072 + ImageIndex = 2 + OnExecute = aLoadExecute + end + object aDelFileFrom: TAction + Caption = #1059#1076#1072#1083#1080#1090#1100' '#1092#1072#1081#1083 + Hint = #1059#1076#1072#1083#1080#1090#1100' '#1092#1072#1081#1083 + ImageIndex = 50 + OnExecute = aDelFileFromExecute + end + object aToPM: TAction + Caption = 'aToPM' + OnExecute = aToPMExecute + end + object aFromPM: TAction + Caption = 'aFromPM' + OnExecute = aFromPMExecute + end + object aExit: TAction + Caption = 'aExit' + Hint = #1042#1099#1093#1086#1076 + ImageIndex = 9 + ShortCut = 27 + OnExecute = aExitExecute + end + end + object PopupMenu1: TPopupMenu + Left = 256 + Top = 176 + object N1: TMenuItem + Action = aLoad + end + object N2: TMenuItem + Action = aUpload + end + object aDelete1: TMenuItem + Action = aDelFileFrom + end + end + object FileTable1: TkbmMemTable + Active = True + DesignActivation = True + AttachedAutoRefresh = True + AttachMaxCount = 1 + FieldDefs = < + item + Name = 'FileName' + DataType = ftString + Size = 256 + end + item + Name = 'FileSize' + DataType = ftString + Size = 20 + end + item + Name = 'FileData' + DataType = ftString + Size = 20 + end> + IndexDefs = <> + SortOptions = [] + PersistentBackup = False + ProgressFlags = [mtpcLoad, mtpcSave, mtpcCopy] + LoadedCompletely = False + SavedCompletely = False + FilterOptions = [] + Version = '7.74.00 Professional Edition' + LanguageID = 0 + SortID = 0 + SubLanguageID = 1 + LocaleID = 1024 + Left = 368 + Top = 56 + object FileTable1FileName: TStringField + FieldName = 'FileName' + Size = 256 + end + object FileTable1FileSize: TStringField + FieldName = 'FileSize' + end + object FileTable1FileData: TStringField + FieldName = 'FileData' + end + end + object Query1: TQuery + Left = 352 + Top = 216 + end + object MemSQL1: TkbmMemSQL + Left = 400 + Top = 192 end end diff --git a/SRC/Main/U_Reserv.pas b/SRC/Main/U_Reserv.pas index 2d6ae84..44d40a7 100644 --- a/SRC/Main/U_Reserv.pas +++ b/SRC/Main/U_Reserv.pas @@ -8,28 +8,74 @@ uses IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdExplicitTLSClientServerBase, IdFTP, idUri, idFTPCommon,idFTPLIST, IdAllFTPListParsers, IdFTPListParseBase,IdFTPListParseAS400, IdFTPListParsePcTcp, IdFTPListTypes, - Wininet, siComp, siLngLnk; + Wininet, siComp, siLngLnk, Grids, DBGrids, RzDBGrid, DB, SQLMemMain, + cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters, cxStyles, + cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit, cxNavigator, cxDBData, + cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel, + cxClasses, cxGridCustomView, cxGrid, ExtCtrls, RzPanel, ActnList, + PlatformDefaultStyleActnCtrls, ActnMan, ToolWin, ActnCtrls, ComCtrls, acDBGrid, + Menus, kbmMemTable, kbmMemSQL, DBTables; type TF_Reserv = class(TForm) - Button1: TButton; - ListBox1: TListBox; - btnSave: TBitBtn; - btnLoad: TBitBtn; - btnDelete: TBitBtn; Label1: TLabel; Label2: TLabel; Label3: TLabel; lbAllowedSpace: TLabel; lbUsedSpace: TLabel; siLangLinked1: TsiLangLinked; - procedure Button1Click(Sender: TObject); + DataSource1: TDataSource; + FileTable: TSQLMemTable; + FileTableFileSize: TStringField; + FileTableFileDate: TStringField; + ToolBar1: TToolBar; + ToolButton1: TToolButton; + ToolButton2: TToolButton; + ToolButton3: TToolButton; + ToolButton4: TToolButton; + ToolButton5: TToolButton; + ActionList1: TActionList; + aRefresh: TAction; + aUpload: TAction; + aLoad: TAction; + aDelFileFrom: TAction; + aExit: TAction; + PopupMenu1: TPopupMenu; + N1: TMenuItem; + N2: TMenuItem; + aDelete1: TMenuItem; + FileTable1: TkbmMemTable; + aToPM: TAction; + aFromPM: TAction; + ToolButton6: TToolButton; + ToolButton7: TToolButton; + FileTableFileName: TStringField; + Query1: TQuery; + FileTable1FileName: TStringField; + FileTable1FileSize: TStringField; + FileTable1FileData: TStringField; + MemSQL1: TkbmMemSQL; + cxGrid1DBTableView1: TcxGridDBTableView; + cxGrid1Level1: TcxGridLevel; + cxGrid1: TcxGrid; + cxGrid1DBTableView1FileName: TcxGridDBColumn; + cxGrid1DBTableView1FileSize: TcxGridDBColumn; + cxGrid1DBTableView1FileDate: TcxGridDBColumn; + //procedure Button1Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormShow(Sender: TObject); - procedure btnSaveClick(Sender: TObject); - procedure btnLoadClick(Sender: TObject); - procedure btnDeleteClick(Sender: TObject); + //procedure btnSaveClick(Sender: TObject); + //procedure btnLoadClick(Sender: TObject); + //procedure btnDeleteClick(Sender: TObject); + procedure aRefreshExecute(Sender: TObject); + procedure aUploadExecute(Sender: TObject); + procedure aExitExecute(Sender: TObject); + procedure aLoadExecute(Sender: TObject); + procedure aDelFileFromExecute(Sender: TObject); + procedure aToPMExecute(Sender: TObject); + procedure aFromPMExecute(Sender: TObject); + //procedure RzDBGrid1TitleClick(Column: TColumn); private { Private declarations } public @@ -39,9 +85,11 @@ type function GetFileListFromFtp(aFtpStr: string): TStringList; function DeleteFileFromFtp(aFtpStr, aFileName: string): boolean; Procedure RefreshFileList; - Procedure SetButtons(aSave, aLoad, aDelete: Boolean); + //Procedure SetButtons(aSave, aLoad, aDelete: Boolean); Procedure SelectItem; Function HexToStr(const HexStr: string): string; + function SaveCurrProjToTemFile: boolean; + //function GetTempDir: string; end; var @@ -49,13 +97,88 @@ var Selected_Item: integer; FClientLimit: integer; // , FFact: Integer; // , + FileDateList: TStringList; + FileSizeList: TStringList; + MyHeaderStyle: TcxStyle; //FConnStr: string; implementation -uses USCS_Main, U_Common, U_BaseCommon, U_BaseConstants; +uses USCS_Main, U_Common, U_BaseCommon, U_BaseConstants, U_ProtectionCommon, U_Main, U_SCSComponent; {$R *.dfm} +(* +function GetTempDir: string; +var + buff: pchar; + s: string; +begin + if length(TempDir) > 0 then + begin + if DirectoryExists(TempDir) then + Result := TempDir + else + begin + TempDir := ''; + Result := GetTempDir; + end; + end + else + begin + // Tolik 24/06/* 2019 -- + s := GetEnvironmentVariable('tmp'); + + if ((s = '') or (not DirectoryExists(s))) then + s := GetEnvironmentVariable('temp'); + + if ((s = '') or (not DirectoryExists(s))) then + s := exedir; + + (* + // Tolik 21/06/2019 -- + getmem(buff, 256*2); + // + s := ''; + if (GetEnvironmentVariable('tmp',buff, 254) >0) + and (DirectoryExists(buff)) then + begin + s := buff; + end + else + if (GetEnvironmentVariable('temp',buff, 254) >0) + and (DirectoryExists(buff)) then + begin + s := buff; + end + else + s := exedir; + freemem(buff); + *) + (* try + if not DirectoryExists(s + OurTempDir) then + MkDir(s + OurTempDir); + TempDir := s + OurTempDir; + result := TempDir; + except + ShowMessage(cTmpDirErr); + {$if Defined(ES_GRAPH_SC)} + Application.Terminate; + {$else} + ExitProcess(1); + {$ifend} + end; + end; +end; +*) +function TF_Reserv.SaveCurrProjToTemFile: boolean; +var TempProj: TSCSProject; + CurrProjNode: TTreeNode; +begin + CurrProjNode := F_ProjMan.GSCSBase.CurrProject.TreeViewNode; + Result := false; + +end; + function TF_Reserv.HexToStr(const HexStr: string): string; var i: Integer; @@ -72,7 +195,7 @@ end; Procedure TF_Reserv.SelectItem; var i: integer; begin - if F_Reserv.ListBox1.Count > 0 then + {if F_Reserv.ListBox1.Count > 0 then begin for i := 0 to F_Reserv.ListBox1.Count - 1 do begin @@ -87,13 +210,141 @@ begin end else Selected_Item := 0; + } end; - +(* Procedure TF_Reserv.SetButtons(aSave, aLoad, aDelete: Boolean); begin +{ F_Reserv.btnSave.Enabled := aSave; F_Reserv.btnLoad.Enabled := aLoad; F_Reserv.btnDelete.Enabled := aDelete; + } +end; +*) +procedure TF_Reserv.aUploadExecute(Sender: TObject); +var OpenDlg: TOpenDialog; + FileNameShort, Filename: string; + i: integer; + +begin + OpenDlg := TOpenDialog.Create(nil); + OpenDlg.Filter := ' (*.scs)|*.SCS'; + if OpenDlg.Execute then + begin + FileName := OpenDlg.FileName; + if SendFileToFtp(HexToStr(GFtpConnectStr), FileName) then + RefreshFileList; + end; + OpenDlg.Free; +end; + +procedure TF_Reserv.aDelFileFromExecute(Sender: TObject); +begin + if DeleteFileFromFtp(HexToStr(GFtpConnectStr), f_Reserv.filetable.fieldvalues['filename']) then + begin + RefreshFileList; + end; +end; + +procedure TF_Reserv.aExitExecute(Sender: TObject); +begin + F_Reserv.Close; +end; + +procedure TF_Reserv.aFromPMExecute(Sender: TObject); +var tdir: string; + canProceed, formHide: Boolean; + fName: String; +begin + if CheckIsOpenProject(false) then + begin + tdir := ''; + tdir := GetTempDir; + if tdir <> '' then + begin + FName := tdir + '\'+ F_ProjMan.GSCSBase.CurrProject.Name + '.scs'; + if FileExists(FName) then + DeleteFile(FName); + if F_ProjMan.GSCSBase.CurrProject.SaveToStreamOrFile(nil, FName) then + begin + if SendFileToFtp(HexToStr(GFtpConnectStr), FName) then + RefreshFileList; + end; + + if FileExists(FName) then + DeleteFile(FName); + end; + end + else + ShowMessage(''); +end; + +procedure TF_Reserv.aLoadExecute(Sender: TObject); +var SaveDlg: TSaveDialog; + FileName: string; + i: integer; +begin + FileName := ''; + FileName := FileTable.fieldvalues['FileName']; + if fileName <> '' then + begin + SaveDlg := TSaveDialog.Create(nil); + SaveDlg.Filter := ' (*.scs)|*.SCS'; + SaveDlg.FileName := fileName; + if SaveDlg.Execute then + begin + FileName := SaveDlg.FileName; + GetFileFromFtp(HexToStr(GFtpConnectStr), extractfilename(FileName), SaveDlg.FileName); + end; + SaveDlg.Free; + end; + +end; + +procedure TF_Reserv.aRefreshExecute(Sender: TObject); +begin + RefreshFileList; +end; + +procedure TF_Reserv.aToPMExecute(Sender: TObject); +var tdir: string; + canProceed, formHide: Boolean; +begin + tdir := ''; + tdir := GetTempDir; + if tdir <> '' then + begin + CanProceed := False; + formHide := False; + if CheckIsOpenProject(false) then + begin + if MessageBox(F_Reserv.Handle, PChar(cFtpmes7), PChar(cWarningSlowCap), MB_YESNO) = IDYes then + begin + F_Reserv.Hide; + formHide := True; + CanProceed := CloseCurrProject(true) <> IDCancel; + end; + end + else + CanProceed := True; + + if CanProceed then + begin + GetFileFromFtp(HexToStr(GFtpConnectStr), FileTable.FieldValues['FileName'], tdir + '\'+ FileTable.FieldValues['FileName']); + if FileExists(tdir + '\'+ FileTable.FieldValues['FileName']) then + begin + F_ProjMan.LoadProjectFromFile(tdir + '\'+ FileTable.FieldValues['FileName']); + DeleteFile(tdir + '\'+ FileTable.FieldValues['FileName']); + F_Reserv.Close; + end; + end + else + begin + if formHide then + F_Reserv.ShowModal; + end; + end; end; Procedure TF_Reserv.RefreshFileList; @@ -108,7 +359,10 @@ begin vLoad := False; vDelete := False; //FConnStr := HexToStr(GFtpConnectStr); - F_Reserv.ListBox1.Clear; + //F_Reserv.ListBox1.Clear; + f_Reserv.FileTable.Close; + f_Reserv.FileTable.Open; + tmppath := GetDefaultTempPath;//+'\' + 'USER.CFG'; { FileList := F_Reserv.GetFileListFromFtp(GFtpConnectStr); if FileList <> nil then @@ -142,39 +396,100 @@ begin CloseFile(f); UserLimit := strtoint(s); lballowedspace.Caption := s; - vSave := true; - vLoad := true; - vDelete := true; + //vSave := true; + //vLoad := true; + //vDelete := true; //// FileList := F_Reserv.GetFileListFromFtp(HexToStr(GFtpConnectStr)); if FileList <> nil then begin - F_Reserv.ListBox1.Clear; + //FileTable.ReadOnly := False; + // F_Reserv.FileTable.EmptyTable; + While F_Reserv.FileTable.RecordCount > 0 do + begin + F_Reserv.FileTable.Delete; + end; + //F_Reserv.ListBox1.Clear; for i := 0 to fileList.Count - 1 do // Client Config begin - F_Reserv.ListBox1.AddItem(filelist[i], nil); + //F_Reserv.ListBox1.AddItem(filelist[i], nil); + F_Reserv.FileTable.Append; + F_Reserv.FileTable.FieldByName('FileName').AsString := FileList[i]; + F_Reserv.FileTable.FieldByName('FileDate').AsString := FileDateList[i]; + F_Reserv.FileTable.FieldByName('FileSize').AsString := FileSizeList[i]; end; - if F_Reserv.ListBox1.Items.Count = 0 then + //FileTable.ReadOnly := True; + //if F_Reserv.ListBox1.Items.Count = 0 then + F_Reserv.aDelFileFrom.Enabled := True; + F_Reserv.aLoad.Enabled := True; + F_Reserv.aToPM.Enabled := True; + + if F_Reserv.FileTable.RecordCount = 0 then begin - vDelete := False; - vLoad := False; + F_Reserv.aDelFileFrom.Enabled := False; + F_Reserv.aLoad.Enabled := False; + F_Reserv.aToPM.Enabled := False; + end + else + begin + F_Reserv.FileTable.First; + F_Reserv.cxGrid1DBTableView1.Controller.FocusedRowIndex := 0; end; - SelectItem; + //F_Reserv.FileTable.First; + //SelectItem; fileList.Free; - if UserLimit >= strtoint(lbUsedSpace.Caption) then - vSave := True + if UserLimit <= strtoint(lbUsedSpace.Caption) then + begin + F_Reserv.aUpload.Enabled := False; + F_Reserv.aFromPM.Enabled := False; + end else - vSave := False; + begin + F_Reserv.aUpload.Enabled := True; + //F_Reserv.aFromPM.Enabled := True; + if CheckIsOpenProject(false) then + F_Reserv.aFromPM.Enabled := True + else + F_Reserv.aFromPM.Enabled := False; + end; + end + else + begin + F_Reserv.aDelFileFrom.Enabled := False; + F_Reserv.aLoad.Enabled := False; + F_Reserv.aToPM.Enabled := False; + F_Reserv.aUpload.Enabled := False; + F_Reserv.aFromPM.Enabled := False; + Showmessage('cFtpmes12'); end; + end + else + begin + F_Reserv.aDelFileFrom.Enabled := False; + F_Reserv.aLoad.Enabled := False; + F_Reserv.aToPM.Enabled := False; + F_Reserv.aUpload.Enabled := False; + F_Reserv.aFromPM.Enabled := False; + Showmessage('cFtpmes12'); end; - SetButtons(vSave, vLoad, vDelete); + //SetButtons(vSave, vLoad, vDelete); end; - - function TF_Reserv.SendFileToFtp(aFtpStr, aFileName: string): boolean; - var NameShort: String; +{ +procedure TF_Reserv.RzDBGrid1TitleClick(Column: TColumn); +var FldName: string; +begin + FldName := Column.FieldName; + FileTable.IndexName := 'Filename'; +end; +} +function TF_Reserv.SendFileToFtp(aFtpStr, aFileName: string): boolean; + var NameShort, NewName: String; Ftp_serv: TIdFtp; Uri: TIdURI; + bm: TBookmark; + FileNameExists: Boolean; + i: integer; begin Result := False; if FileExists(aFileName) then @@ -187,7 +502,7 @@ end; ftp_serv.Password := uri.password; ftp_serv.Port := 21; ftp_serv.Passive := true; - + ftp_serv.TransferType := ftBinary; try ftp_serv.Connect; except @@ -204,6 +519,59 @@ end; if ftp_serv.Connected then begin NameShort := ExtractFileName(aFileName); + + if F_Reserv.FileTable.RecordCount > 0 then // + begin + FileNameExists := false; + bm := F_Reserv.FileTable.Bookmark; + F_Reserv.FileTable.DisableControls; + F_Reserv.FileTable.First; + + while not F_Reserv.FileTable.Eof do + begin + if NameShort = F_Reserv.FileTable.FieldValues['FileName'] then + begin + FileNameExists := true; + break; + end; + F_Reserv.FileTable.Next; + end; + + F_Reserv.FileTable.Bookmark := bm; + F_Reserv.FileTable.EnableControls; + end; + + if FileNameExists then // - + begin // + if MessageBox(F_Reserv.Handle, PChar(cFtpmes8), PChar(cWarningSlowCap), MB_YESNO) <> IDYes then + begin + NameShort := Trim(InputBox(cFtpmes9, cFtpmes10, '')); + if length(NameShort) > 0 then + begin + NewName := ''; + for i := 1 to Length(NameShort) do + begin + if NameShort[i] = '.' then + break + else + NewName := NewName + NameShort[i]; + end; + if NewName <> '' then + NameShort := NewName + '.scs' + else + begin + ShowMessage(cFtpmes11); + ftp_serv.Disconnect; + ftp_serv.Free; + URi.Free; + exit; + end; + end; + end + else + DeleteFileFromFtp(aFtpStr, aFileName); // , + end; + try ftp_serv.Put(aFileName, NameShort); Result := True; @@ -237,6 +605,7 @@ end; ftp_serv.Password := uri.password; ftp_serv.Port := 21; ftp_serv.Passive := true; + ftp_serv.TransferType := ftBinary; try ftp_serv.Connect; @@ -294,7 +663,7 @@ end; var Ftp_serv: TIdFtp; Uri: TIdURI; - Size: Double; + Size, FileSize: Double; i, rsize: integer; begin Result := TstringList.Create; @@ -331,7 +700,10 @@ end; Size := 0; for i := 0 to ftp_serv.DirectoryListing.Count - 1 do begin - Size := Size + ftp_serv.Size(ftp_serv.DirectoryListing[i].FileName); + FileSize := ftp_serv.Size(ftp_serv.DirectoryListing[i].FileName); + Size := Size + FileSize; + FileDateList.Add(DateTostr(ftp_serv.FileDate(ftp_serv.DirectoryListing[i].FileName))); + FileSizeList.Add(FloatToStr(RoundX(FileSize/1048576, 3))); end; rsize := round(size/1048576); lbUsedSpace.Caption := inttostr(rsize); @@ -402,10 +774,13 @@ end; URi.Free; end; - +(* procedure TF_Reserv.btnDeleteClick(Sender: TObject); var i: integer; begin + i := f_Reserv.RzDBGrid1.SelectedIndex; + i := 0; + { if ListBox1.Count > 0 then begin for i := 0 to ListBox1.Count - 1 do @@ -421,14 +796,17 @@ begin end; end; end; + } end; - +*) +(* procedure TF_Reserv.btnLoadClick(Sender: TObject); var SaveDlg: TSaveDialog; FileName: string; i: integer; begin FileName := ''; + { for i := 0 to ListBox1.Count - 1 do begin if ListBox1.Selected[i] = true then @@ -437,6 +815,7 @@ begin break; end; end; + } if fileName <> '' then begin SaveDlg := TSaveDialog.Create(nil); @@ -450,13 +829,15 @@ begin SaveDlg.Free; end; end; - +*) +(* procedure TF_Reserv.btnSaveClick(Sender: TObject); var OpenDlg: TOpenDialog; FileNameShort, Filename: string; i: integer; begin + { for i := 0 to ListBox1.Count - 1 do begin if ListBox1.Selected[i] = true then @@ -465,6 +846,7 @@ begin break; end; end; + } OpenDlg := TOpenDialog.Create(nil); OpenDlg.Filter := ' (*.scs)|*.SCS'; if OpenDlg.Execute then @@ -476,37 +858,42 @@ begin end; OpenDlg.Free; end; - -procedure TF_Reserv.Button1Click(Sender: TObject); +*) +{procedure TF_Reserv.Button1Click(Sender: TObject); begin F_Reserv.Close; end; - +} procedure TF_Reserv.FormCreate(Sender: TObject); begin + FileDateList := TStringList.Create; + FileSizeList := TStringList.Create; { btnSave.Caption := ' ' + #13#10 + ' '; btnLoad.Caption := ' ' + #13#10 + ' '; btnDelete.Caption := ' ' + #13#10 + ' '; } - btnSave.Caption := cFtpbtnSaveCaption; + {btnSave.Caption := cFtpbtnSaveCaption; btnLoad.Caption := cFtpbtnLoadCaption; - btnDelete.Caption := cFtpbtnDeleteCaption; + btnDelete.Caption := cFtpbtnDeleteCaption;} Selected_Item := 0; FClientLimit := 0; FFact := 0; lballowedspace.Font.Color := clBlue; lbUsedSpace.Font.Color := clBlue; + MyHeaderStyle := TcxStyle.Create(nil); + MyHeaderStyle.Font.Style := [fsBold]; + cxGrid1DBTableView1.Styles.Header := MyHeaderStyle; end; procedure TF_Reserv.FormShow(Sender: TObject); var FileList: TStringList; i: integer; begin + FileDateList.Clear; + FileSizeList.Clear; RefreshFileList; //SelectItem; end; - - end. diff --git a/SRC/Protection/U_ProtectionCommon.pas b/SRC/Protection/U_ProtectionCommon.pas index c7f532a..6216e99 100644 --- a/SRC/Protection/U_ProtectionCommon.pas +++ b/SRC/Protection/U_ProtectionCommon.pas @@ -3,7 +3,7 @@ interface uses Windows, Forms, Graphics, Registry, Classes, SysUtils, Messages,{ bz2,} Dialogs, ComCtrls, ShlObj, ShellAPI, Controls, IcsPlus, Printers, - AbBzip2, AbZBrows, AbUnZper, AbArcTyp, AbMeter, AbBrowse, AbBase; + AbBzip2, AbZBrows, AbUnZper, AbArcTyp, AbMeter, AbBrowse, AbBase, U_BaseConstants; type // TPeriod = (pWeek, pMonth, pQuarter); @@ -732,7 +732,10 @@ begin TempDir := s + OurTempDir; result := TempDir; except - ShowMessage(' !'); + //Tolik 31/01/2025 -- + //ShowMessage(' !'); + ShowMessage(cTmpDirErr); + // {$if Defined(ES_GRAPH_SC)} Application.Terminate; {$else} diff --git a/SRC/SCSNormBase/U_AddComponent.dfm b/SRC/SCSNormBase/U_AddComponent.dfm index 9160263..6fbdb1b 100644 --- a/SRC/SCSNormBase/U_AddComponent.dfm +++ b/SRC/SCSNormBase/U_AddComponent.dfm @@ -2478,8 +2478,6 @@ object F_AddComponent: TF_AddComponent object tsApplyInPM: TRzTabSheet TabVisible = False Caption = 'tsApplyInPM' - ExplicitWidth = 0 - ExplicitHeight = 0 object GroupBox_ApplyForAllComponents: TRzGroupBox Left = 0 Top = 0 diff --git a/SRC/SCSNormBase/U_BaseCommon.pas b/SRC/SCSNormBase/U_BaseCommon.pas index f77b5ef..40875fd 100644 --- a/SRC/SCSNormBase/U_BaseCommon.pas +++ b/SRC/SCSNormBase/U_BaseCommon.pas @@ -488,6 +488,8 @@ const //*** Component Types ctsnUZO = 'UZO_EL'; // ctsnElCounter = 'EL_COUNTER'; // ctsnSwitchInput = 'EL_INPUTSHITCH'; // + + ctsnWireTray = 'WIRETRAY'; // Tolik 10/04/2025 -- // //*** ReportTypes diff --git a/SRC/SCSNormBase/U_BaseConstants.pas b/SRC/SCSNormBase/U_BaseConstants.pas index 561e6f5..b2d65e7 100644 --- a/SRC/SCSNormBase/U_BaseConstants.pas +++ b/SRC/SCSNormBase/U_BaseConstants.pas @@ -1764,6 +1764,7 @@ const cMakeEditComponentType_Msg7 = ''; cMakeEditComponentType_Msg8 = ' , .'; cMakeEditComponentType_Msg9 = ' '; + cMakeEditComponentType_Msg10 = ' '; //------------------------------ cMakeEditCrossConnection_Msg1_1 = ' '; @@ -3235,6 +3236,16 @@ const cFtpmes4 = ' !'; cFtpmes5 = ' !'; cFtpmes6 = ' !'; + cFtpmes7 = ' ?'; + cFtpmes8 = ' ' + #13#10 + ' . ?'; + cFtpmes9 = ' '; + cFtpmes10 = ' :'; + cFtpmes11 = ' !'; + cFtpmes12 = ' !' + #13#10 +' ' + #13#10 + + ' .'; + cTmpDirErr = ' !'; //Tolik 31/01/2025 -- + + {$IFEND} diff --git a/SRC/SCSNormBase/U_BaseConstantsPE.pas b/SRC/SCSNormBase/U_BaseConstantsPE.pas index d7f839e..1e8a018 100644 --- a/SRC/SCSNormBase/U_BaseConstantsPE.pas +++ b/SRC/SCSNormBase/U_BaseConstantsPE.pas @@ -3267,3 +3267,12 @@ cFtpmes4 = 'Failed to delete file on the server!'; cFtpmes5 = 'Failed to get list of files from the server!'; cFtpmes6 = 'Unable to determine user limit!'; + cFtpmes7 = 'Do You want to close current project?'; + cFtpmes8 = 'A file with this name already exists ' + #13#10 + ' on the server. Overwrite?'; + cFtpmes9 = 'Backup'; + cFtpmes10 = 'Enter new file name:'; + cFtpmes11 = 'There is wrong file name!'; + cFtpmes12 = 'Failed to get user settings!' + #13#10 +'Try to refresh files list or contact' + #13#10 + + 'the technical support service.'; + + cTmpDirErr = 'Error defining temporary directory!'; //Tolik 31/01/2025 -- diff --git a/SRC/SCSNormBase/U_BaseConstantsUKR.pas b/SRC/SCSNormBase/U_BaseConstantsUKR.pas index 739a494..9aeaf7d 100644 --- a/SRC/SCSNormBase/U_BaseConstantsUKR.pas +++ b/SRC/SCSNormBase/U_BaseConstantsUKR.pas @@ -3223,3 +3223,12 @@ cFtpmes4 = ' !'; cFtpmes5 = ' !'; cFtpmes6 = ' !'; + cFtpmes7 = ' ?'; + cFtpmes8 = ' ' + #13#10 + ' . ?'; + cFtpmes9 = ' '; + cFtpmes10 = ' ' + ''''+ ' :'; + cFtpmes11 = ' ' + ''''+ ' !'; + cFtpmes12 = ' !' + #13#10 +' ' + #13#10 + + ' .'; + + cTmpDirErr = ' !'; // Tolik 31/01/2025 -- diff --git a/SRC/SCSNormBase/U_MAIN.dfm b/SRC/SCSNormBase/U_MAIN.dfm index f6ba1c1..62f1f5f 100644 --- a/SRC/SCSNormBase/U_MAIN.dfm +++ b/SRC/SCSNormBase/U_MAIN.dfm @@ -52,7 +52,6 @@ object F_MAIN: TF_MAIN ParentFont = False TabOrder = 0 Visible = False - ExplicitTop = 650 object Label_Kolvo: TLabel Left = 16 Top = 8 @@ -111,7 +110,6 @@ object F_MAIN: TF_MAIN OnDblClick = Panel_Main1Click OnResize = Panel_MainResize OnUnDock = Panel_MainUnDock - ExplicitHeight = 650 object Panel_Addition: TRzSizePanel Left = 0 Top = 434 @@ -125,7 +123,6 @@ object F_MAIN: TF_MAIN SizeBarWidth = 7 TabOrder = 0 VisualStyle = vsClassic - ExplicitTop = 449 object ToolBar_CompData: TToolBar Left = 0 Top = 47 @@ -1324,18 +1321,16 @@ object F_MAIN: TF_MAIN TabStyle = tsSquareCorners OnChange = pcObjectsChange OnMouseMove = pcObjectsMouseMove - ExplicitHeight = 449 FixedDimension = 22 object tsTemplates: TRzTabSheet Hint = #1054#1073#1098#1077#1082#1090#1099 ImageIndex = 1 Caption = #1054#1073#1098#1077#1082#1090#1099 - ExplicitHeight = 449 object lvTemplates: TRzListView Left = 160 Top = 30 Width = 172 - Height = 419 + Height = 404 Align = alClient Columns = <> ColumnClick = False @@ -1363,6 +1358,7 @@ object F_MAIN: TF_MAIN OnResize = lvTemplatesResize OnStartDrag = lvTemplatesStartDrag OnSelectItem = lvTemplatesSelectItem + ExplicitHeight = 419 end object cbTemplates: TControlBar Left = 0 @@ -1437,7 +1433,7 @@ object F_MAIN: TF_MAIN object gbTemplateGroups: TRzGroupBar Left = 0 Top = 30 - Height = 419 + Height = 404 ExclusiveMode = True GradientColorStart = clBtnFace GradientColorStop = clBtnShadow @@ -1458,7 +1454,6 @@ object F_MAIN: TF_MAIN ImageIndex = 2 Caption = #1050#1086#1084#1087#1086#1085#1077#1085#1090#1099 OnResize = tsComponentsResize - ExplicitHeight = 449 object Panel_Tree: TPanel Left = 0 Top = 0 @@ -1481,7 +1476,6 @@ object F_MAIN: TF_MAIN OnEndDock = Panel_TreeEndDock OnMouseMove = Panel_TreeMouseMove OnStartDock = Panel_TreeStartDock - ExplicitHeight = 449 object splFindInTree: TSplitter Left = 0 Top = 201 @@ -1625,7 +1619,6 @@ object F_MAIN: TF_MAIN OnMouseMove = Tree_CatalogMouseMove OnMouseUp = Tree_CatalogMouseUp OnStartDrag = Tree_CatalogStartDrag - ExplicitHeight = 226 end object Panel_New: TPanel Left = -169 @@ -1717,6 +1710,10 @@ object F_MAIN: TF_MAIN FixedDimension = 13 object tsFind: TRzTabSheet Caption = #1055#1086#1080#1089#1082 + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object Panel2: TPanel Left = 0 Top = 0 @@ -2177,7 +2174,6 @@ object F_MAIN: TF_MAIN BorderInner = fsFlat BorderOuter = fsNone TabOrder = 4 - ExplicitTop = 430 object lbFilterIsOn: TRzLabel Left = 8 Top = 2 @@ -2220,7 +2216,6 @@ object F_MAIN: TF_MAIN Caption = #1043#1088#1091#1087#1087#1099 ParentShowHint = False ShowHint = False - ExplicitHeight = 449 object Splitter1: TSplitter Left = 0 Top = 105 @@ -8303,7 +8298,7 @@ object F_MAIN: TF_MAIN Left = 200 Top = 152 Bitmap = { - 494C010104005001200310001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 494C010104005001240310001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000002000000001002000000000000020 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 diff --git a/SRC/SCSNormBase/U_MAIN.pas b/SRC/SCSNormBase/U_MAIN.pas index 11bdfb7..cca3688 100644 --- a/SRC/SCSNormBase/U_MAIN.pas +++ b/SRC/SCSNormBase/U_MAIN.pas @@ -11190,7 +11190,7 @@ begin Act_ReplaceCableCanals.Visible := true; Act_SetCableCanalConnectors.Visible := true; Act_SetCableCanalConnectorsToSelected.Visible := true; - //Act_SetTubesElements.Visible := True; + Act_SetTubesElements.Visible := True; end; end; @@ -26132,7 +26132,7 @@ var i: integer; for j := 0 to TubeCompon.CableCanalConnectors.Count - 1 do begin PtrTubeConnector := PCableCanalConnector(TubeCompon.CableCanalConnectors[j]); - //TubeConn := TSCSComponent(TubeCompon.CableCanalConnectors[j]); + TubeConn := TSCSComponent(TubeCompon.CableCanalConnectors[j]); //TubeConn := //PtrTubeConnector.GuidNBConnector @@ -34056,7 +34056,10 @@ end; i: Integer; begin if Assigned(ACableCanalCompon) and - (ACableCanalCompon.ComponentType.SysName = ctsnCableChannel) and (ASide > 0) then + //Tolik 07/03/2025 -- + //(ACableCanalCompon.ComponentType.SysName = ctsnCableChannel) and (ASide > 0) then + ((ACableCanalCompon.ComponentType.SysName = ctsnCableChannel) or + (ACableCanalCompon.ComponentType.SysName = ctsnTube)) and (ASide > 0) then begin CanalObject := ACableCanalCompon.GetFirstParentCatalog; if Assigned(CanalObject) then @@ -34127,7 +34130,10 @@ end; CableCanalObject := GSCSBase.CurrProject.GetCatalogFromReferencesBySCSID(ConnectorLinesID[i]); if Assigned(CableCanalObject) then if assigned(CableCanalObject.ComponentReferences) then - if CableCanalObject.ComponentReferences.GetComponentByType(ctsnCableChannel) <> nil then + //Tolik 07/03/2025 + // if CableCanalObject.ComponentReferences.GetComponentByType(ctsnCableChannel) <> nil then + if CableCanalObject.ComponentReferences.GetComponentByType(ACableCanalCompon.Componenttype.SysName) <> nil then + // ConnectedLines.Add(CableCanalObject); end; GetMem(ptrConnectorWithLines, SizeOf(TConnectorWithLines)); @@ -35624,7 +35630,18 @@ end; //SavedNBComponent: TSCSComponent; // SavedGConnecntOnlyOneLineCompon: boolean; + ComponSName, ElementSName: string; begin + if aInstallTubesElements then + begin + ComponSName := ctsnTube; + ElementSName := ctsnTubeElement; + end + else + begin + ComponSName := ctsnCableChannel; + ElementSName := ctsnCableChannelElement; + end; try SavedGConnecntOnlyOneLineCompon := GConnecntOnlyOneLineCompon; GConnecntOnlyOneLineCompon := True; @@ -35656,7 +35673,10 @@ end; begin ConnectorComponent := AConnectorWithLines.ConnectorObject.SCSComponents[i]; if ConnectorComponent.ComeFrom = cftAuto then - if ConnectorComponent.ComponentType.SysName = ctsnCableChannelElement then + //Tolik 07/03/2025 -- + //if ConnectorComponent.ComponentType.SysName = ctsnCableChannelElement then + if ConnectorComponent.ComponentType.SysName = ElementSName then + // begin CCESideCount := GetCCESideCount(ConnectorComponent); JoinedCountToConnector := GetJoinedCountToComponWithChilds(ConnectorComponent); @@ -35665,7 +35685,10 @@ end; (AConnectorWithLines.ConnectedLines.Count <> CCESideCount) then begin // - JoinedComponent := GetJoinedComponWithType(ConnectorComponent, ctsnCableChannelElement); + //Tolik 07/03/2025 -- + //JoinedComponent := GetJoinedComponWithType(ConnectorComponent, ctsnCableChannelElement); + JoinedComponent := GetJoinedComponWithType(ConnectorComponent, ElementSName); + // if (JoinedComponent = nil) or (CCESideCount > GetCCESideCount(JoinedComponent)) then CCEToDel.Add(ConnectorComponent); //DelCompon(ConnectorComponent, nil, true, true, true, false); end; @@ -35681,7 +35704,10 @@ end; while i <= ConnectorComponent.JoinedComponents.Count - 1 do begin JoinedComponent := ConnectorComponent.JoinedComponents[i]; - if JoinedComponent.ComponentType.SysName = ctsnCableChannelElement then + //Tolik 07/03/2025 -- + //if JoinedComponent.ComponentType.SysName = ctsnCableChannelElement then + if JoinedComponent.ComponentType.SysName = ElementSName then + // begin CCEToDel.Remove(JoinedComponent); DelCompon(JoinedComponent, nil, true, true, true, false) @@ -35717,7 +35743,10 @@ end; if assigned(LineObject.ComponentReferences) then for j := 0 to LineObject.ComponentReferences.Count - 1 do if Assigned(LineObject.ComponentReferences[j]) then - if LineObject.ComponentReferences[j].ComponentType.SysName = ctsnCableChannel then + //Tolik 07/03/2025 -- ComponSName + //if LineObject.ComponentReferences[j].ComponentType.SysName = ctsnCableChannel then + if LineObject.ComponentReferences[j].ComponentType.SysName = ComponSName then + // if LineObject.ComponentReferences[j].GetInterfcesCountByTypeIsBusySide(itFunctional, biTrue, CurrLineSide) = 0 then begin CanalComponent := LineObject.ComponentReferences[j]; diff --git a/SRC/SCSNormBase/U_MakeEditComponentType.pas b/SRC/SCSNormBase/U_MakeEditComponentType.pas index 0b83e76..9625b2b 100644 --- a/SRC/SCSNormBase/U_MakeEditComponentType.pas +++ b/SRC/SCSNormBase/U_MakeEditComponentType.pas @@ -715,7 +715,8 @@ begin AddSysNameTYoTable(ctsnConnectingModule, cMakeEditComponentType_Msg5_37); AddSysNameTYoTable(ctsnTestingAccessory, cMakeEditComponentType_Msg5_38); AddSysNameTYoTable(ctsnTube, cMakeEditComponentType_Msg5_39); - AddSysNameTYoTable(ctsnTubeElement,cMakeEditComponentType_Msg5_39_1);// Tolik 13/10/2018 -- + AddSysNameTYoTable(ctsnTubeElement,cMakeEditComponentType_Msg5_39_1);// Tolik 13/10/2018 -- + AddSysNameTYoTable(ctsnWireTray,cMakeEditComponentType_Msg10); // Tolik 10/04/2025 -- AddSysNameTYoTable(ctsnInstallBox, cMakeEditComponentType_Msg5_40); AddSysNameTYoTable(ctsnCupboard, cMakeEditComponentType_Msg5_41); AddSysNameTYoTable(ctsnJackPlug, cMakeEditComponentType_Msg5_42); diff --git a/SRC/SCSNormBase/U_MakeEditCrossConnection.dfm b/SRC/SCSNormBase/U_MakeEditCrossConnection.dfm index ded3feb..c05b6aa 100644 --- a/SRC/SCSNormBase/U_MakeEditCrossConnection.dfm +++ b/SRC/SCSNormBase/U_MakeEditCrossConnection.dfm @@ -1708,7 +1708,7 @@ object F_MakeEditCrossConnection: TF_MakeEditCrossConnection Left = 8 Top = 136 Bitmap = { - 494C01010B002800700010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 494C01010B002800B80010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000003000000001002000000000000030 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000EF6B @@ -2140,7 +2140,7 @@ object F_MakeEditCrossConnection: TF_MakeEditCrossConnection Left = 40 Top = 136 Bitmap = { - 494C010105002800640010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 494C010105002800AC0010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000002000000001002000000000000020 0000000000000000000000000000000000000000000000000000000000004D4F 4F004D4F4F0000000000000000000000000000000000000000004D4F4F004D4F @@ -2415,7 +2415,7 @@ object F_MakeEditCrossConnection: TF_MakeEditCrossConnection Left = 72 Top = 136 Bitmap = { - 494C010105002800640010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 494C010105002800AC0010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000002000000001002000000000000020 0000000000000000000000000000000000000000000000000000000000004D4F 4F004D4F4F0000000000000000000000000000000000000000004D4F4F004D4F @@ -2728,7 +2728,7 @@ object F_MakeEditCrossConnection: TF_MakeEditCrossConnection Left = 88 Top = 200 Bitmap = { - 494C010105002800640010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 494C010105002800AC0010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000002000000001002000000000000020 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 @@ -3521,7 +3521,7 @@ object F_MakeEditCrossConnection: TF_MakeEditCrossConnection Left = 576 Top = 344 Bitmap = { - 494C010105002800580010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 494C010105002800A00010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000002000000001002000000000000020 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000949494005A5A5A00B5B5B500CECECE000000 @@ -3796,7 +3796,7 @@ object F_MakeEditCrossConnection: TF_MakeEditCrossConnection Left = 544 Top = 344 Bitmap = { - 494C010105002800580010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 494C010105002800A00010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000002000000001002000000000000020 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000018F70000008400106BA5001094D6000000 @@ -4071,7 +4071,7 @@ object F_MakeEditCrossConnection: TF_MakeEditCrossConnection Left = 512 Top = 344 Bitmap = { - 494C01010B002800580010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 494C01010B002800A00010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000003000000001002000000000000030 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000A5BDAD0094B5A50094ADA50094ADA500000000000000 diff --git a/SRC/SCSNormBase/U_MakeNorm.dfm b/SRC/SCSNormBase/U_MakeNorm.dfm index 1a77bf8..0871621 100644 --- a/SRC/SCSNormBase/U_MakeNorm.dfm +++ b/SRC/SCSNormBase/U_MakeNorm.dfm @@ -159,6 +159,7 @@ object F_MakeNorm: TF_MakeNorm Top = 16 Width = 81 Height = 21 + AutoComplete = False Ctl3D = False FrameHotTrack = True FrameVisible = True diff --git a/SRC/SCSNormBase/U_MakeNorm.pas b/SRC/SCSNormBase/U_MakeNorm.pas index b2be4cd..1f8fc98 100644 --- a/SRC/SCSNormBase/U_MakeNorm.pas +++ b/SRC/SCSNormBase/U_MakeNorm.pas @@ -694,8 +694,10 @@ end; procedure TF_MakeNorm.CorrectCypher(var AMainCyper, ARestCypher: String); var - WholeCypher: String; - + //Tolik 20/02/2025 + //WholeCypher: String; + WholeCypher: AnsiString; + // KolvoZnak: array [0..5] of integer; TempShifr: string; @@ -1050,6 +1052,110 @@ begin FNormCypherTitles.Add(''); FNormCypherTitles.Add(''); FNormCypherTitles.Add(''); + //Tolik 19/02/2025 -- + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + // + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + FNormCypherTitles.Add(''); + + // + FResMatCypherTitles := TStringList.Create; FResMatCypherTitles.Add('1'); diff --git a/SRC/SCSNormBase/U_PECommon.pas b/SRC/SCSNormBase/U_PECommon.pas index 978ce57..81d484c 100644 --- a/SRC/SCSNormBase/U_PECommon.pas +++ b/SRC/SCSNormBase/U_PECommon.pas @@ -1,6 +1,5 @@ unit U_PECommon; - interface uses @@ -218,8 +217,10 @@ begin ListOfAllTraces := GetAllTraceInCADByMarked_New1(CurrentServer, CurrentWS) else ListOfAllTraces := GetAllTraceInCADByMarked(CurrentServer, CurrentWS); - - if ListOfAllTraces.Count > 0 then + //Tolik 21/01/2025 -- (, nil) + //if ListOfAllTraces.Count > 0 then + if ((ListOfAllTraces <> nil) and (ListOfAllTraces.Count > 0)) then + // begin //if GCadForm.FTracingListIndex > ListOfAllTraces.Count - 1 then GCadForm.FTracingListIndex := 0; @@ -289,8 +290,10 @@ begin end; //ListOfAllTraces := GetAllTraceInCADByMarked(ConnTo, ConnFrom{ConnFrom, ConnTo}); ListOfAllTraces := GetAllTraceInCADByMarked(ConnFrom, ConnTo); - - if ListOfAllTraces.Count > 0 then + // Tolik 21/01/2025 -- + //if ListOfAllTraces.Count > 0 then + if ((ListOfAllTraces <> nil) and (ListOfAllTraces.Count > 0)) then + // begin //if GCadForm.FTracingListIndex > ListOfAllTraces.Count - 1 then // GCadForm.FTracingListIndex := 0; @@ -675,6 +678,9 @@ begin ListFolder := nil; ListObject := nil; isLastShield := False; + ListAllComponent := nil; // Tolik 21/01/2025 -- + + LastPoint := nil; // Tolik -- 16/09/2021 -- @@ -1591,6 +1597,8 @@ begin if EndPointComponList <> nil then FreeAndNil(EndPointComponList); // + if ListAllComponent <> nil then + FreeAndNil(ListAllComponent); //Tolik 21/01/2025 -- end; //GCanRefreshCad := True; GCadForm.PCad.Refresh; @@ -1599,7 +1607,7 @@ end; procedure PE_AutoTrace(ATypeAutoTrace: integer; AEndList, AWorkList: TList); var ListShield: tList; - vLists: TList; + //vLists: TList; begin if F_NormBase.GSCSBase.SCSComponent.ComponentType.SysName = ctsnCable then begin @@ -1619,6 +1627,7 @@ begin tatIndivid: LIstShield := AutoTraseToShield(AWorkList, AEndList, True); end; + FreeAndNil(ListShield); //Tolik 20/1/2025 -- end; // EndAutoTrace; end; @@ -2775,9 +2784,17 @@ end; inc(k); SetLength(TraceList, k); TraceList[k - 1] := TracesLength; - FreeAndNil(CurrPathList); - FreeAndNil(currPath); + //Tolik 21/01/2025 -+ + //FreeAndNil(CurrPathList); + //FreeAndNil(currPath); + // end; + //Tolik 21/01/2025 + for j := 0 to CurrPathList.Count - 1 do + TList(CurrPathList[j]).Free; + FreeAndNil(CurrPathList); + currPath := nil; + // end end; end; @@ -2906,15 +2923,15 @@ end; end; end; Begin - ComponList := TList.Create; - ComponList1 := TList.Create; - + //ComponList := TList.Create; // Tolik 21/01/2025 -- 2 + //ComponList1 := TList.Create; + currPath:= nil; //Tolik 21/01/2025 -- IdCable := F_NormBase.GSCSBase.SCSComponent.ID; if AFigList.Count > 0 then begin SortFigList(AFigList, LengthsList); end; - PassList := TList.Create; + //PassList := TList.Create; // Tolik 21/01/2025 -- SetLength(LenList, 0); //connect First Figure To Server Figure := TFigure(AFigList[0]); @@ -2962,7 +2979,10 @@ end; for i := 0 to AFigList.Count - 1 do begin currPathList := GetAllTraceInCADByMarked(Figure, TFigure(aFigList[i])); - if currPathList.Count > 0 then + //Tolik 21/01/2025 -- + //if currPathList.Count > 0 then + if ((currPathList <> nil) and (currPathList.Count > 0)) then + // begin SortPathListByLength(CurrPathList); currPathsToFigure.Add(currPathList[0]); @@ -3009,6 +3029,7 @@ end; currPath:= nil; currPathsToFigure.Clear; end; + FreeAndNil(currPathsToFigure); // Tolik 21/01/2025 -- if not F_PEAutoTraceDialog.CheckPassedTraces.Checked then // Tolik 20/02/2021 -- { @@ -3033,15 +3054,24 @@ end; currPath := GetPathByMode(CurrPathList); //currPathList[0]; // + //Tolik 21/05/2025 -- + { if F_PEAutoTraceDialog.TypeConnection.ItemIndex = 1 then - CanConnect := ConnectFigures(TConnectorObject(Figure), CurrentServer, currPath, IDCable); - + CanConnect := ConnectFigures(TConnectorObject(Figure), CurrentServer, currPath, IDCable); + } + if F_NormBase.GSCSBase.SCSComponent.IDNetType <> 3 then // ( ) + begin + if F_PEAutoTraceDialog.TypeConnection.ItemIndex = 1 then + CanConnect := ConnectFigures(TConnectorObject(Figure), CurrentServer, currPath, IDCable); + end; + // if F_PEAutoTraceDialog.CheckPassedTraces.Checked then CheckPassedPath(currPath); if currPathList <> nil then FreeAndNil(currPathList); if currPath <> nil then FreeAndNil(currPath); + SetLength(LenList, 0); // Tolik 21/01/2025 -- End; { procedure GetServerCompons(aNode : TFlyNode); @@ -3356,6 +3386,7 @@ begin // { if WSSideCompons.IndexOf(CurrentServer.ID) = -1 then begin} + CurrFiguresList := TraceFiguresToServer(CurrentServer); if ((CurrFiguresList <> nil) and (CurrFiguresList.Count > 0)) then @@ -3397,7 +3428,12 @@ begin FreeAndNil(AllPassedTraces); if ConnectedComponList <> nil then FreeAndNil(ConnectedComponList); - // GDragOnCAD := false; + // GDragOnCAD := false; + //Tolik 20/01/2025 -- + FreeAndNil(CurrFiguresList); + FreeAndNil(currPathList); + FreeAndNil(CurrPath); + // end; end; // @@ -3844,7 +3880,7 @@ begin try Result := False; AllTrace := Nil; - CurrTraceList := Nil; + //CurrTraceList := Nil; //20/01/2025 CurrTraceList := TList.Create; //if ACurrPoint.ConnectorType = ct_Clear then // begin @@ -7848,6 +7884,9 @@ var begin try + if WayList <> nil then + FreeAndNil(WayList);//Tolik 20/01/2025 -- + DistanceList := TList.Create; For i := 0 to AStartIndex - 1 do DistanceList.Add(Nil); @@ -7860,11 +7899,19 @@ var OperFigure := TConnectorObject(AWorkFigures[i]); for Count := 0 to OperFigure.JoinedConnectorsList.Count - 1 do begin + //Tolik 20/01/2025 -- + { WayList := Nil; + } WayList := GetAllTracePEInCADforLamp(AEndObjects, Operfigure, true); - operdist := TotalLength(WayList); - if ((operdist <> -1) and(operdist < distance)) or (distance = -1) then - distance := operdist; + if WayList <> nil then + begin + // + operdist := TotalLength(WayList); + if ((operdist <> -1) and(operdist < distance)) or (distance = -1) then + distance := operdist; + FreeAndNil(WayList); // Tolik 20/01/2025 -- + end; end; if i = 0 + AStartIndex then begin diff --git a/TOOLS/license.key b/TOOLS/license.key new file mode 100644 index 0000000000000000000000000000000000000000..3d3cecd9508cd139cbf8916b11915fd4e0a4c721 GIT binary patch literal 162 zcmV;T0A2qW00012ie^sQ{l{o>Ey)6{%0d(R6@3;W)tTzZe|IpCT< zg6*mDRWNI$ZoO3&d1vqLnIpYYWY{cfSL$S!m5#R)6r&uVv&Tg&Ij{=ww50nN>KWxq zFUEtftI^9?pC3|1_lZh@4e$#t=mNg5gk&65;2)~Ou?;KZfN$snl_p>yi(wd-ai8;{ Q(41d*OB`