Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic exception, id user doubleclick on the center node (Read 4312 times)
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
exception, id user doubleclick on the center node
Sep 27th, 2011 at 10:56am
Print Post  
I have 3D diagram
have sprint layout , so it is one node in the middle and another nodes around it

when the user double click in the centered node it throw this exception
Parameter is not valid.

I tried tor rectify the issue and I realize that it is because this line
dgView3D.CameraPosition = SourceNode.LayoutTraits(View3D.Position)

this line to stop the middle one from moving (center it to camera)
If  stopped this line exception will never come
how to fix it please
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: exception, id user doubleclick on the center n
Reply #1 - Sep 27th, 2011 at 11:04am
Print Post  
Does SourceNode.LayoutTraits contain a View3D.Position key at all when this happens?
  
Back to top
 
IP Logged
 
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Re: exception, id user doubleclick on the center n
Reply #2 - Sep 27th, 2011 at 11:08am
Print Post  
yes
z=10.3225555
y=10.0109024
z=0.0184163526
  
Back to top
 
IP Logged
 
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Re: exception, id user doubleclick on the center n
Reply #3 - Sep 27th, 2011 at 11:16am
Print Post  
I got a work around and the exception not happening now

I tried to give some deviation to the camera position to not be same as the centerNode (SourceNode) position
here is the code
     Dim pos As Point3D = SourceNode.LayoutTraits(View3D.Position)
           dgView3D.CameraPosition = New Point3D(pos.X, pos.Y, pos.Z + 0.0001)

now it works but I think you need to fix something there or at least not the exception happens
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: exception, id user doubleclick on the center n
Reply #4 - Sep 27th, 2011 at 11:45am
Print Post  
The CameraPosition setter does not throw exceptions if I just assign that point. What is shown at the top of the callstack when you get the exception?
  
Back to top
 
IP Logged
 
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Re: exception, id user doubleclick on the center n
Reply #5 - Sep 27th, 2011 at 11:47am
Print Post  
here is the stack trace

   at System.Drawing.Graphics.ScaleTransform(Single sx, Single sy, MatrixOrder order)
   at MindFusion.Drawing.GdiGraphics.ScaleTransform(Single sx, Single sy, MatrixOrder order)
   at MindFusion.Diagramming.WinForms.DiagramView3D.DrawDiagram3D(IGraphics graphics)
   at MindFusion.Diagramming.WinForms.DiagramView3D.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNat
iveMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.RunDialog(Form form)
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at System.Windows.Forms.Form.ShowDialog()
   at Standalone.Form1.Button2_Click(Object sender, EventArgs e) in E:\Working Folder\RAB\Organizational Dynamics\Form1.vb:line 24
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNat
iveMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(ApplicationContext context)
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicat
ionModel()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String
[] commandLine)
   at Standalone.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: exception, id user doubleclick on the center n
Reply #6 - Sep 27th, 2011 at 12:16pm
Print Post  
What are the CameraRotation values at that point?
  
Back to top
 
IP Logged
 
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Re: exception, id user doubleclick on the center n
Reply #7 - Sep 27th, 2011 at 12:17pm
Print Post  
zeros
(0,0,0)
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: exception, id user doubleclick on the center n
Reply #8 - Oct 4th, 2011 at 6:56am
Print Post  
Could you check if the version below throws an exception?
https://mindfusion.eu/_beta/fcnet_3dtest.zip

If it does, can you see any "view3d:" messages logged in the debug output window?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint