Compare commits

..

2 Commits

Author SHA1 Message Date
Demetrio Cassarino 7558449b06 Merge remote-tracking branch 'origin/master' into feature/Note_Utensile 2024-07-30 10:21:32 +02:00
Demetrio Cassarino c727e98f8f Merge remote-tracking branch 'origin/master' into feature/Note_Utensile 2024-07-23 10:06:55 +02:00
71 changed files with 975 additions and 3115 deletions
-2
View File
@@ -69,7 +69,6 @@ Module ConstIni
Public Const K_SHOWGFRAME As String = "ShowGFrame" Public Const K_SHOWGFRAME As String = "ShowGFrame"
Public Const K_LINEWIDTH As String = "LineWidth" Public Const K_LINEWIDTH As String = "LineWidth"
Public Const K_MARK As String = "Mark" Public Const K_MARK As String = "Mark"
Public Const K_MARK2 As String = "Mark2"
Public Const K_SELSURF As String = "SelSurf" Public Const K_SELSURF As String = "SelSurf"
Public Const K_SHOWMODE As String = "ShowMode" Public Const K_SHOWMODE As String = "ShowMode"
Public Const K_CURVEDIR As String = "CurveDir" Public Const K_CURVEDIR As String = "CurveDir"
@@ -184,7 +183,6 @@ Module ConstIni
Public Const K_SELGEOMSURFFINISHING As String = "SelGeomSurfFinishing" Public Const K_SELGEOMSURFFINISHING As String = "SelGeomSurfFinishing"
Public Const K_SELGEOMSURFROUGHING As String = "SelGeomSurfRoughing" Public Const K_SELGEOMSURFROUGHING As String = "SelGeomSurfRoughing"
Public Const K_SELGEOMFIVEAXMILLING As String = "SelGeomFiveAxMilling" Public Const K_SELGEOMFIVEAXMILLING As String = "SelGeomFiveAxMilling"
Public Const K_SELVMILLQUALITY As String = "VMillQuality"
Public Const K_MACHININGGROUP As String = "MachiningGroup" Public Const K_MACHININGGROUP As String = "MachiningGroup"
Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable" Public Const K_SHOWONLYTABLE As String = "ShowOnlyTable"
Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps" Public Const K_MOVETHROUGHDISPS As String = "MoveThroughDisps"
+41 -207
View File
@@ -14,47 +14,20 @@
<TextBlock Text="{Binding Draw2DMsg}"/> <TextBlock Text="{Binding Draw2DMsg}"/>
</Expander.Header> </Expander.Header>
<UniformGrid Columns="3"> <UniformGrid Columns="3">
<Button x:Name="PuntoBtn" ToolTip="Punto" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding PointToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding PointBaseCommand}" IsEnabled="{Binding bLayerOk}"> ToolTipService.ShowOnDisabled="True"
<Image Source="/Resources/DrawPanel/Point+.png" Stretch="Uniform"/> Command="{Binding PointCommand}" IsEnabled="{Binding bLayerOk}">
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Vettore" Style="{StaticResource DrawPanelButton}"
Command="{Binding PointVectorCommand}">
<Image Source="/Resources/DrawPanel/Point.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Point.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Riferimento" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding Line2PToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding PointReferenceCommand}">
<Image Source="/Resources/DrawPanel/Point.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="Linea 2 Punti" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding Line2PBaseCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding Line2PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Line2P+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Linea 2 Punti con Continuazione" Style="{StaticResource DrawPanelButton}"
Command="{Binding Line2PContinuationCommand}">
<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>
</Button> </Button>
</ContextMenu> <Button ToolTip="{Binding LinePDLToolTip}" Style="{StaticResource DrawPanelButton}"
</Button.ContextMenu>
</Button>
<Button ToolTip="Linea Punto Direzione Lunghezza" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding LinePDLBaseCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding LinePDLCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/LinePDL+.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/LinePDL.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Linea Punto Vettore Direzione Lunghezza" Style="{StaticResource DrawPanelButton}"
Command="{Binding LinePDLVectorCommand}">
<Image Source="/Resources/DrawPanel/Line2P.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
</Button> </Button>
<Button ToolTip="{Binding ArcCSEToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ArcCSEToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
@@ -66,19 +39,11 @@
Command="{Binding Arc3PCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding Arc3PCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Arc3P.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Arc3P.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Arco " Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ArcPDPToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ArcPDPCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding ArcPDPCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/ArcPDP+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Linea Punto Vettore Direzione Lunghezza" Style="{StaticResource DrawPanelButton}"
Command="{Binding LinePDLVectorCommand}">
<Image Source="/Resources/DrawPanel/ArcPDP.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ArcPDP.png" Stretch="Uniform"/>
</Button> </Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="{Binding CirclePDToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding CirclePDToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding CircleCPCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding CircleCPCommand}" IsEnabled="{Binding bLayerOk}">
@@ -109,57 +74,25 @@
Command="{Binding PolygonSideCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding PolygonSideCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/PolygonSide.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/PolygonSide.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Quota Lineare" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding LinearDimensionToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding LinearDimensionBaseCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding LinearDimensionCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/LinearDimension+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Quota Allineata" Style="{StaticResource DrawPanelButton}"
Command="{Binding AlignedDimensionCommand}">
<Image Source="/Resources/DrawPanel/LinearDimension.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/LinearDimension.png" Stretch="Uniform"/>
</Button> </Button>
</ContextMenu> <Button ToolTip="{Binding AngularDimensionToolTip}" Style="{StaticResource DrawPanelButton}"
</Button.ContextMenu>
</Button>
<Button ToolTip="Quota Angolare" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding AngularDimensionBaseCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding AngularDimensionCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/AngularDimension +.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Quota Angolare Avanzata" Style="{StaticResource DrawPanelButton}"
Command="{Binding AlignedDimensionPlusCommand}">
<Image Source="/Resources/DrawPanel/AngularDimension.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/AngularDimension.png" Stretch="Uniform"/>
</Button> </Button>
</ContextMenu> <Button ToolTip="{Binding DiamRadDimensionToolTip}" Style="{StaticResource DrawPanelButton}"
</Button.ContextMenu>
</Button>
<Button ToolTip="Quota Diametrale" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding DiamDimensionCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding DiamRadDimensionCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/DiametralDimension+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Quota Radiale" Style="{StaticResource DrawPanelButton}"
Command="{Binding RadDimensionCommand}">
<Image Source="/Resources/DrawPanel/DiametralDimension.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/DiametralDimension.png" Stretch="Uniform"/>
</Button> </Button>
</ContextMenu> <Button ToolTip="{Binding TextToolTip}" Style="{StaticResource DrawPanelButton}"
</Button.ContextMenu>
</Button>
<Button ToolTip="Testo" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding TextBaseCommand}" IsEnabled="{Binding bLayerOk}"> Command="{Binding TextCommand}" IsEnabled="{Binding bLayerOk}">
<Image Source="/Resources/DrawPanel/Text+.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Text.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Testo Avanzato" Style="{StaticResource DrawPanelButton}"
Command="{Binding TextPlusCommand}">
<Image Source="/Resources/DrawPanel/TextA.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
</Button> </Button>
</UniformGrid> </UniformGrid>
</Expander> </Expander>
@@ -169,19 +102,11 @@
<TextBlock Text="{Binding Draw3DMsg}"/> <TextBlock Text="{Binding Draw3DMsg}"/>
</Expander.Header> </Expander.Header>
<UniformGrid Columns="3"> <UniformGrid Columns="3">
<Button ToolTip="Piano Contornato" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding PlaneToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding FloorCommand}" IsEnabled="{Binding bLayerOkAndSelOk}"> Command="{Binding PlaneCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/Plane+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Regione Piana" Style="{StaticResource DrawPanelButton}"
Command="{Binding RegionCommand}">
<Image Source="/Resources/DrawPanel/Plane.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Plane.png" Stretch="Uniform"/>
</Button> </Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="{Binding ExtrudeToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ExtrudeToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtrudeCommand}" IsEnabled="{Binding bLayerOkAndSelOk}"> Command="{Binding ExtrudeCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
@@ -212,32 +137,16 @@
Command="{Binding SolidAddSurfCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding SolidAddSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SolidAddSurf.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/SolidAddSurf.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Sottrai Superfici e Regioni Piane" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding SolidSubtractSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding SubtractSurfacesCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding SolidSubtractSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SolidSubtractSurf+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Taglia Superficie con Superficie Inversa" Style="{StaticResource DrawPanelButton}"
Command="{Binding CutSurfacesCommand}">
<Image Source="/Resources/DrawPanel/SolidSubtractSurf.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/SolidSubtractSurf.png" Stretch="Uniform"/>
</Button> </Button>
</ContextMenu> <Button ToolTip="{Binding SolidIntersectSurfToolTip}" Style="{StaticResource DrawPanelButton}"
</Button.ContextMenu>
</Button>
<Button ToolTip="Interseca Superfici e Regioni Piane" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding IntersectSurfCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding SolidIntersectSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/SolidIntersectSurf+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Taglia Superficie con Superficie" Style="{StaticResource DrawPanelButton}"
Command="{Binding CutSurfCommand}">
<Image Source="/Resources/DrawPanel/SolidIntersectSurf.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/SolidIntersectSurf.png" Stretch="Uniform"/>
</Button> </Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="{Binding IntersectSurfSurfToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding IntersectSurfSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding IntersectSurfSurfCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding IntersectSurfSurfCommand}" IsEnabled="{Binding bSelOk}">
@@ -253,19 +162,11 @@
Command="{Binding ExtractFacetLoopsCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ExtractFacetLoopsCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExtractFacetLoops.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ExtractFacetLoops.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Esplodi Superfici e Regioni Piane" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ExplodeSurfToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ExplodeSurfaceCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ExplodeSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExplodeSurf+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Esplodi Superfici Mesh in Triangoli" Style="{StaticResource DrawPanelButton}"
Command="{Binding ExplodeSurfaceMeshCommand}">
<Image Source="/Resources/DrawPanel/ExplodeSurf.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ExplodeSurf.png" Stretch="Uniform"/>
</Button> </Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="{Binding ExtractSurfFacetToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ExtractSurfFacetToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ExtractSurfFacetCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ExtractSurfFacetCommand}" IsEnabled="{Binding bSelOk}">
@@ -286,19 +187,11 @@
Command="{Binding ApproxSurfCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ApproxSurfCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ApproxSurf.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ApproxSurf.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Muovi Vertice di Superficie" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding StmMoveVertexFacetToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding MoveStmVertexCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding MoveStmVertexFacetCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/StmMoveVertex+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Muovi Faccia di Superficie" Style="{StaticResource DrawPanelButton}"
Command="{Binding MoveStmFacetCommand}">
<Image Source="/Resources/DrawPanel/StmMoveVertex.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/StmMoveVertex.png" Stretch="Uniform"/>
</Button> </Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
</UniformGrid> </UniformGrid>
</Expander> </Expander>
<Expander Name="Modify" Style="{StaticResource ExpanderStyle}" Grid.Row="2" IsExpanded="{Binding ModifyIsExpanded}"> <Expander Name="Modify" Style="{StaticResource ExpanderStyle}" Grid.Row="2" IsExpanded="{Binding ModifyIsExpanded}">
@@ -311,19 +204,11 @@
Command="{Binding DeleteCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding DeleteCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Delete.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Delete.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Cambia Layer" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ChangeLayerToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeLayerBaseCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ChangeLayerCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ChangeLayer+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Cambia Layer con Trasformazioni" Style="{StaticResource DrawPanelButton}"
Command="{Binding ChangeLayerTrasfCommand}">
<Image Source="/Resources/DrawPanel/ChangeLayer.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ChangeLayer.png" Stretch="Uniform"/>
</Button> </Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="{Binding ChangeStatusToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ChangeStatusToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ChangeStatusCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ChangeStatusCommand}" IsEnabled="{Binding bSelOk}">
@@ -379,23 +264,11 @@
Command="{Binding ExplodeCurveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ExplodeCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ExplodeCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ExplodeCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Unisci Curve" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding JoinCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding JoinCurveBasCommand}" IsEnabled="{Binding bLayerOkAndSelOk}"> Command="{Binding JoinCurveCommand}" IsEnabled="{Binding bLayerOkAndSelOk}">
<Image Source="/Resources/DrawPanel/JoinCurve+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Unisci Curve creando una Copia" Style="{StaticResource DrawPanelButton}"
Command="{Binding JoinCurveCopyCommand}">
<Image Source="/Resources/DrawPanel/JoinCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/JoinCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Fondi Curve nella Composita" Style="{StaticResource DrawPanelButton}"
Command="{Binding JoinCurveCompositeCommand}">
<Image Source="/Resources/DrawPanel/JoinCurve.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="{Binding OffsetToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding OffsetToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding OffsetCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding OffsetCommand}" IsEnabled="{Binding bSelOk}">
@@ -411,70 +284,31 @@
Command="{Binding ChamferCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ChamferCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/Chamfer.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/Chamfer.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Arco Capovolto" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ArcFlipToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding UpsideDownArchCommand}" ToolTipService.ShowOnDisabled="True" IsEnabled="{Binding bSelOk}"> ToolTipService.ShowOnDisabled="True"
<Image Source="/Resources/DrawPanel/ArcFlip+.png" Stretch="Uniform"/> Command="{Binding ArcFlipCommand}" IsEnabled="{Binding bSelOk}">
<Button.ContextMenu >
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Arco Esplementare" Style="{StaticResource DrawPanelButton}"
Command="{Binding ComplementaryArchCommand}">
<Image Source="/Resources/DrawPanel/ArcFlip.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ArcFlip.png" Stretch="Uniform"/>
</Button> </Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="{Binding ModifyCurveToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ModifyCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyCurveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ModifyCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ModifyCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ModifyCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Aggiungi Punto" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding AddPointCurveToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding AddPointCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding AddPointCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/AddPointCurve+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Trasforma in Arco" Style="{StaticResource DrawPanelButton}"
Command="{Binding TrasformArcCommand}">
<Image Source="/Resources/DrawPanel/AddPointCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/AddPointCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Chiudi Curva Composita" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding RemovePointCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding CloseCurveCommand}">
<Image Source="/Resources/DrawPanel/AddPointCurve.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="Rimuovi Punto" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding RemoveCurveCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding RemovePointCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/RemovePointCurve+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Trasforma in Retta" Style="{StaticResource DrawPanelButton}"
Command="{Binding TrasformRectCommand}">
<Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Apri Curva Composita" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ApproxCurveToolTip}" Style="{StaticResource DrawPanelButton}"
Command="{Binding OpenCurveCommand}">
<Image Source="/Resources/DrawPanel/RemovePointCurve.png" Stretch="Uniform"/>
</Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="Approssima Curva" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ApproxCurveBaseCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ApproxCurveCommand}" IsEnabled="{Binding bSelOk}">
<Image Source="/Resources/DrawPanel/ApproxCurve+.png" Stretch="Uniform"/>
<Button.ContextMenu>
<ContextMenu Style="{StaticResource ContextMenu_Button}">
<Button ToolTip="Approssima Curva con Linee" Style="{StaticResource DrawPanelButton}"
Command="{Binding ApproxCurveLineCommand}">
<Image Source="/Resources/DrawPanel/ApproxCurve.png" Stretch="Uniform"/> <Image Source="/Resources/DrawPanel/ApproxCurve.png" Stretch="Uniform"/>
</Button> </Button>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button ToolTip="{Binding ModifyArcRadiusToolTip}" Style="{StaticResource DrawPanelButton}" <Button ToolTip="{Binding ModifyArcRadiusToolTip}" Style="{StaticResource DrawPanelButton}"
ToolTipService.ShowOnDisabled="True" ToolTipService.ShowOnDisabled="True"
Command="{Binding ModifyArcRadiusCommand}" IsEnabled="{Binding bSelOk}"> Command="{Binding ModifyArcRadiusCommand}" IsEnabled="{Binding bSelOk}">
+1 -1009
View File
File diff suppressed because it is too large Load Diff
-60
View File
@@ -1035,66 +1035,6 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\DrawPanel\StmMoveVertex.png" /> <Resource Include="Resources\DrawPanel\StmMoveVertex.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\Point+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\Line2P+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\LinePDL+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ArcPDP+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\Text+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\TextA.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ArcFlip+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\LinearDimension+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\AngularDimension +.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\DiametralDimension+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\Plane+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\SolidSubtractSurf+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\SolidIntersectSurf+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ExplodeSurf+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\StmMoveVertex+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ChangeLayer+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\JoinCurve+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\AddPointCurve+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\RemovePointCurve+.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DrawPanel\ApproxCurve+.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe <PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
+1
View File
@@ -5,4 +5,5 @@
DockPanel.Dock="Left"> DockPanel.Dock="Left">
<local:DrawPanelV DataContext="{StaticResource DrawPanelViewModel}"/> <local:DrawPanelV DataContext="{StaticResource DrawPanelViewModel}"/>
</Grid> </Grid>
+1 -1
View File
@@ -106,7 +106,7 @@ Public Class MyMachGroupPanelVM
Else Else
' se ci sono gruppi di lavorazione ' se ci sono gruppi di lavorazione
If bMachGroup Then If bMachGroup Then
nGroupId = EgtGetFirstMachGroup() nGroupId = EgtGetLastMachGroup()
Return If(EgtSetCurrMachGroup(nGroupId), 0, 1) Return If(EgtSetCurrMachGroup(nGroupId), 0, 1)
' se altrimenti ammessi gruppi di lavoro vuoti ' se altrimenti ammessi gruppi di lavoro vuoti
ElseIf bAllowEmpty Then ElseIf bAllowEmpty Then
-1
View File
@@ -10,7 +10,6 @@
MinHeight="600" MinWidth="800" WindowStyle="None" ResizeMode="NoResize" MinHeight="600" MinWidth="800" WindowStyle="None" ResizeMode="NoResize"
AboutBoxCommand="{Binding AboutBoxCommand}" AboutBoxCommand="{Binding AboutBoxCommand}"
AllowDrop="True" Drop="MainWindow_Drop" AllowDrop="True" Drop="MainWindow_Drop"
SnapsToDevicePixels="True"
CloseCommand="{Binding CloseApplicationCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"> CloseCommand="{Binding CloseApplicationCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<EgtWPFLib5:EgtCustomWindow.TitlePanel> <EgtWPFLib5:EgtCustomWindow.TitlePanel>
<local:TopCommandBarV DataContext="{StaticResource TopCommandBarViewModel}"/> <local:TopCommandBarV DataContext="{StaticResource TopCommandBarViewModel}"/>
+3 -7
View File
@@ -16,7 +16,6 @@ Public Class MainWindowVM
Private m_sDataRoot As String = String.Empty Private m_sDataRoot As String = String.Empty
Private m_sConfigDir As String = String.Empty Private m_sConfigDir As String = String.Empty
Private m_OnTerminateProcessCallback As New OnTerminateProcessCallback(AddressOf OnTerminateProcess) Private m_OnTerminateProcessCallback As New OnTerminateProcessCallback(AddressOf OnTerminateProcess)
Private m_IndexTab As Integer = 0
' EGALTECH ENVIRONMENT FIELDS WITH PROPERTY ' EGALTECH ENVIRONMENT FIELDS WITH PROPERTY
@@ -386,8 +385,8 @@ Public Class MainWindowVM
EgtSetLockId(sLockId) EgtSetLockId(sLockId)
End If End If
' Recupero livello e opzioni della chiave ' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2611, 1, IniFile.m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(3279, 2607, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2611, 1, IniFile.m_nKeyOptions) EgtGetKeyOptions(3279, 2607, 1, IniFile.m_nKeyOptions)
' Leggo e imposto livello utilizzatore ' Leggo e imposto livello utilizzatore
IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1)) IniFile.m_nUserLevel = Math.Min(IniFile.m_nKeyLevel, GetPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
' Imposto abilitazione lavorazioni avanzate ' Imposto abilitazione lavorazioni avanzate
@@ -598,11 +597,8 @@ Public Class MainWindowVM
' pulisco output ' pulisco output
Map.refStatusBarVM.NotifyStatusOutput("") Map.refStatusBarVM.NotifyStatusOutput("")
Map.refInputExpanderVM.ResetInputBox() Map.refInputExpanderVM.ResetInputBox()
ElseIf e.Key = Key.Left OrElse e.Key = Key.Right OrElse e.Key = Key.Up OrElse e.Key = Key.Down AndAlso ElseIf e.Key = Key.Left OrElse e.Key = Key.Right OrElse e.Key = Key.Up OrElse e.Key = Key.Down AndAlso Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
Map.refTopCommandBarVM.MachiningIsChecked AndAlso Map.refOperationParametersExpanderVM.OperationParameters.IsEnabled Then
Map.refMachiningParameterExpanderVM.FocusSlider() Map.refMachiningParameterExpanderVM.FocusSlider()
Dim nStep As Integer = If(e.Key = Key.Right OrElse e.Key = Key.Up, 1, -1)
Map.refMachiningParameterExpanderVM.SetSliderValue(nStep)
e.Handled = True e.Handled = True
End If End If
End Sub End Sub
+2 -2
View File
@@ -70,6 +70,6 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.6.11.1")> <Assembly: AssemblyVersion("2.6.7.6")>
<Assembly: AssemblyFileVersion("2.6.11.1")> <Assembly: AssemblyFileVersion("2.6.7.6")>
@@ -8,7 +8,7 @@
<TextBlock Text="{Binding PropertiesMsg}"/> <TextBlock Text="{Binding PropertiesMsg}"/>
</Expander.Header> </Expander.Header>
<UniformGrid> <UniformGrid>
<TextBox Text="{Binding InfoBox, Mode=OneWay}" MaxHeight="250" IsReadOnly="True" <TextBox Text="{Binding InfoBox, Mode=OneWay}" MaxHeight="100" IsReadOnly="True"
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/> HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"/>
</UniformGrid> </UniformGrid>
</Expander> </Expander>
@@ -21,7 +21,7 @@
<Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/> <Button Content="{Binding ColorMsg}" Command="{Binding LayerColorCommand}" Height="30"/>
</UniformGrid> </UniformGrid>
<TreeView Name="LayerTreeView" MinHeight="250" MaxHeight="400" <TreeView Name="LayerTreeView" MinHeight="150" MaxHeight="250"
ItemsSource="{Binding Path=LayerList}" ItemsSource="{Binding Path=LayerList}"
VirtualizingStackPanel.IsVirtualizing = "True" VirtualizingStackPanel.IsVirtualizing = "True"
VirtualizingStackPanel.VirtualizationMode = "Recycling"> VirtualizingStackPanel.VirtualizationMode = "Recycling">
+5 -20
View File
@@ -1,30 +1,15 @@
<UserControl x:Class="DrawOptionPanelV" <UserControl x:Class="DrawOptionPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"> xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
<!--<StackPanel Name="ciao" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}"> <StackPanel Name="ciao" Background="Transparent" Margin="0,0,3.5001,0" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
--><!--ContentPresenter that contains the ManageLayerExpander--><!--
<ContentPresenter Content="{Binding ManageLayerExpander,Mode=OneWay}"/>
--><!--ContentPresenter that contains the InfoExpander--><!--
<ContentPresenter Content="{Binding InfoExpander}"/>
--><!--ContentPresenter that contains the InputExpander--><!--
<ContentPresenter Content="{Binding InputExpander}"/>
</StackPanel>-->
<Grid Name="ciao" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!--ContentPresenter that contains the ManageLayerExpander--> <!--ContentPresenter that contains the ManageLayerExpander-->
<ContentPresenter Content="{Binding ManageLayerExpander,Mode=OneWay}"/> <ContentPresenter Content="{Binding ManageLayerExpander,Mode=OneWay}"/>
<GridSplitter Grid.Row="0" Height="5" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Bottom"/>
<!--ContentPresenter that contains the InfoExpander--> <!--ContentPresenter that contains the InfoExpander-->
<ContentPresenter Grid.Row="1" Content="{Binding InfoExpander}"/> <ContentPresenter Content="{Binding InfoExpander}"/>
<GridSplitter Grid.Row="1" Height="5" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Bottom"/>
<!--ContentPresenter that contains the InputExpander--> <!--ContentPresenter that contains the InputExpander-->
<ContentPresenter Grid.Row="2" Content="{Binding InputExpander}"/> <ContentPresenter Content="{Binding InputExpander}"/>
</Grid> </StackPanel>
</UserControl> </UserControl>
@@ -177,17 +177,12 @@ Public Class EstimationsExpanderVM
If Not bOk Then Return False If Not bOk Then Return False
' Calcolo della stima ' Calcolo della stima
If Not EgtEstimate(sEstFile, sInfo) Then If Not EgtEstimate(sEstFile, sInfo) Then
Dim nErr As Integer = EgtGetLastMachMgrErrorId() If EgtGetLastMachMgrErrorId() <> 0 Then
If nErr = 1000 Then
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr = 1001 Then
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString() Dim sErr As String = EgtGetLastMachMgrErrorString()
sErr = sErr.Replace("Cnc", "Est") sErr = sErr.Replace("Cnc", "Est")
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation)
Else Else
MessageBox.Show(EgtMsg(5317), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) MessageBox.Show(EgtMsg(MSG_SIMULATION + 17), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error)
End If End If
bOk = False bOk = False
End If End If
@@ -281,7 +281,6 @@ Public Class DispositionParameterExpanderVM
End Select End Select
Map.refRawPartOptionVM.SetMoveWithFixture(False) Map.refRawPartOptionVM.SetMoveWithFixture(False)
Map.refFixtureParametersVM.UpdateFixtureTypeList() Map.refFixtureParametersVM.UpdateFixtureTypeList()
DispositionUtility.InitHookData()
End Sub End Sub
#End Region ' METHODS #End Region ' METHODS
@@ -1,16 +1,17 @@
Imports System.Windows.Forms.AxHost Imports EgtUILib
Imports EgtUILib
Imports Microsoft.VisualBasic.ApplicationServices
Public NotInheritable Class DispositionUtility Public NotInheritable Class DispositionUtility
Friend Const MOBILE As String = "MOBILE"
Friend Const MDIR As String = "MDir"
Friend Const STROKE As String = "Stroke"
Friend Const POS As String = "Val"
Friend Const PDIST As String = "PDist" Friend Const PDIST As String = "PDist"
Friend Const MDIST As String = "MDist" Friend Const MDIST As String = "MDist"
Friend Const PREV As String = "Prev" Friend Const HOOK As String = "HOOK"
Friend Const NEXT_ As String = "Next"
Friend Const HOOK As String = "HOOK*"
Friend Const CLASS_ As String = "CLASS" Friend Const CLASS_ As String = "CLASS"
Friend Const FIXED As String = "FIXED*" Friend Const USED As String = "USED"
Friend Const FIXED As String = "FIXED"
Friend Const TYPE As String = "TYPE" Friend Const TYPE As String = "TYPE"
Friend Const FREE As String = "FREE" Friend Const FREE As String = "FREE"
Friend Const LINE As String = "LINE" Friend Const LINE As String = "LINE"
@@ -21,84 +22,9 @@ Public NotInheritable Class DispositionUtility
LINE = 2 LINE = 2
End Enum End Enum
Private Shared m_vtHook As Vector3d = Vector3d.NULL Friend Shared m_vtHook As Vector3d = Vector3d.NULL
Private Shared m_nUsedHookId As Integer = GDB_ID.NULL Friend Shared m_nUsedHookId As Integer = GDB_ID.NULL
Private Shared m_nPrevUsedHookId As Integer = GDB_ID.NULL Friend Shared m_nPrevUsedHookId As Integer = GDB_ID.NULL
Private Shared m_nPrevFixtureId As Integer = GDB_ID.NULL
Friend Class HookData
Public m_sName As String
Public m_sParent As String
Public m_bParentAxis As Boolean
Public m_sGrParentAxis As String
Public m_nId As Integer
Public m_nType As HOOKTYPE
Public m_ptP1 As Point3d
Public m_ptP2 As Point3d
Public m_nClass As Integer
Public m_nHooked As Integer
Public m_sHooked As String
Sub New()
m_sName = ""
m_sParent = ""
m_bParentAxis = False
m_sGrParentAxis = ""
m_nId = GDB_ID.NULL
m_nType = HOOKTYPE.FREE
m_ptP1 = Point3d.ORIG()
m_ptP2 = Point3d.ORIG()
m_nClass = 0
m_nHooked = GDB_ID.NULL
m_sHooked = ""
End Sub
Sub New(sName As String, sParent As String, bParentAxis As Boolean, sGrParentAxis As String,
nId As Integer, ptP As Point3d, nClass As Integer)
m_sName = sName
m_sParent = sParent
m_bParentAxis = bParentAxis
m_sGrParentAxis = sGrParentAxis
m_nId = nId
m_nType = HOOKTYPE.POINT
m_ptP1 = ptP
m_ptP2 = Point3d.ORIG()
m_nClass = nClass
m_nHooked = GDB_ID.NULL
m_sHooked = ""
End Sub
Sub New(sName As String, sParent As String, bParentAxis As Boolean, sGrParentAxis As String,
nId As Integer, ptP1 As Point3d, ptP2 As Point3d, nClass As Integer)
m_sName = sName
m_sParent = sParent
m_bParentAxis = bParentAxis
m_sGrParentAxis = sGrParentAxis
m_nId = nId
m_nType = HOOKTYPE.LINE
m_ptP1 = ptP1
m_ptP2 = ptP2
m_nClass = nClass
m_nHooked = GDB_ID.NULL
m_sHooked = ""
End Sub
End Class
Friend Shared m_vHookData As New List(Of HookData)
Friend Shared Function DistPointSegment( ptP As Point3d, ptS1 As Point3d, ptS2 As Point3d) As Point3d
If AreSamePointApprox( ptS1, ptS2) Then
Return Point3d.Media( ptS1, ptS2)
End If
Dim vtDir As Vector3d = ptS2 - ptS1
vtDir.z = 0
Dim dLen As Double = vtDir.Len()
vtDir /= dLen
Dim dProSca As Double = vtDir * ( ptP - ptS1)
If dProSca < EPS_SMALL Then
Return ptS1
ElseIf dProSca > dLen - EPS_SMALL Then
Return ptS2
Else
Return ptS1 + dProSca * vtDir
End If
End Function
' Identificativi per elemento da selezionare/deselezionare ' Identificativi per elemento da selezionare/deselezionare
Friend Enum SelType As Integer Friend Enum SelType As Integer
@@ -182,8 +108,10 @@ Public NotInheritable Class DispositionUtility
End If End If
End While End While
Else Else
Dim sName As String = ""
EgtGetName(EgtGetParent(nMoveId), sName)
If EgtVerifyFixture(nMoveId) Then If EgtVerifyFixture(nMoveId) Then
VerifyHookFixture(nMoveId, vtMove, ptCurr, False) VerifyHookFixture(nMoveId, vtMove, ptCurr, True)
If Not EgtMoveFixture(nMoveId, vtMove) Then If Not EgtMoveFixture(nMoveId, vtMove) Then
bErrorMoving = True bErrorMoving = True
End If End If
@@ -243,11 +171,11 @@ Public NotInheritable Class DispositionUtility
Else Else
If EgtVerifyFixture(nMoveId) Then If EgtVerifyFixture(nMoveId) Then
EgtMoveFixture(nMoveId, -vtMove) EgtMoveFixture(nMoveId, -vtMove)
' ripristino occupazione hooks ' segno hook occupato prima del movimento correttivo come non utilizzato
SetHookUsed(m_nPrevUsedHookId, nMoveId, True)
'EgtSetInfo(m_nPrevUsedHookId, USED, nMoveId)
SetHookUsed(m_nPrevUsedHookId, nMoveId, False) SetHookUsed(m_nPrevUsedHookId, nMoveId, False)
SetHookUsed(m_nUsedHookId, m_nPrevFixtureId, True) 'EgtRemoveInfo(m_nUsedHookId, USED)
' rieseguo verifica nel punto iniziale
VerifyHookFixture(nMoveId, Vector3d.NULL(), Point3d.ORIG(), True)
Else Else
EgtMoveRawPart(nMoveId, -vtMove) EgtMoveRawPart(nMoveId, -vtMove)
End If End If
@@ -264,8 +192,6 @@ Public NotInheritable Class DispositionUtility
Return VerifyFixturePosition(nMovedObjId, vtRefMove) Return VerifyFixturePosition(nMovedObjId, vtRefMove)
ElseIf EgtVerifyRawPartCurrPhase(nMovedObjId) Then ElseIf EgtVerifyRawPartCurrPhase(nMovedObjId) Then
Return VerifyRawPosition(nMovedObjId, vtOrigMove, vtRefMove) Return VerifyRawPosition(nMovedObjId, vtOrigMove, vtRefMove)
Elseif VerifyTableAxis( nMovedObjId) Then
Return True
Else Else
Return False Return False
End If End If
@@ -490,10 +416,9 @@ Public NotInheritable Class DispositionUtility
EgtGetBBoxGlob(nFixtureId, GDB_BB.ONLY_VISIBLE, bboxFixture) EgtGetBBoxGlob(nFixtureId, GDB_BB.ONLY_VISIBLE, bboxFixture)
' verifico se c'è sovrapposizione ' verifico se c'è sovrapposizione
If bboxRawPartId.OverlapsXY(bboxFixture) Then If bboxRawPartId.OverlapsXY(bboxFixture) Then
' recupero il tipo di fixture Select Case FixtureType(nFixtureId)
Dim nFxtType As FIX_TYPE = FixtureType(nFixtureId) ' se il sottopezzo è una ventosa
' Se è ventosa o morsa Case FIX_TYPE.VACUUM
If nFxtType = FIX_TYPE.VACUUM Or nFxtType = FIX_TYPE.VISE Then
' recupero altezza ventosa ' recupero altezza ventosa
Dim dFixtureHeight As Double = 0 Dim dFixtureHeight As Double = 0
EgtGetInfo(nFixtureId, "H", dFixtureHeight) EgtGetInfo(nFixtureId, "H", dFixtureHeight)
@@ -513,19 +438,15 @@ Public NotInheritable Class DispositionUtility
dRawPartMin.ToLoc(TableFrame) dRawPartMin.ToLoc(TableFrame)
End If End If
bIsFixtureUnderRawPart = True bIsFixtureUnderRawPart = True
End If ' se il sottopezzo è un riferimento
' Se è morsa Case FIX_TYPE.REFERENCE
If nFxtType = FIX_TYPE.VISE Then
' regolo la posizione in Z della morsa
EgtSetFixtureMobile( nFixtureId, bboxRawPartId.DimZ())
End If
' Se è un riferimento o una morsa
If nFxtType = FIX_TYPE.REFERENCE Or nFxtType = FIX_TYPE.VISE Then
' recupero arco del riferimento ' recupero arco del riferimento
Dim arcRefId As Integer = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(nFixtureId, SOLID), REF_ARC) Dim arcRefId As Integer = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(nFixtureId, SOLID), REF_ARC)
' calcolo bbox dell'arco di riferimento ' calcolo bbox dell'arco di riferimento
Dim bboxArcRef As New BBox3d Dim bboxArcRef As New BBox3d
EgtGetBBoxGlob(arcRefId, GDB_BB.STANDARD, bboxArcRef) EgtGetBBoxGlob(arcRefId, GDB_BB.STANDARD, bboxArcRef)
' ne faccio l'offset ??
'bboxArcRef.Expand(10)
If bboxRawPartId.OverlapsXY(bboxArcRef) Then If bboxRawPartId.OverlapsXY(bboxArcRef) Then
' recupero contorno del grezzo ' recupero contorno del grezzo
Dim ccompoRawPartOutlineId As Integer = EgtGetFirstNameInGroup(nRawId, RAWOUTLINE) Dim ccompoRawPartOutlineId As Integer = EgtGetFirstNameInGroup(nRawId, RAWOUTLINE)
@@ -576,7 +497,7 @@ Public NotInheritable Class DispositionUtility
Dim nContactColDisk As Integer = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(nFixtureId, SOLID), REF_DISK) Dim nContactColDisk As Integer = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(nFixtureId, SOLID), REF_DISK)
EgtSetColor(nContactColDisk, ReferenceContactColRed) EgtSetColor(nContactColDisk, ReferenceContactColRed)
End If End If
End If End Select
' se non c'è sovrapposizione ' se non c'è sovrapposizione
ElseIf FixtureType(nFixtureId) = FIX_TYPE.REFERENCE Then ElseIf FixtureType(nFixtureId) = FIX_TYPE.REFERENCE Then
' il grezzo non è in battuta sul riferimento ' il grezzo non è in battuta sul riferimento
@@ -602,84 +523,103 @@ Public NotInheritable Class DispositionUtility
Return True Return True
End Function End Function
' Funzione che verifica se asse o sottoasse di tavola (e quindi barra o carrello)
Friend Shared Function VerifyTableAxis( nObjId As Integer) As Boolean
' Verifico se asse
Dim sObjName As String = ""
If Not EgtGetName( nObjId, sObjName) OrElse EgtGetAxisId( sObjName) = GDB_ID.NULL Then Return False
' Recupero il padre
Dim nParId As Integer = EgtGetParent( nObjId)
Dim sParName As String = ""
If Not EgtGetName( nParId, sParName) Then Return False
' Verifico se tavola
If EgtGetTableId( sParName) <> GDB_ID.NULL Then Return True
' Verifico se asse di tavola
Return VerifyTableAxis( nParId)
End Function
' Funzione che verifica i movimenti della barra ' Funzione che verifica i movimenti della barra
Private Shared Function VerifyBarPosition(nMoveId As Integer, vtMove As Vector3d) As Boolean Private Shared Function VerifyBarPosition(nMoveId As Integer, vtMove As Vector3d) As Boolean
' Nome dell'asse ' verifico direzione di spostamento consentita
Dim sName As String = "" Dim sMDir As String = ""
If Not EgtGetName( nMoveId, sName) Then Return False EgtGetInfo(nMoveId, MDIR, sMDir)
' Recupero la direzione di spostamento Dim aMDir() As String = sMDir.Split(","c)
Dim vtDir As New Vector3d Dim vX As Integer = 0
If Not EgtGetAxisDir( sName, VtDir) Then Return False Dim vY As Integer = 0
' Recupero la corsa Dim vZ As Integer = 0
Dim dAxMin As Double = 0 Integer.TryParse(aMDir(0), vX)
Dim dAxMax As Double = 0 Integer.TryParse(aMDir(1), vY)
If Not EgtGetAxisMin( sName, dAxMin) OrElse Not EgtGetAxisMax( sName, dAxMax) Then Return False Integer.TryParse(aMDir(2), vZ)
' Recupero dati barra corrente Dim vtMDir As New Vector3d(vX, vY, vZ)
Dim dCurrBarPos As Double = 0 vtMDir.Normalize()
Dim dCurrBarMEnc As Double = 0 vtMove = vtMove * vtMDir * vtMDir
Dim dCurrBarPEnc As Double = 0 ' recupero corsa
GetBarExtreme(nMoveId, dCurrBarPos, dCurrBarMEnc, dCurrBarPEnc) Dim sStroke As String = ""
' Recupero dati eventuale barra precedente Dim sStrokes() As String
Dim sPrevBarName As String = "" Dim PStroke As Double = 0
If EgtGetInfo( nMoveId, PREV, sPrevBarName) Then Dim MStroke As Double = 0
Dim nPrevBarId As Integer = EgtGetAxisId( sPrevBarName) EgtGetInfo(nMoveId, STROKE, sStroke)
Dim dPrevBarPos As Double = 0 sStrokes = sStroke.Split(","c)
Dim dPrevBarMEnc As Double = 0 StringToDouble(sStrokes(0), MStroke)
Dim dPrevBarPEnc As Double = 0 StringToDouble(sStrokes(1), PStroke)
If Not GetBarExtreme(nPrevBarId, dPrevBarPos, dPrevBarMEnc, dPrevBarPEnc) Then Return False ' recupero dati barra corrente
dAxMin = Math.Max( dAxMin, dPrevBarPos + dPrevBarPEnc + dCurrBarMEnc) Dim dCurrBarYPos As Double = 0
Dim dCurrBarMVal As Double = 0
Dim dCurrBarPVal As Double = 0
GetBarExtreme(nMoveId, dCurrBarYPos, dCurrBarMVal, dCurrBarPVal)
' recupero indice barra da spostare
Dim sBarName As String = ""
EgtGetName(nMoveId, sBarName)
Dim nBarId As Integer = 0
sBarName = sBarName.Substring(6, sBarName.Length - 6)
Integer.TryParse(sBarName, nBarId)
' recupero dati barra precedente
Dim dMinYMove As Double
Dim dMaxYMove As Double
Dim dPrevBarYPos As Double = 0
Dim dPrevBarMVal As Double = 0
Dim dPrevBarPVal As Double = 0
If nBarId > 1 Then
' recupero eventuale barra precedente
Dim nPrevBarId As Integer = EgtGetFirstNameInGroup(EgtGetParent(nMoveId), MOBILE & nBarId - 1)
If Not nPrevBarId = GDB_ID.NULL Then
GetBarExtreme(nPrevBarId, dPrevBarYPos, dPrevBarMVal, dPrevBarPVal)
' calcolo il massimo tra corsa di spostamento ed ingombro della barra precedente
dMinYMove = Math.Max(dPrevBarYPos + dPrevBarPVal + dCurrBarMVal, MStroke)
Else
dMinYMove = MStroke
End If End If
' Recupero dati eventuale barra successiva Else
Dim sNextBarName As String = "" dMinYMove = MStroke
If EgtGetInfo( nMoveId, NEXT_, sNextBarName) Then
Dim nNextBarId As Integer = EgtGetAxisId( sNextBarName)
Dim dNextBarPos As Double = 0
Dim dNextBarMEnc As Double = 0
Dim dNextBarPEnc As Double = 0
if Not GetBarExtreme(nNextBarId, dNextBarPos, dNextBarMEnc, dNextBarPEnc) Then Return False
dAxMax = Math.Min( dAxMax, dNextBarPos - dNextBarMEnc - dCurrBarPEnc)
End If End If
' Limito lo spostamento alle corse ammesse ' recupero eventuale barra successiva
If dAxMax < dAxMin Then Return False Dim dNextBarYPos As Double = 0
Dim dNewBarPos As Double = dCurrBarPos + vtMove * vtDir Dim dNextBarMVal As Double = 0
dNewBarPos = Math.Min( Math.Max( dNewBarPos,dAxMin), dAxMax) Dim dNextBarPVal As Double = 0
' Eseguo lo spostamento Dim nNextBarId As Integer = EgtGetFirstNameInGroup(EgtGetParent(nMoveId), MOBILE & nBarId + 1)
EgtMoveDispAxis( sName, dNewBarPos) If Not nNextBarId = GDB_ID.NULL Then
Dim vtRealMove As Vector3d = ( dNewBarPos - dCurrBarPos) * vtDir GetBarExtreme(nNextBarId, dNextBarYPos, dNextBarMVal, dNextBarPVal)
UpdateFixturesForDispAxisMove( sName, vtRealMove) ' calcolo il minimo tra corsa di spostamento ed ingombro della barra successiva
dMaxYMove = Math.Min(dNextBarYPos - dNextBarMVal - dCurrBarPVal, PStroke)
Else
dMaxYMove = PStroke
End If
' sottraggo dagli estremi l'ingombro della barra
'dMinYMove += dCurrBarMVal
'dMaxYMove -= dCurrBarPVal
' verifico che lo spostamento sia entro le corse
If dCurrBarYPos + vtMove.y <= dMinYMove Then
vtMove.y = dMinYMove - dCurrBarYPos
ElseIf dCurrBarYPos + vtMove.y >= dMaxYMove Then
vtMove.y = dMaxYMove - dCurrBarYPos
End If
EgtMove(nMoveId, vtMove)
' scrivo nuova posizione
EgtSetInfo(nMoveId, POS, DoubleToString(dCurrBarYPos + vtMove.y, 4))
Return True Return True
End Function End Function
Private Shared Function GetBarExtreme(nMoveId As Integer, ByRef dPos As Double, ByRef dMEnc As Double, ByRef dPEnc As Double) As Boolean Private Shared Function GetBarExtreme(nMoveId As Integer, ByRef YPos As Double, ByRef PVal As Double, ByRef MVal As Double) As Boolean
' Recupero la posizione ' recupero posizione
Dim sName As String = "" EgtGetInfo(nMoveId, POS, YPos)
If Not EgtGetName( nMoveId, sName) OrElse Not EgtGetAxisPos( sName, dPos) Then Return False ' recupero ingombro negativo
' Recupero ingombro negativo Dim dMDist As Double = 0
dMEnc = 0 EgtGetInfo(nMoveId, MDIST, dMDist)
EgtGetInfo(nMoveId, MDIST, dMEnc)
' recupero ingombro positivo ' recupero ingombro positivo
dPEnc = 0 Dim dPDist As Double = 0
EgtGetInfo(nMoveId, PDIST, dPEnc) EgtGetInfo(nMoveId, PDIST, dPDist)
MVal = dMDist
PVal = dPDist
Return True Return True
End Function End Function
' Funzione che verifica l'agganciamento dei sottopezzi ' Funzione che verifica l'agganciamento dei sottopezzi
Private Shared Function VerifyHookFixture(nMoveId As Integer, ByRef vtMove As Vector3d, ptCurr As Point3d, bInPlace As Boolean) As Boolean Friend Shared Function VerifyHookFixture(nMoveId As Integer, ByRef vtMove As Vector3d, ptCurr As Point3d, bTolerance As Boolean) As Boolean
' cerco punto hook sulla ventosa ' cerco punto hook sulla ventosa
Dim nFixtSolidId As Integer = EgtGetFirstNameInGroup(nMoveId, SOLID) Dim nFixtSolidId As Integer = EgtGetFirstNameInGroup(nMoveId, SOLID)
Dim nFixtHookId As Integer = EgtGetFirstNameInGroup(nFixtSolidId, HOOK) Dim nFixtHookId As Integer = EgtGetFirstNameInGroup(nFixtSolidId, HOOK)
@@ -692,6 +632,7 @@ Public NotInheritable Class DispositionUtility
ElseIf sType.Equals(LINE) Then ElseIf sType.Equals(LINE) Then
nFixtHookType = HOOKTYPE.LINE nFixtHookType = HOOKTYPE.LINE
Else 'FREE Else 'FREE
nFixtHookType = HOOKTYPE.FREE
' esco perchè non devo cercare alcun punto ' esco perchè non devo cercare alcun punto
Return True Return True
End If End If
@@ -701,392 +642,140 @@ Public NotInheritable Class DispositionUtility
Dim ptFixtHook As Point3d Dim ptFixtHook As Point3d
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook) EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
' calcolo vtMove nel caso normale ' calcolo vtMove nel caso normale
If bInPlace Then If Not IsNothing(ptCurr) Then
ptCurr = ptFixtHook - m_vtHook vtMove = ptCurr - m_vtHook - ptFixtHook
ElseIf Not IsNothing(ptCurr) Then
vtMove = ptCurr + m_vtHook - ptFixtHook
Else
ptCurr = ptFixtHook - m_vtHook + vtMove
End If End If
' Variabili per tenere da parte l'entità, la distanza e il punto di hook più vicino alla ventosa ' cerco id tavola
Dim sTableName As String = ""
EgtGetTableName(sTableName)
Dim nTableId As Integer = EgtGetTableId(sTableName)
' cerco hook su tavola macchina
Dim nTableSolidId As Integer = EgtGetFirstNameInGroup(nTableId, SOLID)
Dim nCurrHookId As Integer = EgtGetFirstNameInGroup(nTableSolidId, HOOK)
' variabili per tenere da parte l'entità, la distanza e il punto di hook più vicino alla ventosa
Dim nNearestHookId As Integer = GDB_ID.NULL Dim nNearestHookId As Integer = GDB_ID.NULL
Dim dNearestHookDist As Double = 99999999 Dim dNearestHookDist As Double = 99999999
Dim ptNearestHook As Point3d = Nothing Dim ptNearestHook As Point3d = Nothing
' Recupero Id tavola corrente
Dim sTableName As String = ""
EgtGetTableName(sTableName)
Dim nTableId As Integer = EgtGetTableId(sTableName)
' *** Cerco hook su tavola ***
Dim nTableSolidId As Integer = EgtGetFirstNameInGroup(nTableId, SOLID)
Dim nCurrHookId As Integer = EgtGetFirstNameInGroup(nTableSolidId, HOOK)
While nCurrHookId <> GDB_ID.NULL While nCurrHookId <> GDB_ID.NULL
HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptCurr + m_vtHook, nMoveId, nNearestHookId, dNearestHookDist, ptNearestHook) 'HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, nNearestHookId, dNearestHookDist)
HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptCurr + m_vtHook, nNearestHookId, dNearestHookDist, ptNearestHook, nMoveId)
nCurrHookId = EgtGetNextName(nCurrHookId, HOOK) nCurrHookId = EgtGetNextName(nCurrHookId, HOOK)
End While End While
' *** Cerco hook su barre fisse *** ' cerco hook su barra fissa
Dim nTableFixedId As Integer = EgtGetFirstNameInGroup(nTableId, FIXED) Dim nTableFixedId As Integer = EgtGetFirstNameInGroup(nTableId, FIXED)
While nTableFixedId <> GDB_ID.NULL
nCurrHookId = EgtGetFirstNameInGroup(nTableFixedId, HOOK) nCurrHookId = EgtGetFirstNameInGroup(nTableFixedId, HOOK)
While nCurrHookId <> GDB_ID.NULL While nCurrHookId <> GDB_ID.NULL
HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptCurr + m_vtHook, nMoveId, nNearestHookId, dNearestHookDist, ptNearestHook) 'HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, nNearestHookId, dNearestHookDist)
HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptCurr + m_vtHook, nNearestHookId, dNearestHookDist, ptNearestHook, nMoveId)
nCurrHookId = EgtGetNextName(nCurrHookId, HOOK) nCurrHookId = EgtGetNextName(nCurrHookId, HOOK)
End While End While
nTableFixedId = EgtGetNextName(nTableFixedId, FIXED) ' cerco hook su barre mobili
End While Dim nMobileInd As Integer = 1
' *** Cerco hook su barre mobili *** Dim nMobile As Integer = EgtGetFirstNameInGroup(nTableId, MOBILE & nMobileInd)
Dim nBarId As Integer = EgtGetFirstGroupInGroup(nTableId) While nMobile <> GDB_ID.NULL
While nBarId <> GDB_ID.NULL nCurrHookId = EgtGetFirstNameInGroup(nMobile, HOOK)
Dim sBarName As String = ""
If EgtGetName( nBarId, sBarName) AndAlso EgtGetAxisId( sBarName) <> GDB_ID.NULL Then
nCurrHookId = EgtGetFirstNameInGroup(nBarId, HOOK)
While nCurrHookId <> GDB_ID.NULL While nCurrHookId <> GDB_ID.NULL
HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptCurr + m_vtHook, nMoveId, nNearestHookId, dNearestHookDist, ptNearestHook) 'HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, nNearestHookId, dNearestHookDist)
HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptCurr + m_vtHook, nNearestHookId, dNearestHookDist, ptNearestHook, nMoveId)
nCurrHookId = EgtGetNextName(nCurrHookId, HOOK) nCurrHookId = EgtGetNextName(nCurrHookId, HOOK)
End While End While
' Cerco su eventuali carrelli nMobileInd += 1
Dim nCharId As Integer = EgtGetFirstGroupInGroup(nBarId) nMobile = EgtGetFirstNameInGroup(nTableId, MOBILE & nMobileInd)
While nCharId <> GDB_ID.NULL
Dim sCharName As String = ""
If EgtGetName( nCharId, sCharName) AndAlso EgtGetAxisId( sCharName) <> GDB_ID.NULL Then
nCurrHookId = EgtGetFirstNameInGroup(nCharId, DispositionUtility.HOOK)
While nCurrHookId <> GDB_ID.NULL
HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptCurr + m_vtHook, nMoveId, nNearestHookId, dNearestHookDist, ptNearestHook)
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
End While End While
End If ' se non ho trovato hook compatibili e liberi esco
nCharId = EgtGetNextGroup(nCharId)
End While
End If
nBarId = EgtGetNextGroup(nBarId)
End While
' Se non ho trovato hook compatibili e liberi esco
If nNearestHookId = GDB_ID.NULL Then Return False If nNearestHookId = GDB_ID.NULL Then Return False
' verifico se la distanza minima è inferiore al raggio dell'area di aggancio
' Verifico se la distanza minima è inferiore al raggio dell'area di aggancio Dim dHookTolerance As Double = EgtUILib.GetPrivateProfileDouble(S_FIXTURES, K_HOOKTOLERANCE, 50, IniFile.m_sCurrMachIniFilePath)
Dim dHookTolerance As Double = 1 If bTolerance AndAlso dNearestHookDist > dHookTolerance Then Return False
If Not bInPlace Then ' sostituisco spostamento mouse con spostamento ad hook
dHookTolerance = EgtUILib.GetPrivateProfileDouble(S_FIXTURES, K_HOOKTOLERANCE, 50, IniFile.m_sCurrMachIniFilePath)
End If
If dNearestHookDist > dHookTolerance Then Return False
' Sostituisco spostamento mouse con spostamento ad hook
vtMove = ptNearestHook - ptFixtHook vtMove = ptNearestHook - ptFixtHook
m_nUsedHookId = nNearestHookId m_nUsedHookId = nNearestHookId
' Segno hook come utilizzato ' segno hook come utilizzato
SetHookUsed(m_nUsedHookId, nMoveId, True) SetHookUsed(m_nUsedHookId, nMoveId, True)
'EgtSetInfo(m_nUsedHookId, USED, nMoveId)
Return True Return True
End Function End Function
' Funzioni gestione tabella degli Hook ' funzione di debug
Private Shared Function AddOneHookData( nHookId As Integer, sParent As String, bParentAxis As Boolean) As Boolean Private Shared Sub DebugHookInfo()
Dim sHook As String = "" ' salvo in outlog tutte le info sugli hook per poter debuggare
EgtGetName( nHookId, sHook) ' cerco id tavola
Dim sGrParentAxis As String = ""
If bParentAxis Then
Dim nIdGrParent As Integer = EgtGetParent( EgtGetParent( nHookId))
Dim sParentName As String = ""
If EgtGetName( nIdGrParent, sParentName) AndAlso EgtGetAxisId( sParentName) = nIdGrParent Then
sGrParentAxis = sParentName
End If
End If
Dim nClass As Integer = 0
EgtGetInfo(nHookId, CLASS_, nClass)
Dim nType As Integer = EgtGetType( nHookId)
If nType = GDB_TY.GEO_POINT Then
Dim ptP As Point3d
EgtStartPoint( nHookId, GDB_ID.ROOT, ptP)
Dim hdCurr As New HookData( sHook, sParent, bParentAxis, sGrParentAxis, nHookId, ptP, nClass)
m_vHookData.Add( hdCurr)
Return True
Else If nType = GDB_TY.CRV_LINE Then
Dim ptP1 As Point3d
EgtStartPoint( nHookId, GDB_ID.ROOT, ptP1)
Dim ptP2 As Point3d
EgtEndPoint( nHookId, GDB_ID.ROOT, ptP2)
Dim hdCurr As New HookData( sHook, sParent, bParentAxis, sGrParentAxis, nHookId, ptP1, ptP2, nClass)
m_vHookData.Add( hdCurr)
Return True
End If
Return False
End Function
Private Shared Sub PrepareHookData()
' Pulisco lista di Hook
m_vHookData.Clear()
' Recupero Id tavola corrente
Dim sTableName As String = "" Dim sTableName As String = ""
EgtGetTableName(sTableName) EgtGetTableName(sTableName)
Dim nTableId As Integer = EgtGetTableId(sTableName) Dim nTableId As Integer = EgtGetTableId(sTableName)
' *** Cerco hook su tavola *** ' cerco hook su tavola macchina
Dim nTableSolidId As Integer = EgtGetFirstNameInGroup(nTableId, SOLID) Dim nTableSolidId As Integer = EgtGetFirstNameInGroup(nTableId, SOLID)
Dim nCurrHookId As Integer = EgtGetFirstNameInGroup(nTableSolidId, HOOK) Dim nCurrHookId As Integer = EgtGetFirstNameInGroup(nTableSolidId, HOOK)
EgtOutLog("TABLE")
While nCurrHookId <> GDB_ID.NULL While nCurrHookId <> GDB_ID.NULL
AddOneHookData( nCurrHookId, SOLID, False) Dim sUsed As String = ""
EgtGetInfo(nCurrHookId, USED, sUsed)
EgtOutLog(nCurrHookId & " -> " & sUsed)
nCurrHookId = EgtGetNextName(nCurrHookId, HOOK) nCurrHookId = EgtGetNextName(nCurrHookId, HOOK)
End While End While
' *** Cerco hook su barre fisse *** ' cerco hook su barra fissa
EgtOutLog("FIXED")
Dim nTableFixedId As Integer = EgtGetFirstNameInGroup(nTableId, FIXED) Dim nTableFixedId As Integer = EgtGetFirstNameInGroup(nTableId, FIXED)
While nTableFixedId <> GDB_ID.NULL
Dim sName As String = ""
EgtGetName( nTableFixedId, sName)
nCurrHookId = EgtGetFirstNameInGroup(nTableFixedId, HOOK) nCurrHookId = EgtGetFirstNameInGroup(nTableFixedId, HOOK)
While nCurrHookId <> GDB_ID.NULL While nCurrHookId <> GDB_ID.NULL
AddOneHookData( nCurrHookId, sName, False) Dim sUsed As String = ""
EgtGetInfo(nCurrHookId, USED, sUsed)
EgtOutLog(nCurrHookId & " -> " & sUsed)
nCurrHookId = EgtGetNextName(nCurrHookId, HOOK) nCurrHookId = EgtGetNextName(nCurrHookId, HOOK)
End While End While
nTableFixedId = EgtGetNextName(nTableFixedId, FIXED) ' cerco hook su barre mobili
End While Dim nMobileInd As Integer = 1
' *** Cerco hook su barre mobili *** Dim nMobile As Integer = EgtGetFirstNameInGroup(nTableId, MOBILE & nMobileInd)
Dim nBarId As Integer = EgtGetFirstGroupInGroup(nTableId) While nMobile <> GDB_ID.NULL
While nBarId <> GDB_ID.NULL EgtOutLog("MOBILE" & nMobile)
Dim sBarName As String = "" nCurrHookId = EgtGetFirstNameInGroup(nMobile, HOOK)
If EgtGetName( nBarId, sBarName) AndAlso EgtGetAxisId( sBarName) = nBarId Then
nCurrHookId = EgtGetFirstNameInGroup(nBarId, HOOK)
While nCurrHookId <> GDB_ID.NULL While nCurrHookId <> GDB_ID.NULL
AddOneHookData( nCurrHookId, sBarName, True) Dim sUsed As String = ""
EgtGetInfo(nCurrHookId, USED, sUsed)
EgtOutLog(nCurrHookId & " -> " & sUsed)
nCurrHookId = EgtGetNextName(nCurrHookId, HOOK) nCurrHookId = EgtGetNextName(nCurrHookId, HOOK)
End While End While
' Cerco su eventuali carrelli nMobileInd += 1
Dim nCharId As Integer = EgtGetFirstGroupInGroup(nBarId) nMobile = EgtGetFirstNameInGroup(nTableId, MOBILE & nMobileInd)
While nCharId <> GDB_ID.NULL
Dim sCharName As String = ""
If EgtGetName( nCharId, sCharName) AndAlso EgtGetAxisId( sCharName) = nCharId Then
nCurrHookId = EgtGetFirstNameInGroup(nCharId, DispositionUtility.HOOK)
While nCurrHookId <> GDB_ID.NULL
AddOneHookData( nCurrHookId, sCharName, True)
nCurrHookId = EgtGetNextName(nCurrHookId, HOOK)
End While
End If
nCharId = EgtGetNextGroup(nCharId)
End While
End If
nBarId = EgtGetNextGroup(nBarId)
End While End While
End Sub End Sub
Private Shared Sub PrepareHookedFixtures() ' funzioni che leggono e settano le ventose agganciate agli hook
' Ciclo su tutte le fixtures in tavola Private Shared Function GetHookUsed(nHookId As Integer, nFixtureId As Integer, nFixtureUsed As Integer) As Boolean
Dim nFixtId As Integer = EgtGetFirstFixture() ' cerco punto hook sulla ventosa
While nFixtId <> GDB_ID.NULL Dim nFixtSolidId As Integer = EgtGetFirstNameInGroup(nFixtureId, SOLID)
Dim nHookId As Integer = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( nFixtId, SOLID), HOOK) Dim nFixtHookId As Integer = EgtGetFirstNameInGroup(nFixtSolidId, HOOK)
Dim ptP As Point3d ' leggo tipo e classe
If EgtStartPoint( nHookId, GDB_ID.ROOT, ptP) Then Dim nFixtHookType As HOOKTYPE = HOOKTYPE.FREE
For Each hkCurr As HookData In m_vHookData Dim sType As String = ""
If hkCurr.m_nType = HOOKTYPE.POINT Then EgtGetInfo(nFixtHookId, TYPE, sType)
If Point3d.SqDistXY( ptP, hkCurr.m_ptP1) < 1 Then If sType.Equals(POINT) Then
hkCurr.m_nHooked = nFixtId nFixtHookType = HOOKTYPE.POINT
Exit For ElseIf sType.Equals(LINE) Then
End If nFixtHookType = HOOKTYPE.LINE
ElseIf hkCurr.m_nType = HOOKTYPE.LINE Then Else 'FREE
Dim dSqDist As Double = Point3d.SqDistXY( ptP, DistPointSegment( ptP, hkCurr.m_ptP1, hkCurr.m_ptP2)) nFixtHookType = HOOKTYPE.FREE
If dSqDist < 1 Then ' esco perchè non devo cercare alcun punto
AddHookUsed( hkCurr.m_nId, nFixtId)
Exit For
End If
End If
Next
End If
nFixtId = EgtGetNextFixture( nFixtId)
End While
End Sub
Friend Shared Sub InitHookData()
' Carico i dati degli agganci
PrepareHookData()
' Determino eventuali fixtures agganciate
PrepareHookedFixtures()
' Log di debug
If Map.refMainWindowVM.DebugLevel() >= 4 then
EgtOutLog( " *** HOOK DATA TABLE ***")
Dim sCurrParent As String = ""
For Each hkCurr As HookData In m_vHookData
If hkCurr.m_sParent <> sCurrParent Then
sCurrParent = hkCurr.m_sParent
If String.IsNullOrWhiteSpace( hkCurr.m_sGrParentAxis) Then
EgtOutLog( sCurrParent & If( hkCurr.m_bParentAxis, " Axis", " Fixed"))
Else
EgtOutLog( sCurrParent & " (" & hkCurr.m_sGrParentAxis & ") Axis")
End If
End If
If hkCurr.m_nType = HOOKTYPE.POINT Then
EgtOutLog( " " & hkCurr.m_sName & " (" & hkCurr.m_nId &
") Point(" & hkCurr.m_ptP1.ToString() & ") Class=" & hkCurr.m_nClass &
If( hkCurr.m_nHooked = GDB_ID.NULL, " Free", " Fixt " & hkCurr.m_nHooked))
Else If hkCurr.m_nType = HOOKTYPE.LINE Then
EgtOutLog( " " & hkCurr.m_sName & " (" & hkCurr.m_nId &
") Line(" & hkCurr.m_ptP1.ToString() & "),(" & hkCurr.m_ptP2.ToString() & ") Class=" & hkCurr.m_nClass &
If( String.IsNullOrWhiteSpace( hkCurr.m_sHooked), " Free", " Fixt " & hkCurr.m_sHooked))
End If
Next
End If
End Sub
Friend Shared Function GetHookClass( nHookId As Integer) As Integer
For Each hkCurr As HookData In m_vHookData
If hkCurr.m_nId = nHookId Then Return hkCurr.m_nClass
Next
Return -1
End Function
Friend Shared Function GetIsHookUsed( nHookId As Integer) As Boolean
For Each hkCurr As HookData In m_vHookData
If hkCurr.m_nId = nHookId Then
If hkCurr.m_nType = HOOKTYPE.POINT Then
Return ( hkCurr.m_nHooked <> GDB_ID.NULL)
Else
Return Not String.IsNullOrWhiteSpace( hkCurr.m_sHooked)
End If
End If
Next
Return True
End Function
Friend Shared Function GetHookUsed( nHookId As Integer, nFixtureId As Integer) As Integer
For Each hkCurr As HookData In m_vHookData
If hkCurr.m_nId = nHookId Then
If hkCurr.m_nType = HOOKTYPE.POINT Then
If hkCurr.m_nHooked = nFixtureId then
Return hkCurr.m_nHooked
End If
Else
Dim sFixtureId As String = nFixtureId.ToString & ";"
If hkCurr.m_sHooked.IndexOf( sFixtureId) <> -1 Then
Return nFixtureId
End If
End If
Return GDB_ID.NULL
End If
Next
Return GDB_ID.NULL
End Function
Friend Shared Function SetHookUsed( nHookId As Integer, nFixtureId As Integer) As Boolean
' Rimuovo da eventuale precedente aggancio
RemoveFixtureFromHook( nFixtureId)
' Inserisco in nuovo aggancio
For Each hkCurr As HookData In m_vHookData
If hkCurr.m_nId = nHookId Then
If hkCurr.m_nType = HOOKTYPE.POINT Then
m_nPrevFixtureId = hkCurr.m_nHooked
hkCurr.m_nHooked = nFixtureId
Return True
Else
Return False Return False
End If End If
End If Select Case nFixtHookType
Next Case HOOKTYPE.POINT
Return False Return EgtGetInfo(m_nUsedHookId, USED, nFixtureUsed)
End Function Case HOOKTYPE.LINE
Dim sInfo As String = String.Empty
Friend Shared Function ResetHookUsed( nHookId As Integer) As Boolean EgtGetInfo(m_nUsedHookId, USED, sInfo)
For Each hkCurr As HookData In m_vHookData Dim SplitInfo() As String = sInfo.Split(";"c)
If hkCurr.m_nId = nHookId Then For Each Info In SplitInfo
If hkCurr.m_nType = HOOKTYPE.POINT Then
hkCurr.m_nHooked = GDB_ID.NULL
Return True
Else
Return False
End If
End If
Next
Return False
End Function
Friend Shared Function AddHookUsed( nHookId As Integer, nFixtureId As Integer) As Boolean
' Rimuovo da eventuale precedente aggancio
RemoveFixtureFromHook( nFixtureId)
' Inserisco in nuovo aggancio
For Each hkCurr As HookData In m_vHookData
If hkCurr.m_nId = nHookId Then
If hkCurr.m_nType = HOOKTYPE.POINT Then
Return False
Else
' Verifico non sia già presente
Dim SplitInfo() As String = hkCurr.m_sHooked.Split(";"c)
For Each sInfo As String In SplitInfo
Dim nInfo As Integer = GDB_ID.NULL Dim nInfo As Integer = GDB_ID.NULL
Integer.TryParse(sInfo, nInfo) Integer.TryParse(sInfo, nInfo)
If nInfo = nFixtureId Then Return True If nInfo = nFixtureId Then Return True
Next Next
' Lo aggiungo
hkCurr.m_sHooked &= nFixtureId.ToString() & ";"
Return True
End If
End If
Next
Return False Return False
Case Else
Return False
End Select
End Function End Function
Friend Shared Function RemoveHookUsed( nHookId As Integer, nFixtureId As Integer) As Boolean
For Each hkCurr As HookData In m_vHookData
If hkCurr.m_nId = nHookId Then
If hkCurr.m_nType = HOOKTYPE.POINT Then
Return False
Else
' Se lo trovo, lo tolgo dall'elenco
Dim SplitInfo() As String = hkCurr.m_sHooked.Split(";"c)
hkCurr.m_sHooked = ""
For Each sInfo As String In SplitInfo
Dim nInfo As Integer
If Integer.TryParse(sInfo, nInfo) AndAlso nInfo <> nFixtureId Then
hkCurr.m_sHooked &= sInfo & ";"
End If
Next
Return True
End If
End If
Next
Return False
End Function
Friend Shared Function RemoveFixtureFromHook( nFixtureId As Integer) As Boolean
Dim sFixtureId As String = nFixtureId.ToString & ";"
For Each hkCurr As HookData In m_vHookData
If hkCurr.m_nType = HOOKTYPE.POINT Then
If hkCurr.m_nHooked = nFixtureId Then
hkCurr.m_nHooked = GDB_ID.NULL
Return True
End If
Else
Dim nInd As Integer = hkCurr.m_sHooked.IndexOf( sFixtureId)
If nInd <> -1 Then
hkCurr.m_sHooked = hkCurr.m_sHooked.Remove( nInd, sFixtureId.Length())
Return True
End If
End If
Next
Return False
End Function
Private Shared Function UpdateFixturesForDispAxisMove( sName As String, vtMove As Vector3d) As Boolean
For Each hkCurr As HookData In m_vHookData
If hkCurr.m_sParent = sName OrElse hkCurr.m_sGrParentAxis = sName Then
' Aggiorno posizione di aggancio
If hkCurr.m_nType = HOOKTYPE.POINT Then
hkCurr.m_ptP1 += vtMove
Else ' HOOKTYPE.LINE
hkCurr.m_ptP1 += vtMove
hkCurr.m_ptP2 += vtMove
End If
' Sposto anche eventuali ventosa/e agganciata/e
If hkCurr.m_nType = HOOKTYPE.POINT Then
If hkCurr.m_nHooked <> GDB_ID.NULL Then EgtMoveFixture( hkCurr.m_nHooked, vtMove)
Else ' HOOKTYPE.LINE
Dim SplitInfo() As String = hkCurr.m_sHooked.Split(";"c)
For Each sInfo As String In SplitInfo
Dim nInfo As Integer = GDB_ID.NULL
If Integer.TryParse(sInfo, nInfo) Then
EgtMoveFixture( nInfo, vtMove)
End If
Next
End If
End If
Next
Return True
End Function
' Funzioni che leggono e settano le ventose agganciate agli hook
Private Shared Sub SetHookUsed(nHookId As Integer, nFixtureId As Integer, bUsed As Boolean) Private Shared Sub SetHookUsed(nHookId As Integer, nFixtureId As Integer, bUsed As Boolean)
' cerco punto hook sulla ventosa ' cerco punto hook sulla ventosa
Dim nFixtSolidId As Integer = EgtGetFirstNameInGroup(nFixtureId, SOLID) Dim nFixtSolidId As Integer = EgtGetFirstNameInGroup(nFixtureId, SOLID)
@@ -1107,67 +796,85 @@ Public NotInheritable Class DispositionUtility
Select Case nFixtHookType Select Case nFixtHookType
Case HOOKTYPE.POINT Case HOOKTYPE.POINT
If bUsed Then If bUsed Then
SetHookUsed(nHookId, nFixtureId) EgtSetInfo(m_nUsedHookId, USED, nFixtureId)
Else Else
ResetHookUsed(nHookId) EgtRemoveInfo(m_nUsedHookId, USED)
End If End If
Case HOOKTYPE.LINE Case HOOKTYPE.LINE
If bUsed Then If bUsed Then
AddHookUsed( nHookId, nFixtureId) Dim sInfo As String = String.Empty
EgtGetInfo(m_nUsedHookId, USED, sInfo)
Dim SplitInfo() As String = sInfo.Split(";"c)
For Each Info In SplitInfo
Dim nInfo As Integer = GDB_ID.NULL
Integer.TryParse(sInfo, nInfo)
If nInfo = nFixtureId Then Return
Next
sInfo = sInfo & nFixtureId & ";"
EgtSetInfo(m_nUsedHookId, USED, sInfo)
Else Else
RemoveHookUsed( nHookId, nFixtureId) Dim sInfo As String = String.Empty
EgtGetInfo(m_nUsedHookId, USED, sInfo)
Dim SplitInfo() As String = sInfo.Split(";"c)
sInfo = ""
For Each Info In SplitInfo
Dim nInfo As Integer = GDB_ID.NULL
Integer.TryParse(sInfo, nInfo)
If nInfo <> nFixtureId Then
sInfo = sInfo & Info & ";"
End If
Next
EgtSetInfo(m_nUsedHookId, USED, sInfo)
End If End If
End Select End Select
End Sub End Sub
' Funzione che analizza gli hook ' Funzione che analizza gli hook
Private Shared Sub HookAnalyzer(nCurrHookId As Integer, nFixtHookType As Integer, nFixtHookClass As Integer, Private Shared Sub HookAnalyzer(nCurrHookId As Integer, nFixtHookType As Integer, nFixtHookClass As Integer, ptFixtHook As Point3d, ByRef nNearestHookId As Integer, ByRef dNearestHookDist As Double, ByRef ptNearestHook As Point3d, nMoveId As Integer)
ptFixtHook As Point3d, nMoveId As Integer, ' verifico se del tipo giusto
ByRef nNearestHookId As Integer, ByRef dNearestHookDist As Double, ByRef ptNearestHook As Point3d)
' Verifico se del tipo giusto
Dim nTableHookType As GDB_TY = EgtGetType(nCurrHookId) Dim nTableHookType As GDB_TY = EgtGetType(nCurrHookId)
If Not (nTableHookType = GDB_TY.GEO_POINT And nFixtHookType = HOOKTYPE.POINT) AndAlso If (nTableHookType = GDB_TY.GEO_POINT And nFixtHookType = HOOKTYPE.POINT) OrElse (nTableHookType = GDB_TY.CRV_LINE And nFixtHookType = HOOKTYPE.LINE) Then
Not (nTableHookType = GDB_TY.CRV_LINE And nFixtHookType = HOOKTYPE.LINE) Then ' verifico se della stessa classe
Return Dim nTableHookClass As Integer = 0
End If EgtGetInfo(nCurrHookId, CLASS_, nTableHookClass)
If nTableHookClass = nFixtHookClass Then
' Verifico se della stessa classe
Dim nTableHookClass As Integer = GetHookClass( nCurrHookId)
If nTableHookClass <> nFixtHookClass Then
Return
End If
Dim dDist As Double = 0 Dim dDist As Double = 0
' punto a distanza minima sull'hook ' punto a distanza minima sull'hook
Dim ptCurrHook As Point3d Dim ptCurrHook As Point3d
If nTableHookType = GDB_TY.GEO_POINT Then If nTableHookType = GDB_TY.GEO_POINT Then
' verifico se utilizzato ' verifico se utilizzato
Dim nTableHookUsed As Integer = GetHookUsed( nCurrHookId, nMoveId) Dim nTableHookUsed As Integer = GDB_ID.NULL
If nTableHookUsed <> GDB_ID.NULL AndAlso nTableHookUsed <> nMoveId Then If EgtGetInfo(nCurrHookId, USED, nTableHookUsed) AndAlso nTableHookUsed <> nMoveId Then Return
Return
End If
If nTableHookUsed = nMoveId Then If nTableHookUsed = nMoveId Then
SetHookUsed(nCurrHookId, nMoveId, False) SetHookUsed(nCurrHookId, nMoveId, False)
'EgtRemoveInfo(nCurrHookId, USED)
m_nPrevUsedHookId = nCurrHookId m_nPrevUsedHookId = nCurrHookId
End If End If
' calcolo distanza punto hook tavola dal punto hook della ventosa ' calcolo distanza punto hook tavola dal punto hook della ventosa
EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook) EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook)
dDist = Point3d.DistXY(ptCurrHook, ptFixtHook) dDist = Point3d.Dist(ptCurrHook, ptFixtHook)
'If nTableHookUsed <> nMoveId Then
' ' calcolo distanza punto hook tavola dal punto hook della ventosa
' EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook)
' dDist = Point3d.Dist(ptCurrHook, ptFixtHook)
'Else
' EgtRemoveInfo(nCurrHookId, USED)
' m_nPrevUsedHookId = nCurrHookId
' Return
'End If
'If Not EgtGetInfo(nCurrHookId, USED, nTableHookUsed) Or nTableHookUsed = nMoveId Then
' ' calcolo distanza punto hook tavola dal punto hook della ventosa
' EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook)
' dDist = Point3d.Dist(ptCurrHook, ptFixtHook)
'Else
' Return
'End If
ElseIf nTableHookType = GDB_TY.CRV_LINE Then ElseIf nTableHookType = GDB_TY.CRV_LINE Then
' verifico se utilizzato
Dim nTableHookUsed As Integer = GetHookUsed( nCurrHookId, nMoveId)
If nTableHookUsed <> GDB_ID.NULL AndAlso nTableHookUsed <> nMoveId Then
Return
End If
If nTableHookUsed = nMoveId Then
SetHookUsed(nCurrHookId, nMoveId, False)
m_nPrevUsedHookId = nCurrHookId
End If
' calcolo distanza linea hook tavola dal punto hook della ventosa ' calcolo distanza linea hook tavola dal punto hook della ventosa
Dim ptL1 As Point3d : EgtStartPoint( nCurrHookId, GDB_ID.ROOT, ptL1) Dim nRefId As Integer = 0
Dim ptL2 As Point3d : EgtEndPoint( nCurrHookId, GDB_ID.ROOT, ptL2) Dim dU As Double = 0
ptCurrHook = DistPointSegment( ptFixtHook, ptL1, ptL2) EgtPointCurveDist(ptFixtHook, nCurrHookId, nRefId, dDist, dU)
dDist = Point3d.DistXY( ptFixtHook, ptCurrHook) EgtAtParamPoint(nCurrHookId, dU, GDB_ID.ROOT, ptCurrHook)
Else Else
Return Return
End If End If
@@ -1177,6 +884,12 @@ Public NotInheritable Class DispositionUtility
dNearestHookDist = dDist dNearestHookDist = dDist
ptNearestHook = ptCurrHook ptNearestHook = ptCurrHook
End If End If
Else
Return
End If
Else
Return
End If
End Sub End Sub
' Funzione che fissa il vettore di hook ' Funzione che fissa il vettore di hook
@@ -1187,7 +900,7 @@ Public NotInheritable Class DispositionUtility
' recupero punto di hook ' recupero punto di hook
Dim ptFixtHook As Point3d Dim ptFixtHook As Point3d
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook) EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
m_vtHook = ptFixtHook - ptCurr m_vtHook = ptCurr - ptFixtHook
End Sub End Sub
' Funzione che restituisce il tipo di sottopezzo passatogli ' Funzione che restituisce il tipo di sottopezzo passatogli
@@ -5,6 +5,8 @@ Imports EgtUILib
Public Class FixtureParametersVM Public Class FixtureParametersVM
Inherits ViewModelBase Inherits ViewModelBase
Friend Const USED As String = "USED"
Private m_FixtureTypeList As ObservableCollection(Of FixtureListItem) Private m_FixtureTypeList As ObservableCollection(Of FixtureListItem)
Public ReadOnly Property FixtureTypeList As ObservableCollection(Of FixtureListItem) Public ReadOnly Property FixtureTypeList As ObservableCollection(Of FixtureListItem)
Get Get
@@ -120,33 +122,25 @@ Public Class FixtureParametersVM
OnPropertyChanged("FixtureErrorMsg") OnPropertyChanged("FixtureErrorMsg")
Return Return
End If End If
' dimensioni tavola
Dim vtTabDim As Vector3d = ptTableMax - ptTableMin
' calcolo il centro della tavola ' calcolo il centro della tavola
Dim ptTableMid As Point3d = Point3d.ORIG() + 0.5 * vtTabDim Dim ptTableMid As New Point3d((ptTableMax.x - ptTableMin.x) / 2, (ptTableMax.y - ptTableMin.y) / 2, (ptTableMax.z - ptTableMin.z) / 2)
' posiziono il nuovo sottopezzo al centro della tavola ' posiziono il nuovo sottopezzo al centro della tavola
Dim nAddedFixtureId As Integer = EgtAddFixture(SelectedFixture.Name, ptTableMid, 0, 20) Dim nAddedFixtureId As Integer = EgtAddFixture(SelectedFixture.Name, ptTableMid, 0, 0)
If nAddedFixtureId = GDB_ID.NULL Then If nAddedFixtureId = GDB_ID.NULL Then
m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola" m_FixtureErrorMsg = "Impossibile posizionare la ventosa sulla tavola"
OnPropertyChanged("FixtureErrorMsg") OnPropertyChanged("FixtureErrorMsg")
Return Return
End If End If
' Se la ventosa ha punti di hook da ancorare ' verifico se la ventosa ha punti di hook da ancorare
If IsFixtureWithHook(nAddedFixtureId) Then If IsFixtureWithHook(nAddedFixtureId) Then
If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
EgtMoveFixture( nAddedFixtureId, 0.2 * vtTabDim.y * Vector3d.Y_AX())
If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
EgtMoveFixture( nAddedFixtureId, 0.2 * vtTabDim.y * Vector3d.Y_AX())
If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then If Not PositionFixtureOnNearestHook(nAddedFixtureId) Then
' non ci sono punti liberi, quindi rimuovo la ventosa e segnalo ' non ci sono punti liberi, quindi rimuovo la ventosa e segnalo
EgtRemoveFixture(nAddedFixtureId) EgtRemoveFixture(nAddedFixtureId)
MessageBox.Show("No free hook point!", "ERROR") MessageBox.Show("No free hook point!", "ERROR")
Return Return
End If End If
End If
End If
' altrimenti ventosa con movimento continuo
Else Else
' se non ha punti di ancoraggio
' verifico se è in una posizione valida ' verifico se è in una posizione valida
If Not DispositionUtility.VerifyFixturePosition(nAddedFixtureId, New Vector3d) Then If Not DispositionUtility.VerifyFixturePosition(nAddedFixtureId, New Vector3d) Then
' se non trovo una posizione valida, esco ' se non trovo una posizione valida, esco
@@ -245,7 +239,9 @@ Public Class FixtureParametersVM
' leggo tipo ' leggo tipo
Dim sType As String = "" Dim sType As String = ""
EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType) EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType)
If sType.Equals(DispositionUtility.POINT) Then If sType.Equals(DispositionUtility.FREE) Then
Return False
ElseIf sType.Equals(DispositionUtility.POINT) Then
Return True Return True
ElseIf sType.Equals(DispositionUtility.LINE) Then ElseIf sType.Equals(DispositionUtility.LINE) Then
Return True Return True
@@ -254,7 +250,7 @@ Public Class FixtureParametersVM
End If End If
End Function End Function
' Funzione che cerca un hook libero adatto alla ventosa e se trovato la posiziona ' Funzione che aggancia la ventosa al più vicino hook libero
Friend Shared Function PositionFixtureOnNearestHook(nFixtureId As Integer) As Boolean Friend Shared Function PositionFixtureOnNearestHook(nFixtureId As Integer) As Boolean
' cerco punto hook sulla ventosa ' cerco punto hook sulla ventosa
Dim nFixtSolidId As Integer = EgtGetFirstNameInGroup(nFixtureId, SOLID) Dim nFixtSolidId As Integer = EgtGetFirstNameInGroup(nFixtureId, SOLID)
@@ -266,21 +262,26 @@ Public Class FixtureParametersVM
Dim nFixtHookType As DispositionUtility.HOOKTYPE = DispositionUtility.HOOKTYPE.FREE Dim nFixtHookType As DispositionUtility.HOOKTYPE = DispositionUtility.HOOKTYPE.FREE
Dim sType As String = "" Dim sType As String = ""
EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType) EgtGetInfo(nFixtHookId, DispositionUtility.TYPE, sType)
If sType.Equals(DispositionUtility.POINT) Then If sType.Equals(DispositionUtility.FREE) Then
nFixtHookType = DispositionUtility.HOOKTYPE.FREE
' esco perchè non devo cercare alcun punto
Return True
ElseIf sType.Equals(DispositionUtility.POINT) Then
nFixtHookType = DispositionUtility.HOOKTYPE.POINT nFixtHookType = DispositionUtility.HOOKTYPE.POINT
ElseIf sType.Equals(DispositionUtility.LINE) Then ElseIf sType.Equals(DispositionUtility.LINE) Then
nFixtHookType = DispositionUtility.HOOKTYPE.LINE nFixtHookType = DispositionUtility.HOOKTYPE.LINE
Else Else
nFixtHookType = DispositionUtility.HOOKTYPE.FREE
' esco perchè non devo cercare alcun punto ' esco perchè non devo cercare alcun punto
Return True Return True
End If End If
Dim nFixtHookClass As Integer = 0 Dim nFixtHookClass As Integer = 0
EgtGetInfo(nFixtHookId, DispositionUtility.CLASS_, nFixtHookClass) EgtGetInfo(nFixtHookId, DispositionUtility.CLASS_, nFixtHookClass)
' Recupero Id tavola corrente ' cerco id tavola
Dim sTableName As String = "" Dim sTableName As String = ""
EgtGetTableName(sTableName) EgtGetTableName(sTableName)
Dim nTableId As Integer = EgtGetTableId(sTableName) Dim nTableId As Integer = EgtGetTableId(sTableName)
' *** Cerco hook su tavola *** ' cerco hook su tavola macchina
Dim nTableSolidId As Integer = EgtGetFirstNameInGroup(nTableId, SOLID) Dim nTableSolidId As Integer = EgtGetFirstNameInGroup(nTableId, SOLID)
Dim nCurrHookId As Integer = EgtGetFirstNameInGroup(nTableSolidId, DispositionUtility.HOOK) Dim nCurrHookId As Integer = EgtGetFirstNameInGroup(nTableSolidId, DispositionUtility.HOOK)
' Punto di hook a cui spostare la ventosa ' Punto di hook a cui spostare la ventosa
@@ -292,21 +293,14 @@ Public Class FixtureParametersVM
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook) EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
' verifico se è in una posizione valida ' verifico se è in una posizione valida
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
If nFixtHookType = DispositionUtility.HOOKTYPE.POINT then EgtSetInfo(nCurrHookId, used, nFixtureId)
DispositionUtility.SetHookUsed( nCurrHookId, nFixtureId)
Else
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
End If
Return True Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
End If End If
End If End If
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK) nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
End While End While
' *** Cerco hook su barre fisse *** ' cerco hook su barra fissa
Dim nTableFixedId As Integer = EgtGetFirstNameInGroup(nTableId, DispositionUtility.FIXED) Dim nTableFixedId As Integer = EgtGetFirstNameInGroup(nTableId, DispositionUtility.FIXED)
While nTableFixedId <> GDB_ID.NULL
nCurrHookId = EgtGetFirstNameInGroup(nTableFixedId, DispositionUtility.HOOK) nCurrHookId = EgtGetFirstNameInGroup(nTableFixedId, DispositionUtility.HOOK)
While nCurrHookId <> GDB_ID.NULL While nCurrHookId <> GDB_ID.NULL
' se punto di aggancio valido ' se punto di aggancio valido
@@ -315,52 +309,17 @@ Public Class FixtureParametersVM
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook) EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
' verifico se è in una posizione valida ' verifico se è in una posizione valida
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
If nFixtHookType = DispositionUtility.HOOKTYPE.POINT then EgtSetInfo(nCurrHookId, USED, nFixtureId)
DispositionUtility.SetHookUsed( nCurrHookId, nFixtureId)
Else
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
End If
Return True Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
End If End If
End If End If
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK) nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
End While End While
nTableFixedId = EgtGetNextName( nTableFixedId, DispositionUtility.FIXED) ' cerco hook su barre mobili
End While Dim nMobileInd As Integer = 1
' *** Cerco hook su barre mobili *** Dim nMobile As Integer = EgtGetFirstNameInGroup(nTableId, DispositionUtility.MOBILE & nMobileInd)
Dim nBarId As Integer = EgtGetFirstGroupInGroup(nTableId) While nMobile <> GDB_ID.NULL
While nBarId <> GDB_ID.NULL nCurrHookId = EgtGetFirstNameInGroup(nMobile, DispositionUtility.HOOK)
Dim sBarName As String = ""
If EgtGetName( nBarId, sBarName) AndAlso EgtGetAxisId( sBarName) <> GDB_ID.NULL Then
nCurrHookId = EgtGetFirstNameInGroup(nBarId, DispositionUtility.HOOK)
While nCurrHookId <> GDB_ID.NULL
' se punto di aggancio valido
If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then
' sposto la ventosa
Dim vtMove As Vector3d = ptCurrHook - ptFixtHook
EgtMoveFixture(nFixtureId, vtMove)
' verifico se è in una posizione valida
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
If nFixtHookType = DispositionUtility.HOOKTYPE.POINT then
DispositionUtility.SetHookUsed( nCurrHookId, nFixtureId)
Else
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
End If
Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
End If
End If
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
End While
' Cerco su eventuali carrelli
Dim nCharId As Integer = EgtGetFirstGroupInGroup(nBarId)
While nCharId <> GDB_ID.NULL
Dim sCharName As String = ""
If EgtGetName( nCharId, sCharName) AndAlso EgtGetAxisId( sCharName) <> GDB_ID.NULL Then
nCurrHookId = EgtGetFirstNameInGroup(nCharId, DispositionUtility.HOOK)
While nCurrHookId <> GDB_ID.NULL While nCurrHookId <> GDB_ID.NULL
' se punto di aggancio valido ' se punto di aggancio valido
If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then If HookAnalyzer(nCurrHookId, nFixtHookType, nFixtHookClass, ptFixtHook, ptCurrHook) Then
@@ -368,59 +327,47 @@ Public Class FixtureParametersVM
EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook) EgtMoveFixture(nFixtureId, ptCurrHook - ptFixtHook)
' verifico se è in una posizione valida ' verifico se è in una posizione valida
If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then If DispositionUtility.VerifyFixturePosition(nFixtureId, New Vector3d) Then
If nFixtHookType = DispositionUtility.HOOKTYPE.POINT then EgtSetInfo(nCurrHookId, USED, nFixtureId)
DispositionUtility.SetHookUsed( nCurrHookId, nFixtureId)
Else
DispositionUtility.AddHookUsed( nCurrHookId, nFixtureId)
End If
Return True Return True
Else
EgtStartPoint(nFixtHookId, GDB_ID.ROOT, ptFixtHook)
End If End If
End If End If
nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK) nCurrHookId = EgtGetNextName(nCurrHookId, DispositionUtility.HOOK)
End While End While
End If nMobileInd += 1
nCharId = EgtGetNextGroup(nCharId) nMobile = EgtGetFirstNameInGroup(nTableId, DispositionUtility.MOBILE & nMobileInd)
End While
End If
nBarId = EgtGetNextGroup(nBarId)
End While End While
Return False Return False
End Function End Function
' Funzione che analizza l'hook e se valido ne restituisce la posizione (punto) ' Funzione che analizza l'hook e se valido ne prestituisce lo posizione(punto)
Private Shared Function HookAnalyzer(nCurrHookId As Integer, nFixtHookType As Integer, nFixtHookClass As Integer, Private Shared Function HookAnalyzer(nCurrHookId As Integer, nFixtHookType As Integer, nFixtHookClass As Integer, ptFixtHook As Point3d, ByRef ptCurrHook As Point3d) As Boolean
ptFixtHook As Point3d, ByRef ptCurrHook As Point3d) As Boolean ' verifico se del tipo giusto
' Verifico se del tipo giusto
Dim nTableHookType As GDB_TY = EgtGetType(nCurrHookId) Dim nTableHookType As GDB_TY = EgtGetType(nCurrHookId)
If Not (nTableHookType = GDB_TY.GEO_POINT And nFixtHookType = DispositionUtility.HOOKTYPE.POINT) AndAlso If (nTableHookType = GDB_TY.GEO_POINT And nFixtHookType = DispositionUtility.HOOKTYPE.POINT) OrElse (nTableHookType = GDB_TY.CRV_LINE And nFixtHookType = DispositionUtility.HOOKTYPE.LINE) Then
Not (nTableHookType = GDB_TY.CRV_LINE And nFixtHookType = DispositionUtility.HOOKTYPE.LINE) Then ' verifico se della stessa classe
Return False Dim nTableHookClass As Integer = 0
End If EgtGetInfo(nCurrHookId, DispositionUtility.CLASS_, nTableHookClass)
If nTableHookClass = nFixtHookClass Then
' Verifico se della stessa classe
Dim nTableHookClass As Integer = DispositionUtility.GetHookClass( nCurrHookId)
If nTableHookClass <> nFixtHookClass Then
Return False
End If
Dim dDist As Double = 0 Dim dDist As Double = 0
' punto a distanza minima sull'hook ' punto a distanza minima sull'hook
If nTableHookType = GDB_TY.GEO_POINT Then If nTableHookType = GDB_TY.GEO_POINT Then
' verifico se utilizzato ' verifico se utilizzato
If Not DispositionUtility.GetIsHookUsed( nCurrHookId) Then Dim nTableHookUsed As Boolean = False
If Not EgtGetInfo(nCurrHookId, DispositionUtility.USED, nTableHookUsed) Then
' calcolo distanza punto hook tavola dal punto hook della ventosa ' calcolo distanza punto hook tavola dal punto hook della ventosa
EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook) EgtStartPoint(nCurrHookId, GDB_ID.ROOT, ptCurrHook)
Return True Return True
End If End If
ElseIf nTableHookType = GDB_TY.CRV_LINE Then ElseIf nTableHookType = GDB_TY.CRV_LINE Then
' calcolo distanza linea hook tavola dal punto hook della ventosa ' calcolo distanza linea hook tavola dal punto hook della ventosa
Dim ptL1 As Point3d : EgtStartPoint( nCurrHookId, GDB_ID.ROOT, ptL1) Dim nRefId As Integer = 0
Dim ptL2 As Point3d : EgtEndPoint( nCurrHookId, GDB_ID.ROOT, ptL2) Dim dU As Double = 0
ptCurrHook = DispositionUtility.DistPointSegment( ptFixtHook, ptL1, ptL2) EgtPointCurveDist(ptFixtHook, nCurrHookId, nRefId, dDist, dU)
EgtAtParamPoint(nCurrHookId, dU, GDB_ID.ROOT, ptCurrHook)
Return True Return True
End If End If
End If
End If
Return False Return False
End Function End Function
@@ -449,7 +396,6 @@ Public Class FixtureParametersVM
Dim NextSelectedId As Integer = EgtGetNextSelectedObj() Dim NextSelectedId As Integer = EgtGetNextSelectedObj()
If EgtVerifyFixture(SelectedFixtureId) Then If EgtVerifyFixture(SelectedFixtureId) Then
EgtRemoveFixture(SelectedFixtureId) EgtRemoveFixture(SelectedFixtureId)
DispositionUtility.RemoveFixtureFromHook( SelectedFixtureId)
For Index = 0 To FixtureTypeList.Count - 1 For Index = 0 To FixtureTypeList.Count - 1
Dim SelFixtureName As String = String.Empty Dim SelFixtureName As String = String.Empty
EgtGetName(SelectedFixtureId, SelFixtureName) EgtGetName(SelectedFixtureId, SelFixtureName)
@@ -109,34 +109,6 @@
Visibility="{Binding SysNotes_Visibility}" Visibility="{Binding SysNotes_Visibility}"
IsReadOnly="True"/> IsReadOnly="True"/>
</UniformGrid> </UniformGrid>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding InvertTxBl}"
ParamChBx="{Binding Path=Invert,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding WorkSideTxBl}"
ParamCmBxList="{Binding Path=WorkSideList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedWorkSide}"
Style="{DynamicResource ComboParamV_Margin}"/>
<UniformGrid Columns="2">
<TextBlock Text="{Binding UserNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding UserNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}">
<EgtWPFLib5:EgtTextBox.ToolTip>
<TextBlock Text="{Binding UserNotesTooltip}"/>
</EgtWPFLib5:EgtTextBox.ToolTip>
</EgtWPFLib5:EgtTextBox>
<TextBlock Text="{Binding SystemNotesTxBl}"
Style="{DynamicResource MPExpander_UserNotesTxBlMargin}"
Visibility="{Binding SysNotes_Visibility}"/>
<EgtWPFLib5:EgtTextBox Text="{Binding SystemNotes, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource MPExpander_UserNotesTxBxMargin}"
Visibility="{Binding SysNotes_Visibility}"
IsReadOnly="True"/>
</UniformGrid>
</StackPanel> </StackPanel>
<StackPanel Name="AutomaticCloseExpanderStackPanel"> <StackPanel Name="AutomaticCloseExpanderStackPanel">
<Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander" <Expander Header="{Binding GenericExpanderHeader}" Name="GenericExpander"
@@ -264,7 +236,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -294,43 +266,6 @@
</Grid> </Grid>
</Expander> </Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
ParamCmBxList="{Binding Path=LeadInTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadInType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding StartAddLenTxBl}"
ParamTxBx="{Binding Path=StartAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiTangTxBl}"
ParamTxBx="{Binding Path=LiTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiPerpTxBl}"
ParamTxBx="{Binding Path=LiPerp,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiElevTxBl}"
ParamTxBx="{Binding Path=LiElev,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LiCompLenTxBl}"
ParamTxBx="{Binding Path=LiCompLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}" <EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadInTypeTxBl}"
@@ -369,43 +304,6 @@
</StackPanel> </StackPanel>
</Expander> </Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
ParamCmBxList="{Binding Path=LeadOutTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadOutType}"
Style="{DynamicResource ComboParamV_Margin}"/>
</Expander.Header>
<StackPanel>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding EndAddLenTxBl}"
ParamTxBx="{Binding Path=EndAddLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoTangTxBl}"
ParamTxBx="{Binding Path=LoTang,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoPerpTxBl}"
ParamTxBx="{Binding Path=LoPerp,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoElevTxBl}"
ParamTxBx="{Binding Path=LoElev,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding LoCompLenTxBl}"
ParamTxBx="{Binding Path=LoCompLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}" <EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadOutTypeTxBl}"
@@ -444,53 +342,6 @@
</StackPanel> </StackPanel>
</Expander> </Expander>
<Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding LeaveTabTxBl}"
ParamChBx="{Binding Path=LeaveTab,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
Style="{DynamicResource CheckParamV_Margin}"/>
</Expander.Header>
<StackPanel Margin="2">
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TabLenTxBl}"
ParamTxBx="{Binding Path=TabLen,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabLenErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TabHeightTxBl}"
ParamTxBx="{Binding Path=TabHeight,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabHeightErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TabAngleTxBl}"
ParamTxBx="{Binding Path=TabAngle,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabAngleErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TabDistTxBl}"
ParamTxBx="{Binding Path=TabDist,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabDistErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TabMinTxBl}"
ParamTxBx="{Binding Path=TabMin,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabMinErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding TabMaxTxBl}"
ParamTxBx="{Binding Path=TabMax,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamErrorMsg="{Binding Path=TabMaxErrorMsg}"
Style="{DynamicResource StringParamV_Margin}"/>
</StackPanel>
</Expander>
<Expander Style="{StaticResource ExpanderStyle}"> <Expander Style="{StaticResource ExpanderStyle}">
<Expander.Header> <Expander.Header>
<EgtWPFLib5:CheckParamV ParamTxBl="{Binding LeaveTabTxBl}" <EgtWPFLib5:CheckParamV ParamTxBl="{Binding LeaveTabTxBl}"
@@ -224,7 +224,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -80,16 +80,4 @@ Public Class FiveAxisMachinigParameterExpanderV
Return TryCast(target, T) Return TryCast(target, T)
End Function End Function
Private Sub StackPanel_PreviewKeyDown(sender As Object, e As KeyEventArgs)
If e.Key = Key.Tab Then
Dim s As EgtWPFLib5.StringParamV = TryCast(e.OriginalSource, EgtWPFLib5.StringParamV)
If Not IsNothing(s) Then
s.MoveFocus(New TraversalRequest(FocusNavigationDirection.Next))
End If
e.Handled = True
End If
End Sub
End Class End Class
@@ -214,7 +214,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -126,16 +126,6 @@ Public Class MachiningParameterExpanderVM
m_SliderValue = 1 m_SliderValue = 1
NotifyPropertyChanged(NameOf(SliderValue)) NotifyPropertyChanged(NameOf(SliderValue))
End Sub End Sub
Friend Sub SetSliderValue(value As Integer)
Dim nOldSliderValue As Integer = m_SliderValue
m_SliderValue = Math.Min( Math.Max( m_SliderValue + value, 1), m_SliderScale)
Dim nStep As Integer = m_SliderValue - nOldSliderValue
If nStep = 0 Then Return
Dim nId As Integer = EgtPreviewMachiningTool(m_nPtEntId, nStep)
If nId <> GDB_ID.NULL Then m_nPtEntId = nId
EgtDraw()
NotifyPropertyChanged(NameOf(SliderValue))
End Sub
Dim WoodDrillParamExpanderV As WoodDrillingParameterExpanderV Dim WoodDrillParamExpanderV As WoodDrillingParameterExpanderV
Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV Dim WoodSawParamExpanderV As WoodSawingParameterExpanderV
@@ -232,7 +232,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -129,13 +129,13 @@
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}"
ParamTxBx="{Binding Path=OffSl, ParamTxBx="{Binding Path=OffSr,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSrTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding OffsetSlTxBl}"
ParamTxBx="{Binding Path=OffSr, ParamTxBx="{Binding Path=OffSl,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
@@ -241,7 +241,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -213,7 +213,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -217,7 +217,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -211,7 +211,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -209,7 +209,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -217,7 +217,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -124,12 +124,6 @@
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}" ValidatesOnDataErrors=True}"
Style="{DynamicResource StringParamV_Margin}"/> Style="{DynamicResource StringParamV_Margin}"/>
<EgtWPFLib5:ComboParamV ParamTxBl="{Binding LeadLinkTypeTxBl}"
ParamCmBxList="{Binding Path=LeadLinkTypeList,
UpdateSourceTrigger=PropertyChanged,
ValidatesOnDataErrors=True}"
ParamCmBxSelIndex="{Binding Path=SelectedLeadLinkType}"
Style="{DynamicResource ComboParamV_Margin}"/>
<EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}" <EgtWPFLib5:StringParamV ParamTxBl="{Binding SideAngleTxBl}"
ParamTxBx="{Binding Path=SideAngle, ParamTxBx="{Binding Path=SideAngle,
UpdateSourceTrigger=PropertyChanged, UpdateSourceTrigger=PropertyChanged,
@@ -230,7 +224,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -199,7 +199,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -218,7 +218,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -236,7 +236,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -226,7 +226,7 @@
IsReadOnly="False"/> IsReadOnly="False"/>
</TabItem> </TabItem>
<TabItem Header="CHECKBOX"> <TabItem Header="CHECKBOX">
<CheckBox IsChecked="{Binding Value}"/> <CheckBox IsChecked="{Binding Value, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem> </TabItem>
</TabControl> </TabControl>
<Button Command="{Binding RemoveItemNoteCommand}" <Button Command="{Binding RemoveItemNoteCommand}"
@@ -126,12 +126,6 @@ Public Class OperationListBoxItem
' Aggiorno visualizzazione ' Aggiorno visualizzazione
EgtDraw() EgtDraw()
End If End If
' Resetto valori slider
If Not IsNothing(Map.refMachiningParameterExpanderVM) Then
Map.refMachiningParameterExpanderVM.SetSliderScale(EgtGetPreviewMachiningToolStepCount())
Map.refMachiningParameterExpanderVM.ResetSliderValue()
End If
'OnPropertyChanged("ToolExpanderHeader") 'OnPropertyChanged("ToolExpanderHeader")
Map.refOperationsListExpanderVM.OnPropertyChanged("DuplicateCmd_IsEnabled") Map.refOperationsListExpanderVM.OnPropertyChanged("DuplicateCmd_IsEnabled")
Map.refOperationsListExpanderVM.OnPropertyChanged("MachToDb_IsEnabled") Map.refOperationsListExpanderVM.OnPropertyChanged("MachToDb_IsEnabled")
@@ -329,11 +329,10 @@ Public Class OperationsListExpanderVM
' Aggiungo la nuova fase ' Aggiungo la nuova fase
Dim nPhase As Integer = EgtAddPhase() Dim nPhase As Integer = EgtAddPhase()
Dim nDispId As Integer = EgtGetPhaseDisposition(nPhase) Dim nDispId As Integer = EgtGetPhaseDisposition(nPhase)
' Confermo grezzi, movimenti assi di disposizione e bloccaggi sopra salvati ' Confermo grezzi e bloccaggi sopra salvati
For Each nId As Integer In vRawId For Each nId As Integer In vRawId
EgtKeepRawPart(nId, nLastPhase) EgtKeepRawPart(nId, nLastPhase)
Next Next
EgtKeepAllDispAxes( nLastPhase)
For Each nId As Integer In vFxtId For Each nId As Integer In vFxtId
EgtKeepFixture(nId, nLastPhase) EgtKeepFixture(nId, nLastPhase)
Next Next
@@ -434,11 +433,9 @@ Public Class OperationsListExpanderVM
If EgtGetOperationMode(selOperation.Id) Then If EgtGetOperationMode(selOperation.Id) Then
Map.refOperationParametersExpanderVM.ParametersIsExpanded = True Map.refOperationParametersExpanderVM.ParametersIsExpanded = True
If EgtGetOperationType(selOperation.Id) <> MCH_OY.DISP Then
Map.refMachiningParameterExpanderVM.SetSliderScale( EgtGetPreviewMachiningToolStepCount()) Map.refMachiningParameterExpanderVM.SetSliderScale( EgtGetPreviewMachiningToolStepCount())
Map.refMachiningParameterExpanderVM.ResetSliderValue() Map.refMachiningParameterExpanderVM.ResetSliderValue()
End If End If
End If
End Sub End Sub
#End Region ' OperationListDoubleClickCommand #End Region ' OperationListDoubleClickCommand
@@ -101,11 +101,9 @@ Public Class SimulationExpanderVM
If Not GetCncFileName(True, sCncFile, sInfo) Then Return If Not GetCncFileName(True, sCncFile, sInfo) Then Return
' Eseguo ' Eseguo
If Not EgtGenerate(sCncFile, sInfo) Then If Not EgtGenerate(sCncFile, sInfo) Then
Dim nErr As Integer = EgtGetLastMachMgrErrorId() Dim nErr = EgtGetLastMachMgrErrorId()
If nErr = 1000 Then If nErr = 1000 Then
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information) MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr = 1001 Then
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr <> 0 Then ElseIf nErr <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString() Dim sErr As String = EgtGetLastMachMgrErrorString()
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation)
@@ -227,16 +225,11 @@ Public Class SimulationExpanderVM
UpdateUI() UpdateUI()
' Messaggio in caso di errore ' Messaggio in caso di errore
If Not bOk Then If Not bOk Then
Dim nErr As Integer = EgtGetLastMachMgrErrorId() If EgtGetLastMachMgrErrorId() <> 0 Then
If nErr = 1000 Then
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr = 1001 Then
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString() Dim sErr As String = EgtGetLastMachMgrErrorString()
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
Else Else
MessageBox.Show(EgtMsg(15010), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
End If End If
End If End If
' Imposto stato corrente ' Imposto stato corrente
@@ -274,16 +267,11 @@ Public Class SimulationExpanderVM
Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled") Map.refEstimationsExpanderVM.NotifyPropertyChanged("Estimation_IsEnabled")
m_bStopOnNextCollision = True m_bStopOnNextCollision = True
If Not EgtSimStart(False) Then If Not EgtSimStart(False) Then
Dim nErr As Integer = EgtGetLastMachMgrErrorId() If EgtGetLastMachMgrErrorId() <> 0 Then
If nErr = 1000 Then
MessageBox.Show(EgtMsg(5333), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr = 1001 Then
MessageBox.Show(EgtMsg(5334), EgtMsg(5320), MessageBoxButton.OK, MessageBoxImage.Information)
ElseIf nErr <> 0 Then
Dim sErr As String = EgtGetLastMachMgrErrorString() Dim sErr As String = EgtGetLastMachMgrErrorString()
MessageBox.Show(sErr, EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE MessageBox.Show(sErr, EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Exclamation) '.... - ERRORE
Else Else
MessageBox.Show(EgtMsg(15010), EgtMsg(5305), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE MessageBox.Show(EgtMsg(MSG_MESSAGEBOX + 10), EgtMsg(MSG_SIMULATION + 5), MessageBoxButton.OK, MessageBoxImage.Error) 'Errore sconosciuto - ERRORE
End If End If
SetSimulationStatus(MCH_SIM_ST.UI_STOP) SetSimulationStatus(MCH_SIM_ST.UI_STOP)
End If End If
+2 -2
View File
@@ -1,9 +1,9 @@
<UserControl x:Class="MachiningOptionPanelV" <UserControl x:Class="MachiningOptionPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"> xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5">
<StackPanel Name="ciao" Background="Transparent" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}"> <StackPanel Name="ciao" Background="Transparent" Margin="0,0,3.5001,0" MaxHeight="{Binding MaxHeight,RelativeSource={RelativeSource AncestorType={x:Type EgtFloating:EgtFloatingPanel}}}">
<!--ContentPresenter that contains the OperationsListExpander--> <!--ContentPresenter that contains the OperationsListExpander-->
<ContentPresenter Content="{Binding OperationsListExpander,Mode=OneWay}"/> <ContentPresenter Content="{Binding OperationsListExpander,Mode=OneWay}"/>
<!--ContentPresenter that contains the OperationParametersExpander--> <!--ContentPresenter that contains the OperationParametersExpander-->
+1 -1
View File
@@ -1,6 +1,6 @@
<EgtFloating:EgtFloatingPanel x:Class="OptionPanelV" <EgtFloating:EgtFloatingPanel x:Class="OptionPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="250"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5" xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
TitleBarOrientation="Vertical" TitleBarOrientation="Vertical"
Visibility="{Binding Panel_Visibility}"> Visibility="{Binding Panel_Visibility}">
-3
View File
@@ -56,7 +56,6 @@ Friend Module OptionModule
Friend m_SelGeomSurfRoughing As SceneSelModeOpt Friend m_SelGeomSurfRoughing As SceneSelModeOpt
Friend m_SelGeomWaterJetting As SceneSelModeOpt Friend m_SelGeomWaterJetting As SceneSelModeOpt
Friend m_SelGeomFiveAxMilling As SceneSelModeOpt Friend m_SelGeomFiveAxMilling As SceneSelModeOpt
Friend m_SelVMillQuality As VMillSelTypeOpt
' Flag per aggiungere una nuova lavorazione alla fine della fase o subito dopo la lavorazione selezionata ' Flag per aggiungere una nuova lavorazione alla fine della fase o subito dopo la lavorazione selezionata
Friend m_bNewMachiningIsLastOne As Boolean Friend m_bNewMachiningIsLastOne As Boolean
' Variabile che indica se usare lo script per calcolare automaticamente la disposizione quando si passa in lavorazione ' Variabile che indica se usare lo script per calcolare automaticamente la disposizione quando si passa in lavorazione
@@ -148,8 +147,6 @@ Friend Module OptionModule
m_SelGeomSurfRoughing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt)) m_SelGeomSurfRoughing = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMFIVEAXMILLING, -1) Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMFIVEAXMILLING, -1)
m_SelGeomFiveAxMilling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt)) m_SelGeomFiveAxMilling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
Temp = GetPrivateProfileInt(S_MACH, K_SELVMILLQUALITY, 0)
m_SelVMillQuality = If(Temp < -2 Or Temp > 2, VMillSelTypeOpt.HIGHER, DirectCast(Temp, VMillSelTypeOpt))
m_SelGeomWaterJetting = SceneSelModeOpt.PARTCURVES m_SelGeomWaterJetting = SceneSelModeOpt.PARTCURVES
' Inizializzo variabile che indica posizione nuova operazione di lavorazione ' Inizializzo variabile che indica posizione nuova operazione di lavorazione
m_bNewMachiningIsLastOne = (GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0) m_bNewMachiningIsLastOne = (GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0)
+19 -31
View File
@@ -9,12 +9,11 @@
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False" WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False" IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
MinWidth="400" MinHeight="382" MinWidth="400" MinHeight="382"
Width="400" Height="575" Width="400" Height="520"
CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"> CloseCommand="{Binding CloseOptionsCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<EgtWPFLib5:EgtCustomWindow.Resources> <EgtWPFLib5:EgtCustomWindow.Resources>
<local:GeomTypeConverter x:Key="GeomTypeConverter"/> <local:GeomTypeConverter x:Key="GeomTypeConverter"/>
<local:VMillTypeConverter x:Key="VMillTypeConverter"/>
</EgtWPFLib5:EgtCustomWindow.Resources> </EgtWPFLib5:EgtCustomWindow.Resources>
<TabControl Margin="5,5,5,5"> <TabControl Margin="5,5,5,5">
@@ -317,41 +316,30 @@
</UniformGrid> </UniformGrid>
</GroupBox> </GroupBox>
<Grid Margin="10,5,10,0"> <Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/> <ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<UniformGrid Columns="2" Grid.ColumnSpan="2" Margin="0,5,0,0"> <Grid.RowDefinitions>
<TextBlock Text="{Binding VMillQualityMsg}" VerticalAlignment="Center"/> <RowDefinition Height="1*"/>
<ComboBox ItemsSource="{Binding VMillTypeList, Mode=OneWay}" <RowDefinition Height="1*"/>
SelectedItem="{Binding SelectedVMillTypeType}" Height="25"> </Grid.RowDefinitions>
<ComboBox.ItemTemplate> <TextBlock Text="{Binding NewMachiningPosMsg}" VerticalAlignment="Center"
<DataTemplate> Grid.Row="0" Margin="0,0,0,5"/>
<TextBlock Text="{Binding Converter={StaticResource VMillTypeConverter}}"/> <CheckBox IsChecked="{Binding NewMachiningIsLastOne}"
</DataTemplate> Grid.Column="1" Grid.Row="0" Margin="4,0,0,0" VerticalAlignment="Center"/>
</ComboBox.ItemTemplate> <TextBlock Text="{Binding UseDispositionScriptMsg}" VerticalAlignment="Center"
</ComboBox> Grid.Row="1" Margin="0,0,0,5"/>
</UniformGrid> <CheckBox IsChecked="{Binding UseDispositionScript}"
<TextBlock Grid.Row="1" Text="{Binding NewMachiningPosMsg}" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1" Margin="4,0,0,0" VerticalAlignment="Center"/>
Margin="0,8,0,5"/>
<CheckBox Grid.Row="1" Grid.Column="1" IsChecked="{Binding NewMachiningIsLastOne}"
Margin="4,8,0,0" VerticalAlignment="Center"/>
<TextBlock Grid.Row="2" Text="{Binding UseDispositionScriptMsg}"
VerticalAlignment="Center" Margin="0,5,0,5"/>
<CheckBox Grid.Row="2" Grid.Column="1" IsChecked="{Binding UseDispositionScript}"
Margin="4,5,0,0" VerticalAlignment="Center"/>
</Grid> </Grid>
<Grid Margin="5,5,5,0">
<UniformGrid Rows="2"> <Button Content="{Binding AddMachineMsg}" Command="{Binding AddMachine_Command}" Height="26" Margin="100,1"/>
<Button Content="{Binding AddMachineMsg}" Command="{Binding AddMachine_Command}" Height="26" Margin="100,10,100,5"/> </Grid>
<Grid Margin="5,5,5,0">
<Button Content="{Binding ExportMachineMsg}" Command="{Binding ExportMachine_Command}" Height="26" Margin="100,1"/> <Button Content="{Binding ExportMachineMsg}" Command="{Binding ExportMachine_Command}" Height="26" Margin="100,1"/>
</UniformGrid> </Grid>
</StackPanel> </StackPanel>
</TabItem> </TabItem>
+4 -55
View File
@@ -2,7 +2,6 @@
Imports System.Collections.ObjectModel Imports System.Collections.ObjectModel
Imports System.IO Imports System.IO
Imports EgtUILib Imports EgtUILib
Imports System.Globalization
Public Class OptionWindowVM Public Class OptionWindowVM
Inherits VMBase Inherits VMBase
@@ -20,13 +19,6 @@ Public Class OptionWindowVM
End Get End Get
End Property End Property
Private m_VMillTypeList As ObservableCollection(Of VMillSelTypeOpt) = New ObservableCollection(Of VMillSelTypeOpt)({VMillSelTypeOpt.LOWER, VMillSelTypeOpt.LOW, VMillSelTypeOpt.STANDARD, VMillSelTypeOpt.HIGH, VMillSelTypeOpt.HIGHER})
Public ReadOnly Property VMillTypeList As ObservableCollection(Of VMillSelTypeOpt)
Get
Return m_VMillTypeList
End Get
End Property
Private m_UnitMeasureList As List(Of String) = New List(Of String)({"mm", "inch", EgtMsg(MSG_OPTIONPAGE + 45)}) Private m_UnitMeasureList As List(Of String) = New List(Of String)({"mm", "inch", EgtMsg(MSG_OPTIONPAGE + 45)})
Public ReadOnly Property UnitMeasureList As List(Of String) Public ReadOnly Property UnitMeasureList As List(Of String)
Get Get
@@ -200,17 +192,6 @@ Public Class OptionWindowVM
End Set End Set
End Property End Property
Public Property SelectedVMillTypeType As VMillSelTypeOpt
Get
Return OptionModule.m_SelVMillQuality
End Get
Set(value As VMillSelTypeOpt)
If WritePrivateProfileString(S_MACH, K_SELVMILLQUALITY, CInt(value).ToString()) Then
OptionModule.m_SelVMillQuality = value
End If
End Set
End Property
Public Property GeometryTolerance As String Public Property GeometryTolerance As String
Get Get
Return LenToString(OptionModule.m_dGeometryTolerance, 5) Return LenToString(OptionModule.m_dGeometryTolerance, 5)
@@ -985,13 +966,6 @@ Public Class OptionWindowVM
End Get End Get
End Property End Property
Public ReadOnly Property VMillQualityMsg As String
Get
Return EgtMsg(31214)
End Get
End Property
#End Region #End Region
#Region "COMMANDS" #Region "COMMANDS"
@@ -1233,7 +1207,7 @@ Public Class OptionWindowVM
Dim bUpdate As Boolean = True Dim bUpdate As Boolean = True
If bOldExists Then If bOldExists Then
Dim MachBox As New MachineBox( Application.Current.MainWindow, sMachName) Dim MachBox As New MachineBox( Application.Current.MainWindow, sMachName)
Select Case MachBox.ShowDialog() Select MachBox.ShowDialog()
Case MessageBoxResult.Yes Case MessageBoxResult.Yes
bUpdate = False bUpdate = False
Case MessageBoxResult.No Case MessageBoxResult.No
@@ -1392,7 +1366,7 @@ Public Class OptionWindowVM
Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName) Dim sKo As String = String.Format(EgtMsg(6551), sCurrMachineName)
EgtOutLog(sKo) EgtOutLog(sKo)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK) MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
Return return
End Try End Try
'La macchina "{0}" è stata esportata con successo. 'La macchina "{0}" è stata esportata con successo.
Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName) Dim sOk As String = String.Format(EgtMsg(6552), sCurrMachineName)
@@ -1471,7 +1445,7 @@ Public Class OptionWindowVM
If String.Compare(sNewVer, sBeamVer) < 0 Then If String.Compare(sNewVer, sBeamVer) < 0 Then
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ? ' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
Dim sOut As String = String.Format(EgtMsg(6558), "Beam") Dim sOut As String = String.Format(EgtMsg(6558), "Beam")
If MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then if MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
' Rimuovo il direttorio temporaneo ed esco ' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents) My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return Return
@@ -1575,7 +1549,7 @@ Public Class OptionWindowVM
If String.Compare(sNewVer, sWallVer) < 0 Then If String.Compare(sNewVer, sWallVer) < 0 Then
' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ? ' La versione del nuovo modulo "{0}" è più vecchia dell'attuale. Vuoi sovrascrivere lo stesso ?
Dim sOut As String = String.Format(EgtMsg(6558), "Wall") Dim sOut As String = String.Format(EgtMsg(6558), "Wall")
If MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then if MessageBox.Show(Application.Current.MainWindow, sOut, EgtMsg(15003), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.No Then
' Rimuovo il direttorio temporaneo ed esco ' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents) My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return Return
@@ -1692,28 +1666,3 @@ Public Class GeomTypeConverter
End Function End Function
End Class End Class
Public Class VMillTypeConverter
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Select Case CInt(value)
Case VMillSelTypeOpt.LOWER
Return EgtMsg(31215)
Case VMillSelTypeOpt.LOW
Return EgtMsg(31216)
Case VMillSelTypeOpt.STANDARD
Return EgtMsg(31217)
Case VMillSelTypeOpt.HIGH
Return EgtMsg(31218)
Case VMillSelTypeOpt.HIGHER
Return EgtMsg(31219)
Case Else
Return ""
End Select
End Function
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
+19 -211
View File
@@ -58,20 +58,6 @@ Public Class ProjectVM
End Get End Get
End Property End Property
Private m_DynamicGrid As New Grid()
Public ReadOnly Property DynamicGrid As Grid
Get
Return m_DynamicGrid
End Get
End Property
Private m_DynamicGridList As New List(Of Object)
Public ReadOnly Property DynamicGridList As List(Of Object)
Get
Return m_DynamicGridList
End Get
End Property
#End Region #End Region
#Region "EGTUILIB FIELDS" #Region "EGTUILIB FIELDS"
@@ -93,17 +79,6 @@ Public Class ProjectVM
TMDbParamVisibility.bFirst = True TMDbParamVisibility.bFirst = True
' Inizializza i parametri della scena ' Inizializza i parametri della scena
'InitializeEgtProject() 'InitializeEgtProject()
Dim m_TopTrayV As New TopTrayV
Dim m_LeftTrayV As New LeftTrayV
Dim m_RightTrayV As New RightTrayV
Dim m_BottomTrayV As New BottomTrayV
Dim m_SceneContentControlV As New SceneContentControlV
CreateDynamicGrid()
Dim gridSplitter As GridSplitter = CreateGridSplitter()
' aggiungo componenti interfaccia ' aggiungo componenti interfaccia
Dim bPlugin As Boolean = False Dim bPlugin As Boolean = False
Dim PluginDirNameList() As String = {} Dim PluginDirNameList() As String = {}
@@ -130,57 +105,30 @@ Public Class ProjectVM
Dim ConfigurationData As IPluginConfigData = Map.refMainWindowVM.GetConfigData(Of IPluginConfigData)(PluginName & ".ConfigurationData") Dim ConfigurationData As IPluginConfigData = Map.refMainWindowVM.GetConfigData(Of IPluginConfigData)(PluginName & ".ConfigurationData")
If Not IsNothing(ConfigurationData) And ConfigurationData.ControlList.Count > 0 Then If Not IsNothing(ConfigurationData) And ConfigurationData.ControlList.Count > 0 Then
For Each Element In ConfigurationData.ControlList For Each Element In ConfigurationData.ControlList
PopolateGridWithPlugIn(m_TopTrayV, m_RightTrayV, m_BottomTrayV, m_SceneContentControlV, gridSplitter)
Select Case Element.Name Select Case Element.Name
Case PLUGIN_RIGHT_TRAY Case PLUGIN_RIGHT_TRAY
'm_PanelList.Add(New RightTrayV) m_PanelList.Add(New RightTrayV)
'aggiungo RightTrayV alla griglia
m_DynamicGrid.Children.Add(m_RightTrayV)
Map.refOptionPanelVM.SetPanelViewState(Element.ViewPanelState) Map.refOptionPanelVM.SetPanelViewState(Element.ViewPanelState)
Case PLUGIN_LEFT_TRAY Case PLUGIN_LEFT_TRAY
'm_PanelList.Add(New LeftTrayV) m_PanelList.Add(New LeftTrayV)
' aggiungo LeftTrayV alla griglia
m_DynamicGrid.Children.Add(m_LeftTrayV)
Case Else Case Else
m_PanelList.Add(Map.refMainWindowVM.GetControlByName(Of IPluginControl)(Element)) m_PanelList.Add(Map.refMainWindowVM.GetControlByName(Of IPluginControl)(Element))
' aggiungo LeftTrayV alla griglia
'm_DynamicGrid.Children.Add(Map.refMainWindowVM.GetControlByName(Of IPluginControl)(Element))
End Select End Select
Next Next
End If End If
End If End If
Next Next
' aggiungo gridSplitter alla griglia m_PanelList.Add(New BottomTrayV)
m_DynamicGrid.Children.Add(gridSplitter) m_PanelList.Add(New TopTrayV)
'm_PanelList.Add(New BottomTrayV)
' aggiungo BottomTrayV alla griglia
m_DynamicGrid.Children.Add(m_BottomTrayV)
'm_PanelList.Add(New TopTrayV)
' aggiungo TopTrayV alla griglia
m_DynamicGrid.Children.Add(m_TopTrayV)
' nascondo tasti gestione progetto se attivo plugin ' nascondo tasti gestione progetto se attivo plugin
Map.refTopCommandBarVM.SetProjectManagerVisibility(False) Map.refTopCommandBarVM.SetProjectManagerVisibility(False)
Else Else
PololateGrid(m_TopTrayV, m_LeftTrayV, m_RightTrayV, m_BottomTrayV, m_SceneContentControlV, gridSplitter) m_PanelList.Add(New TopTrayV)
'm_PanelList.Add(New TopTrayV) m_PanelList.Add(New LeftTrayV)
'm_PanelList.Add(New LeftTrayV) m_PanelList.Add(New RightTrayV)
'm_PanelList.Add(New RightTrayV) m_PanelList.Add(New BottomTrayV)
'm_PanelList.Add(New BottomTrayV)
' aggiungo TopTrayV alla griglia
m_DynamicGrid.Children.Add(m_TopTrayV)
' aggiungo LeftTrayV alla griglia
m_DynamicGrid.Children.Add(m_LeftTrayV)
' aggiungo gridSplitter alla griglia
m_DynamicGrid.Children.Add(gridSplitter)
' aggiungo RightTrayV alla griglia
m_DynamicGrid.Children.Add(m_RightTrayV)
' aggiungo BottomTrayV alla griglia
m_DynamicGrid.Children.Add(m_BottomTrayV)
End If End If
'm_PanelList.Add(New SceneContentControlV) m_PanelList.Add(New SceneContentControlV)
' aggiungo SceneContentControlV alla griglia
m_DynamicGrid.Children.Add(m_SceneContentControlV)
m_PanelList.Add(m_DynamicGrid)
End Sub End Sub
#End Region #End Region
@@ -344,125 +292,6 @@ Public Class ProjectVM
#Region "METHODS" #Region "METHODS"
''' <summary>
''' Funzione per popolare la griglia
''' </summary>
''' <param name="m_TopTrayV"></param>
''' <param name="m_LeftTrayV"></param>
''' <param name="m_RightTrayV"></param>
''' <param name="m_BottomTrayV"></param>
''' <param name="m_SceneContentControlV"></param>
''' <param name="gridSplitter"></param>
Private Shared Sub PololateGrid(m_TopTrayV As TopTrayV, m_LeftTrayV As LeftTrayV, m_RightTrayV As RightTrayV, m_BottomTrayV As BottomTrayV, m_SceneContentControlV As SceneContentControlV, gridSplitter As GridSplitter)
' aggiungo TopTrayV
Grid.SetRow(m_TopTrayV, 0)
Grid.SetColumnSpan(m_TopTrayV, 3)
' aggiungo LeftTrayV
Grid.SetRow(m_LeftTrayV, 1)
Grid.SetColumn(m_LeftTrayV, 0)
Grid.SetRowSpan(m_LeftTrayV, 2)
' aggiungo RightTrayV
Grid.SetRow(m_RightTrayV, 1)
Grid.SetColumn(m_RightTrayV, 2)
Grid.SetRowSpan(m_RightTrayV, 2)
'aggiungo gridSplitter
Grid.SetRow(gridSplitter, 1)
Grid.SetColumn(gridSplitter, 2)
' aggiungo BottomTrayV
Grid.SetRow(m_BottomTrayV, 2)
Grid.SetColumn(m_BottomTrayV, 1)
' aggiungo Scena
Grid.SetRow(m_SceneContentControlV, 1)
Grid.SetColumn(m_SceneContentControlV, 1)
End Sub
''' <summary>
''' Funzione per popolare la griglia con PlugIn
''' </summary>
''' <param name="m_TopTrayV"></param>
''' <param name="m_RightTrayV"></param>
''' <param name="m_BottomTrayV"></param>
''' <param name="m_SceneContentControlV"></param>
''' <param name="gridSplitter"></param>
Private Shared Sub PopolateGridWithPlugIn(m_TopTrayV As TopTrayV, m_RightTrayV As RightTrayV, m_BottomTrayV As BottomTrayV, m_SceneContentControlV As SceneContentControlV, gridSplitter As GridSplitter)
' aggiungo TopTrayV
Grid.SetRow(m_TopTrayV, 0)
Grid.SetColumn(m_TopTrayV, 1)
' aggiungo RightTrayV
Grid.SetRow(m_RightTrayV, 0)
Grid.SetColumn(m_RightTrayV, 2)
Grid.SetRowSpan(m_RightTrayV, 2)
'aggiungo gridSplitter
Grid.SetRow(gridSplitter, 0)
Grid.SetColumn(gridSplitter, 2)
Grid.SetRowSpan(gridSplitter, 2)
' aggiungo BottomTrayV
Grid.SetRow(m_BottomTrayV, 2)
Grid.SetColumn(m_BottomTrayV, 1)
' aggiungo Scena
Grid.SetRow(m_SceneContentControlV, 1)
Grid.SetColumn(m_SceneContentControlV, 1)
End Sub
''' <summary>
''' Creazione GridSplitter
''' </summary>
''' <returns></returns>
Private Shared Function CreateGridSplitter() As GridSplitter
' creo gridsplitter
Return New GridSplitter With {
.Width = 30,
.HorizontalAlignment = HorizontalAlignment.Left,
.VerticalAlignment = VerticalAlignment.Stretch,
.Background = Brushes.Transparent
}
End Function
''' <summary>
''' Creazione Griglia Dinamica
''' </summary>
Private Sub CreateDynamicGrid()
' creo colonne griglia dinamica
Dim gridCol1 As New ColumnDefinition With {
.Width = New GridLength(1, GridUnitType.Auto)
}
'.Width = New GridLength(1, GridUnitType.Auto)
Dim gridCol2 As New ColumnDefinition With {
.Width = New GridLength(1, GridUnitType.Star)
}
Dim gridCol3 As New ColumnDefinition With {
.Width = New GridLength(250)
}
' aggiungo le colonne alla griglia
m_DynamicGrid.ColumnDefinitions.Add(gridCol1)
m_DynamicGrid.ColumnDefinitions.Add(gridCol2)
m_DynamicGrid.ColumnDefinitions.Add(gridCol3)
' creo righe griglia dinamica
Dim gridRow1 As New RowDefinition With {
.Height = New GridLength(1, GridUnitType.Auto)
}
Dim gridRow2 As New RowDefinition With {
.Height = New GridLength(1, GridUnitType.Star)
}
Dim gridRow3 As New RowDefinition With {
.Height = New GridLength(1, GridUnitType.Auto)
}
' aggiungo righe alla griglia
m_DynamicGrid.RowDefinitions.Add(gridRow1)
m_DynamicGrid.RowDefinitions.Add(gridRow2)
m_DynamicGrid.RowDefinitions.Add(gridRow3)
End Sub
Private Sub PreInitializeScene() Private Sub PreInitializeScene()
' imposto colore di default ' imposto colore di default
Dim DefColor As New Color3d(0, 0, 0) Dim DefColor As New Color3d(0, 0, 0)
@@ -478,13 +307,10 @@ Public Class ProjectVM
Dim nLineWidth As Integer = 1 Dim nLineWidth As Integer = 1
nLineWidth = GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, nLineWidth) nLineWidth = GetPrivateProfileInt(S_SCENE, K_LINEWIDTH, nLineWidth)
m_ProjectScene.SetLineWidth(nLineWidth) m_ProjectScene.SetLineWidth(nLineWidth)
' imposto colori di evidenziazione ' imposto colore di evidenziazione
Dim MarkColor As New Color3d(255, 255, 0) Dim MarkColor As New Color3d(255, 255, 0)
GetPrivateProfileColor(S_SCENE, K_MARK, MarkColor) GetPrivateProfileColor(S_SCENE, K_MARK, MarkColor)
m_ProjectScene.SetMarkMaterial(MarkColor) m_ProjectScene.SetMarkMaterial(MarkColor)
Dim Mark2Color As New Color3d(255, 64, 64)
GetPrivateProfileColor(S_SCENE, K_MARK2, Mark2Color)
m_ProjectScene.SetMark2Material(Mark2Color)
' imposto colore per superfici selezionate ' imposto colore per superfici selezionate
Dim SelSurfColor As New Color3d(255, 255, 192) Dim SelSurfColor As New Color3d(255, 255, 192)
GetPrivateProfileColor(S_SCENE, K_SELSURF, SelSurfColor) GetPrivateProfileColor(S_SCENE, K_SELSURF, SelSurfColor)
@@ -1273,8 +1099,8 @@ Public Class ProjectVM
Select Case m_SceneSelType Select Case m_SceneSelType
Case SceneSelTypeOpt.FIXTURE Case SceneSelTypeOpt.FIXTURE
Dim nFixtureId As Integer = EgtGetParent(EgtGetParent(nId)) Dim nFixtureId As Integer = EgtGetParent(EgtGetParent(nId))
'Dim sName As String = "" Dim sName As String = ""
'EgtGetName(EgtGetParent(nId), sName) EgtGetName(EgtGetParent(nId), sName)
If EgtVerifyFixture(nFixtureId) Then If EgtVerifyFixture(nFixtureId) Then
m_SelType = DispositionUtility.SelType.FIXTURE m_SelType = DispositionUtility.SelType.FIXTURE
' Se già selezionato ' Se già selezionato
@@ -1292,12 +1118,14 @@ Public Class ProjectVM
EgtGetPlaneSnapPoint(e.Location, Vector3d.Z_AX, TableRef.z, ptCurr) EgtGetPlaneSnapPoint(e.Location, Vector3d.Z_AX, TableRef.z, ptCurr)
DispositionUtility.VtHookFinder(nFixtureId, ptCurr) DispositionUtility.VtHookFinder(nFixtureId, ptCurr)
Exit While Exit While
ElseIf DispositionUtility.VerifyTableAxis(nFixtureId) Then ElseIf sName.Contains(DispositionUtility.MOBILE) Then
Dim sInfo As String = ""
If EgtGetInfo(EgtGetParent(nId), "MDir", sInfo) Then
m_SelType = DispositionUtility.SelType.BARS m_SelType = DispositionUtility.SelType.BARS
m_nIdToSel = nFixtureId m_nIdToSel = EgtGetParent(nId)
' Drag possibile ' Drag possibile
m_bDrag = True m_bDrag = True
Exit While End If
End If End If
Case SceneSelTypeOpt.RAWPART, SceneSelTypeOpt.RAWPARTWITHFIXTURE Case SceneSelTypeOpt.RAWPART, SceneSelTypeOpt.RAWPARTWITHFIXTURE
Dim nRawPartId As Integer = EgtGetParent(nId) Dim nRawPartId As Integer = EgtGetParent(nId)
@@ -1359,6 +1187,7 @@ Public Class ProjectVM
vtMove.z = 0 vtMove.z = 0
' Muovo gli oggetti selezionati se consentito ' Muovo gli oggetti selezionati se consentito
DispositionUtility.MoveRawPartPartAndFixture(nMoveId, vtMove, m_SelType, ptCurr) DispositionUtility.MoveRawPartPartAndFixture(nMoveId, vtMove, m_SelType, ptCurr)
'EgtSaveFile("c:\Temp\ProveMovimentoVentose\Prova1.nge", NGE.BIN)
EgtDraw() EgtDraw()
' Aggiorno il punto precedente ' Aggiorno il punto precedente
m_ptPrev = ptCurr m_ptPrev = ptCurr
@@ -1561,7 +1390,7 @@ Public Class ProjectVM
If nFac <> -1 Then If nFac <> -1 Then
' Visualizzo la normale e il contorno della faccia ' Visualizzo la normale e il contorno della faccia
Analyze.CreateAnalyzeGroup() Analyze.CreateAnalyzeGroup()
Analyze.CreateFacetNormal(nId, nFac) Analyze.CreateNormal(nId, nFac)
Analyze.CreateFacetLoops(nId, nFac) Analyze.CreateFacetLoops(nId, nFac)
' Recupero i dati (in globale o griglia a seconda della impostazione) ' Recupero i dati (in globale o griglia a seconda della impostazione)
Dim ptC As Point3d Dim ptC As Point3d
@@ -1576,27 +1405,6 @@ Public Class ProjectVM
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2) " / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
Map.refStatusBarVM.NotifyStatusOutput(sOut) Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If End If
' Se Regione, visualizzo dati parte toccata
ElseIf EgtGetType(nId) = GDB_TY.SRF_FRGN Then
Dim nChk As Integer = nSub
If nChk >= 0 AndAlso nChk < EgtSurfFrChunkCount(nId) Then
' Visualizzo la normale e il contorno della parte
Analyze.CreateAnalyzeGroup()
Analyze.CreateChunkNormal(nId, nChk)
Analyze.CreateChunkLoops(nId, nChk)
' Recupero i dati (in globale o griglia a seconda della impostazione)
Dim ptC As Point3d
Dim vtN As Vector3d
EgtSurfFrChunkCenter(nId, nChk, If(m_bCPlaneTypePos, GDB_ID.GRID, GDB_ID.ROOT), ptC, vtN)
Dim dLen, dPhi, dTheta As Double
vtN.ToSpherical(dLen, dTheta, dPhi)
' Emetto info sulla barra di stato
Dim sOut As String = "Chunk " + nChk.ToString() +
" : C(" + LenToString(ptC.x, 3) + "," + LenToString(ptC.y, 3) + "," + LenToString(ptC.z, 3) + ")" +
" N(" + DoubleToString(vtN.x, 4) + "," + DoubleToString(vtN.y, 4) + "," + DoubleToString(vtN.z, 4) + ")" +
" / φ=" + DoubleToString(dPhi, 2) + " θ=" + DoubleToString(dTheta, 2)
Map.refStatusBarVM.NotifyStatusOutput(sOut)
End If
End If End If
' Aggiorno la visualizzazione ' Aggiorno la visualizzazione
EgtDraw() EgtDraw()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 B

+1 -3
View File
@@ -2,8 +2,6 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EgtCAM5" xmlns:local="clr-namespace:EgtCAM5"
DockPanel.Dock="Right" DockPanel.Dock="Right">
Margin="0.5,0,0,0">
<local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/> <local:OptionPanelV DataContext="{StaticResource OptionPanelViewModel}"/>
</Grid> </Grid>
+2 -2
View File
@@ -60,8 +60,8 @@ Module Wall
Map.refTopCommandBarVM.SetMachiningMode() Map.refTopCommandBarVM.SetMachiningMode()
' Se simulazione ' Se simulazione
If bOk And nFlag = 2 Then If bOk And nFlag = 2 Then
' Se da TS3 e non pezzo da Vista, impedisco di fare altro ' Se da TS3 impedisco di fare altro
If bBtl AndAlso sFile.IndexOf( "Part_", StringComparison.InvariantCulture) = -1 Then If bBtl Then
Map.refSimulationExpanderVM.bOnlySimulation = True Map.refSimulationExpanderVM.bOnlySimulation = True
End If End If
' Vado in simulazione ' Vado in simulazione
+1 -1
View File
@@ -220,7 +220,7 @@ Public Class TopCommandBarVM
' Cerco di preimpostare come corrente la macchina opportuna ' Cerco di preimpostare come corrente la macchina opportuna
If Not bAllowEmpty AndAlso EgtGetSelectedObjCount() = 0 AndAlso EgtGetMachGroupCount() > 0 Then If Not bAllowEmpty AndAlso EgtGetSelectedObjCount() = 0 AndAlso EgtGetMachGroupCount() > 0 Then
Dim sMachineName As String = "" Dim sMachineName As String = ""
if EgtGetMachGroupMachineName( EgtGetFirstMachGroup(), sMachineName) Then if EgtGetMachGroupMachineName( EgtGetLastMachGroup(), sMachineName) Then
Map.refMachinePanelVM.SelectedMachine = Map.refMachinePanelVM.MachinesList.FirstOrDefault(Function(x) x.Name = sMachineName) Map.refMachinePanelVM.SelectedMachine = Map.refMachinePanelVM.MachinesList.FirstOrDefault(Function(x) x.Name = sMachineName)
End If End If
End If End If
+1 -30
View File
@@ -37,7 +37,7 @@ Module Analyze
Return True Return True
End Function End Function
Function CreateFacetNormal( nId As Integer, nFac As Integer) As Boolean Function CreateNormal( nId As Integer, nFac As Integer) As Boolean
If m_AnaGrpId = GDB_ID.NULL Then Return False If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified() Dim bEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified() EgtDisableModified()
@@ -66,35 +66,6 @@ Module Analyze
Return True Return True
End Function End Function
Function CreateChunkNormal( nId As Integer, nChk As Integer) As Boolean
If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified()
Dim ptC As Point3d
Dim vtN As Vector3d
If EgtSurfFrChunkCenter( nId, nChk, GDB_ID.ROOT, ptC, vtN) Then
Dim nNormId As Integer = EgtCreateGeoVector( m_AnaGrpId, 50 * vtN, ptC, GDB_RT.GLOB)
EgtSetColor( nNormId, New Color3d( 255, 0,0))
End If
If bEnMod Then EgtEnableModified()
Return True
End Function
Function CreateChunkLoops( nId As Integer, nChk As Integer) As Boolean
If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified()
EgtDisableModified()
Dim nCount As Integer
Dim nFirstId As Integer = EgtExtractSurfFrChunkLoops( nId, nChk, m_AnaGrpId, nCount)
If nFirstId <> GDB_ID.NULL Then
For nCrvId As Integer = nFirstId To nFirstId + nCount - 1
EgtSetColor( nCrvId, New Color3d( 255, 0,0))
Next
End If
If bEnMod Then EgtEnableModified()
Return True
End Function
Function CreateCurveCompoPntNbrs( nId As Integer) As Boolean Function CreateCurveCompoPntNbrs( nId As Integer) As Boolean
If m_AnaGrpId = GDB_ID.NULL Then Return False If m_AnaGrpId = GDB_ID.NULL Then Return False
Dim bEnMod As Boolean = EgtGetEnableModified() Dim bEnMod As Boolean = EgtGetEnableModified()
-41
View File
@@ -38,7 +38,6 @@
<EgtCAM5:DoorPanelVM x:Key="DoorsPanelViewModel"/> <EgtCAM5:DoorPanelVM x:Key="DoorsPanelViewModel"/>
<EgtCAM5:GunStockPanelVM x:Key="GunStockPanelViewModel"/> <EgtCAM5:GunStockPanelVM x:Key="GunStockPanelViewModel"/>
<EgtCAM5:MyMachGroupPanelVM x:Key="MachGroupPanelViewModel"/> <EgtCAM5:MyMachGroupPanelVM x:Key="MachGroupPanelViewModel"/>
<EgtCAM5:WinFormPluginControlVM x:Key="WinFormPluginControlViewModel"/>
<!--<EgtCAM5:MachGroupPanelVM x:Key="MachGroupPanelViewModel"/>--> <!--<EgtCAM5:MachGroupPanelVM x:Key="MachGroupPanelViewModel"/>-->
<!--<EgtCAM5:OperationExpanderVM x:Key="OperationExpanderViewModel"/>--> <!--<EgtCAM5:OperationExpanderVM x:Key="OperationExpanderViewModel"/>-->
@@ -459,10 +458,6 @@
<Style x:Key="DrawPanelButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}"> <Style x:Key="DrawPanelButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="30"/> <Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="30"/> <Setter Property="Width" Value="30"/>
<Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
<Setter Property="ContextMenuService.Placement" Value="Right"/>
<Setter Property="ContextMenuService.HorizontalOffset" Value="-1.5"/>
<Setter Property="ContextMenuService.VerticalOffset" Value="-3.5"/>
</Style> </Style>
<Style x:Key="MachiningsTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}"> <Style x:Key="MachiningsTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
@@ -1263,26 +1258,6 @@
</Style.Triggers> </Style.Triggers>
</Style> </Style>
<Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border Name="_Border"
SnapsToDevicePixels="True"
BorderBrush="{StaticResource EgaltechWhite}"
BorderThickness="1">
<ContentPresenter />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="_Border" Property="Background" Value="{StaticResource Button.Pressed.Background}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ --> <!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- Style CheckBox --> <!-- Style CheckBox -->
@@ -1297,20 +1272,4 @@
</Style.Triggers>--> </Style.Triggers>-->
</Style> </Style>
<!-- ______________________________________________________________________________________________________________________________________________ -->
<ItemsPanelTemplate x:Key="MenuItemPanelTemplate">
<StackPanel Margin="-38,0,0,0" Background="Transparent" />
</ItemsPanelTemplate>
<Style x:Key="ContextMenu_Button" TargetType="{x:Type ContextMenu}">
<Setter Property="ItemsPanel" Value="{StaticResource MenuItemPanelTemplate}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Width" Value="37"/>
</Style>
</ResourceDictionary> </ResourceDictionary>
-8
View File
@@ -34,14 +34,6 @@ Public Module IniFile
MACHPATH = 5 MACHPATH = 5
End Enum End Enum
Public Enum VMillSelTypeOpt As Integer
LOWER = -2
LOW = -1
STANDARD = 0
HIGH = 1
HIGHER = 2
End Enum
' MainWindow Page ' MainWindow Page
Friend m_nInstance As Integer = 0 Friend m_nInstance As Integer = 0
Friend m_nUserLevel As Integer = 1 Friend m_nUserLevel As Integer = 1
@@ -1,8 +1,6 @@
<Grid x:Class="WinFormPluginControlV" <Grid x:Class="WinFormPluginControlV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtCAM5="clr-namespace:EgtCAM5"
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
DockPanel.Dock="{Binding DockSide}" DockPanel.Dock="{Binding DockSide}"
Height="{Binding Height}" Height="{Binding Height}"
Width="{Binding Width}" Width="{Binding Width}"
+3 -3
View File
@@ -49,13 +49,13 @@
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. --> also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3"> <application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings> <windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware> <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings> </windowsSettings>
</application> </application>
-->
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) --> <!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!-- <!--