VRML Importer version

Nov 19, 2012 at 3:48 PM

If I download the latest version Oct 2012, will it containthe VRML importer feature? If not, how do I get the version with VRML importer?

Coordinator
Nov 19, 2012 at 3:58 PM

You find the vrml import fork on http://helixtoolkit.codeplex.com/SourceControl/network/forks/glgweeke/vrmlImport

This fork has not been merged into the default branch yet.

Nov 19, 2012 at 5:35 PM

I'm trying to import a simple wrl model using the VRML reader. It fails with the following exception:

System.FormatException was unhandled
  HResult=-2146233033
  Message=Input string was not in a correct format.
  Source=mscorlib
  StackTrace:
       at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
       at System.Double.Parse(String s, IFormatProvider provider)
       at HelixToolkit.Wpf.VrmlReader.GetValues(Double[]& result)
       at HelixToolkit.Wpf.VrmlReader.ReadGeometry(Model3DGroup model3DGroup)
       at HelixToolkit.Wpf.VrmlReader.DoShapeNode(Int32 level, Model3DGroup model3DGroup)
       at HelixToolkit.Wpf.VrmlReader.ReadTransform(Model3DGroup model3DGroup, Int32 level)
       at HelixToolkit.Wpf.VrmlReader.DoGroupNode(Int32 level, Model3DGroup model3DGroup)
       at HelixToolkit.Wpf.VrmlReader.ReadTransform(Model3DGroup model3DGroup, Int32 level)
       at HelixToolkit.Wpf.VrmlReader.Read(Stream s)
       at HelixToolkit.Wpf.VrmlReader.Read(String path)
       at VRMLImportTest.MainViewModel.LoadModel() in c:\CPG Dev Projects\VRMLImportTest\VRMLImportTest\MainViewModel.cs:line 26
       at VRMLImportTest.MainWindow.btnRun_Click_1(Object sender, RoutedEventArgs e) in c:\CPG Dev Projects\VRMLImportTest\VRMLImportTest\MainWindow.xaml.cs:line 42
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at System.Windows.Controls.Primitives.ButtonBase.OnClick()
       at System.Windows.Controls.Button.OnClick()
       at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
       at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
       at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at VRMLImportTest.App.Main() in c:\CPG Dev Projects\VRMLImportTest\VRMLImportTest\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly 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.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

Nov 20, 2012 at 7:16 AM

Hi,

can you add your .wrl file?

Thanks!

Nov 20, 2012 at 11:58 AM

Not sure how to attach file to reply.

Nov 21, 2012 at 10:34 AM

Hi,

you can create a new issue and attach a file.

Max. 4MB. (use Zip)

Coordinator
Nov 21, 2012 at 10:55 AM

I would suggest sharing by a service like
http://www.filedropper.com
http://www.filefactory.com
http://fileden.com/ 

or for source files
http://pastebin.com
etc. 

Nov 21, 2012 at 12:37 PM

Link to my troublesome .wrl file.

http://www.filefactory.com/file/6lpoznkjny8d/n/AF1_wrl

The AF1.wrl file is an export from Flac3D 5.0 from Itasca, and represents a rectilinear grid.

I used MeshLab (free, opensource) to view the file to ensure it is not corrupted.

Nov 21, 2012 at 9:04 PM

In the vrml import fork i make some bugfixes. Now you can import the file.

Currently i do not support texture mapping.

But it will be possible to add this feature in near future.

Nov 29, 2012 at 6:50 PM

I have uploaded a .png to http://www.filefactory.com/file/5dmq1jc0ulgv/n/VRMLInMeshLab_PNG which represents the AF1.wrl file that I sent you previously for your testing purposes being viewed in MeshLab. Is is possible to get this type of view from your VRML importer? In MeshLab, this view is obtained by clicking the "WireFrame" button.

Dec 4, 2012 at 5:39 PM

Hi,

in WPF it is not possible to draw a real line in 3D.

Your .WRL-File is using IndexedLineSet which need this feature.

This Helix-Toolkit creates a line with 2 Triangles which what a real size. Not only one pixel on every viewpoint.

To do what you like, 

pease patch the following to lines in the VRMLReader.cs file.

1.) Line 734: 

            if (FindNode("IndexedFaceSet"))

replace 

if (false)

 

2.) Line 949:

                    mesh.Positions = lg.CreatePositions(linePoints, 0.001);

replace

                    mesh.Positions = lg.CreatePositions(linePoints, 0.1);

 

This importer is not stable not finished and not perfect.