This is the discussion forum for Helix Toolkit.
For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!
0

Two questions on Manipulator

Anonymous 12 years ago 0
This discussion was imported from CodePlex

damianoslebo wrote at 2013-02-12 01:36:

Hi I am using the code behind with manipulators in my program with the following code:
        CubeVisual3D box = new CubeVisual3D();
        box.Center = new Point3D(x, y, z);
        CombinedManipulator boxManipulator = new CombinedManipulator();
        boxManipulator.Position = box.Center;
        boxManipulator.Pivot = box.Center;
        boxManipulator.CanRotateX = false;//true;
        boxManipulator.CanRotateY = false;// true;
        boxManipulator.CanRotateZ = false;// true;
        boxManipulator.CanTranslateX = false;// true;
        boxManipulator.CanTranslateY = false;// true;
        boxManipulator.CanTranslateZ = true;
        boxManipulator.Bind(box);
        vp.Children.Add(boxManipulator);
        vp.Children.Add(box);
        globalManipulatorList.Add(boxManipulator);
I can get the manipulator to work in the x and y and all rotation directions, however the Z translate direction does not show up on the viewport. I don't know why the other directions work but Z does not work.

The second question is what event can invoke when using a transparent bounding volume to detect a mouse left button down on the manipulator? I have been using the VisualTreeHelper.HitTest method to ignore transparent geometry before now but I don't know what method can be invoked once a manipulator is found by the VisualTreeHelper.HitTest method.

Thanks for the help,
Damian

objo wrote at 2013-03-12 11:41:

1: Thanks for the notice - I see some change had broken the TranslateManipulator. I removed the default value of the Direction property, now it seems to work again.

2: Sorry, I don't quite understand the problem here. Please make an example that we can debug!

0

Manipulators to stretch and move box

Anonymous 12 years ago 0
This discussion was imported from CodePlex

christianw42 wrote at 2013-06-17 14:03:

Hello everybody,

i have a little problem with adding manipulators to an visual via code, in my case a BoxVisual3D.

I define a box an two manipulators, one for moving, one for resizing:
var volumeBox = new BoxVisual3D();
volumeBox.Center = new Point3D(0, 0, 0);
volumeBox.Length = 0.3;
volumeBox.Width = 0.3;
volumeBox.Height = 0.3;
volumeBox.Material = MaterialHelper.CreateMaterial(Colors.SkyBlue, 0.3);

var xManipulator = new TranslateManipulator();
xManipulator.Color = Colors.Red;
xManipulator.Length = 0.4;
xManipulator.Diameter = 0.02;
xManipulator.Position = new Point3D(0, 0, 0);
xManipulator.Direction = new Vector3D(-1, 0, 0);
xManipulator.Offset = new Vector3D(-1, 0, 0);
xManipulator.Bind(volumeBox);

var xStretchManipulator = new TranslateManipulator();
xStretchManipulator.Color = Colors.SpringGreen;
xStretchManipulator.Length = 0.3;
xStretchManipulator.Diameter = 0.02;
xStretchManipulator.Position = new Point3D(0, 0, 0);
xStretchManipulator.Direction = new Vector3D(-1, 0, 0);
xStretchManipulator.Offset = new Vector3D(0, 0, 0);
//xStretchManipulator.Bind(volumeBox);

var binding = BindingOperations.SetBinding(
xStretchManipulator, TranslateManipulator.ValueProperty, new Binding("Length") { Source = volumeBox, Converter = new LinearConverter { M = 0.5 }});
binding.UpdateTarget();

//var targetBinding = BindingOperations.SetBinding(
//    xStretchManipulator, TranslateManipulator.TransformProperty, new Binding("Transform") { Source = volumeBox });
//targetBinding.UpdateTarget();
            
//var targetTransformBinding = BindingOperations.SetBinding(
//    xStretchManipulator, TranslateManipulator.TargetTransformProperty, new Binding("Transform") { Source = volumeBox });
//targetTransformBinding.UpdateTarget();
The code above works fine for resizing and moving the box, but the manipulator for resizing (xStretchManipulator) does not move with the box. When I add the transform-bindings to the xStretchManipulator, it moves with the box, but position is always in the center of the box and when you stretch to much, manipulator is inside the box.

Does anyone have an idea how to define and bind the manipulators, so that it works correctly?

Thanks a lot for any help or ideas!
christian
0

The SharpDX Helix 3D fork

Anonymous 12 years ago 0
This discussion was imported from CodePlex

lavagin wrote at 2013-06-10 21:50:

Hello,

Where can I find this fork? I would like to take a look at it.

Also you will be able to make metro apps with this fork?

objo wrote at 2013-06-11 04:38:

click: SOURCE CODE -> FORKS -> sharpdx
currently it is only WPF
0

Monster memory leak on window resize for SharpDX build.

Anonymous 12 years ago 0
This discussion was imported from CodePlex

noemata wrote at 2014-03-19 20:28:

Has anyone looked into the memory leak that is tripped by window resize events for the SharpDX build? With each resize several MB get lost.

Strangely the leak appears to accumulates on a TextBlock control.

objo wrote at 2014-04-29 10:52:

I have forwarded this issue to the guys working on this fork!
0

Simple sample to make objects in code

Anonymous 12 years ago 0
This discussion was imported from CodePlex

mentalarray wrote at 2012-03-27 03:13:

Hi well done for such a great project...

I just wondred whethr there is a sample to add/make objects from scratch in code, i have seen the Mvvm demo but was interested in another more simpler way

Much thanks...


murray_b wrote at 2012-03-27 05:21:

How simple?

In the MVVM example it creates a observable collection

�public ObservableCollection Objects { get; set; }

Binds it to the itemsource of the Viewport

then adds objects to it in code.  Ie Objects.Add( new #any of the Visual3d objects#)

objects.add (new TubeVisual3D
                           {
                               Path = polygonPoints,
                               Material = MaterialHelper.CreateMaterial(tubeColor),
                               BackMaterial = MaterialHelper.CreateMaterial(tubeColor),
                               Diameter = 0.1
                           });

Does that help? Let me know if that doesn't make sense

or do you want a non-mvvm. If so just add objects in code behind to the itemsource

 

 

 


mentalarray wrote at 2012-03-27 17:20:

Oh brill thanks murray_b just what i needed

0

Port to Winform and SharpGL?

Anonymous 12 years ago 0
This discussion was imported from CodePlex

tingspain wrote at 2013-04-25 02:55:

Hello,

First of all, I would like to say that GREAT JOB. I have checked the demo apps and it is very impresive work.

I was wondering if it is possible to easy port this library to Winform and SharpGL?

I dont know too much about WPF.

Thanks in advance.

objo wrote at 2013-04-25 11:31:

This library targets WPF only and is based on the System.Windows.Media.Media3D classes.
Sorry, there are no plans to port to Windows forms and OpenGL.

RobPerkins wrote at 2013-04-25 18:07:

Is SharpGL even being maintained by anyone any longer?

przem321 wrote at 2013-04-25 23:16:

Well, but there is a DirectX 11 version with SharpDX coming up, isn't it?

objo wrote at 2013-04-26 00:01:

Yes, WPF+SharpDX/DX11 (and maybe Windows Store App+SharpDX) is the direction I would like to see this project moving!
Keep up the good work on the sharpdx fork, Przem!

tingspain wrote at 2013-04-26 01:02:

It a pity that is not plan to port it to winform at least. The last time that SharpGL was updated was on Jan 30, 2013.

I looked around very fast the source code of Helix 3D toolkit, and I found get my lest a little lost. I am not familiar with WPF. Do you think that it will be very hard to port to Winform + SharpGL or SharlpDX?

Maybe I can start the porting the code.

objo wrote at 2013-04-26 22:19:

It would be interesting to port the functionality that could be platform independent (importers/exporters, camera manipulation, geometry classes) to a portable class library. The same code could then be used for both WPF, SharpDX, OpenTK and SharpGL based projects!

tingspain wrote at 2013-04-27 04:38:

Objo, I dont mind to start that project. If you give me some hint and guidance. I will do it without problem.

objo wrote at 2013-05-08 15:48:

I would like to see the file importers/exporters refactored to be platform independent, and sharing the same design pattern. The geometry / mesh generation classes are probably not so good candidates, since these should use the platform's Point/Vector structures for performance...
Feel free to start a fork on this! I wish I had time to follow up, but I'm focusing on other tasks at the moment.

RobPerkins wrote at 2013-06-18 19:47:

I did some preliminary work on this kind of thing (geometry/mesh generation) with an intern about four years ago, and I still have the C# code he did. It seems to me that platform independence could probably be done with a helper static class, making attached methods, one for each kind of library.

Does the architecture make sense in terms of Helix?

objo wrote at 2013-06-18 22:20:

It would be great to see different solutions how this can be achieved without duplicating code on the different platforms! I have not been thinking of a static class with attached methods, please post some examples.

I think performance is important for the mesh generating code. I think this means that platform specific data types (e.g. point, quaternions, transformations) should be used as much as possible, but it is possible that the platform specific data types do not need to be exposed in the public interfaces.

RobPerkins wrote at 2013-06-18 23:16:

Pardon my incorrect use of jargon: What I meant was "Extension methods". Enabled by the .NET Framework, an extension method is decorated with the [Extension] attribute (which might only be a VB.NET requirement), declared static, and takes as its first argument an argument of the type which it extends. For example (from MSDN documentation):
namespace ExtensionMethods
{
    public static class MyExtensions
    {
        public static int WordCount(this String str)
        {
            return str.Split(new char[] { ' ', '.', '?' }, 
                             StringSplitOptions.RemoveEmptyEntries).Length;
        }
    }   
}
Which is then used by declaring using ExtensionMethods and:
string s = "Hello Extension Methods";
int i = s.WordCount();
I note that you have four such classes in the code base which I have (privately) forked for my own use.

What strikes me as interesting is that almost every 3D implementation uses a unique type name for its points, quaternions, and transformations, but the actual structure of the structs or class data have to be identical or nearly so. For games, performance of mesh generators is not vital; under the only architectures I can think of, most of those are loaded or preloaded before a high framerate is needed in the game. For engineering use cases, a high triangle count plus a relatively low framerate (mouse gesture animations, mostly) are the order of the day.

Frankly, for most mesh generation, I'm writing my own code against my data models and emitting the WPF formatted arrays and assigning them to the various Visual3Ds I use from the Helix library. So what I'm thinking about is extension methods like "ToOpenGL--structure--" or "ToSharpDX--whatever--" which would take the WPF structures native to Helix and emit the ones compatible with the other libraries. With a modern i5 or i7 and TPL it wouldn't even be computationally time consuming to execute such functions unless the facet counts were in the millions.

For my engineering based low-frame-rate, medium-delay-tolerant use cases, such an approach would not be so bad. I may give this more thought; the OpenTk stuff looks very, very compelling for non-WPF reasons.
0

Manipulators in code

Anonymous 12 years ago 0
This discussion was imported from CodePlex

ChrisKerridge wrote at 2012-04-30 10:52:

First off, great toolkit.

I want to be able to dynamically add objects to a 3D scene and be able to move them with manipulators using code similar to:

 

            var builder = new MeshBuilder(true, true);

            var position = new Point3D(0, 0, 0);

            builder.AddSphere(position, 1);


            var geom = new GeometryModel3D(builder.ToMesh(), Materials.Red);
            var visual = new ModelVisual3D();
            visual.Content = geom;

            var manipulator = new TranslateManipulator();
            manipulator.Bind(visual);
            manipulator.Position = position;
            manipulator.Direction = new Vector3D(0, 0, 1);
            manipulator.Offset = new Vector3D(0, 0, 1);
            manipulator.Color = Colors.Blue;

            
            vp.Children.Add(manipulator);
            vp.Children.Add(visual);
 

 

This gives me a sphere and an arrow pointing upwards (great), but dragging the arrow up and down has no affect on the sphere. How can I get the manipulator to affect the sphere?

Thanks a lot


objo wrote at 2012-05-02 21:36:

I found a bug in the code - the Manipulator.Bind method should not use CombinedManipulator.TargetTransformProperty, but its own. I will submit the fix soon. Thanks for providing the code that made it easy to find the error.

Also, move your code line

manipulator.Bind(visual);
below the manipulator.Position setter (this will actually modify the Transform and break the Transform binding).

Sorry there is no more documentation than the XML comments and the example on these features - it was experimental code that seemed to work well, so I just put it into the library...


christianw42 wrote at 2013-06-06 11:13:

Hello,

is there still anything broken in the toolkit? Here you can see my code, I can see the box and the manipulator, but when i click the manipulator, nothing happens.
var volumeBox = new BoxVisual3D();
volumeBox.Center = new Point3D(0, 0, 0);
volumeBox.Length = 0.3;
volumeBox.Width = 0.3;
volumeBox.Height = 0.3;
volumeBox.Material = MaterialHelper.CreateMaterial(Colors.SkyBlue, 0.3);

var manipulator = new TranslateManipulator();
manipulator.Color = Colors.Red;
manipulator.Length = 0.4;
manipulator.Diameter = 0.02;
manipulator.Position = new Point3D(0, 0, 0);
manipulator.Direction = new Vector3D(1, 0, 0);
manipulator.Bind(volumeBox);

this.VolumeBoxModel.Children.Add(volumeBox);
this.VolumeBoxModel.Children.Add(manipulator);
Thanks a lot

christianw42 wrote at 2013-06-06 11:30:

Ok, now it works. I think it's an initialize bug of UIElement3D.

Workaround: add the following two lines after the code above.
this.HelixViewport.Visibility = Visibility.Collapsed;
this.HelixViewport.Visibility = Visibility.Visible;
Thanks for a great framework!
0

LinesVisual3D Aren't Rendering

Anonymous 12 years ago 0
This discussion was imported from CodePlex

jrhokie1 wrote at 2013-01-24 15:09:

I have a WPF app, with my HelixViewport3D's ModelVisual3D Content property bound to a Model3DGroup-type property.  I create some EllipsoidVisual3D objects, and add them to my model group by

      modelGroup.Children.Add(ev3.Model);

Now I want to create some line segments.  I do this

   LinesVisual3D lv3d = new LinesVisual3D();

   Point3D p1 = new Point3D(...);

   lv3d.Points.Add(p1);

   Point3D p2 = new Point3D(...);

   lv3d.Points.Add(p2);

   lv3d.Thickness = 20;

   modelGroup.Children.Add(lv3d.Content);

But my lines aren't visible.  Setting IsRendering to true doesn't help.

I'm doing MVVM, so I don't want to directly add a visual to my viewport, as is done in the Points and Lines sample.  I know I'm using it wrong, I just can't figure out where.  Any help will be appreciated.

Thanks.

-reilly.


jrhokie1 wrote at 2013-01-24 16:01:

Never mind.  I found and used MeshBuilder.  Works like a champ.

Seriously, objo, you should put a PayPal "Donate" button up here.  I don't know how much they skim off the top, but I would pay you for your work.


objo wrote at 2013-02-04 15:26:

Ok. I will check if there is a bug in the LinesVisual3D change notifications, though.

I added an Amazon wish list link at the home page, if you feel for donating a book! :)

jrhokie1 wrote at 2013-02-04 16:25:

I had to do it: "Practical Rendering and Computation with Direct3D 11" is on the way.

[FYI, I'm working on a tool to extract statistics from 50 micron scans of coupons which have been subjected to corrosive environments. We read the scan data and visualize it in 3D. The tool provides controls to process the image, detect corroded pits, and extract their statistics for use in modeling. I used Helix to show and annotate the data. It couldn't have been easier.]

Please keep up the good work.

Regards,

-reilly.

objo wrote at 2013-02-05 08:55:

Great! Thank you!
Regarding the code - it seems like you are 'stealing' the Model3D from the LinesVisual3D instance. The screen space visuals must be updated every time the camera or transforms are changed, currently this is handled by the CompositionTarget.Rendering event. I guess there was no updating going on in your case where you had disconnected the LinesVisual3D from the visual tree.
0

Billboard rendering problem

Anonymous 12 years ago 0
This discussion was imported from CodePlex

jdek wrote at 2013-08-08 16:30:

Hello,
The Billboard is working well, but sometimes it has additional dashes at its bottom and right sides. Here is how the Billboard looks for me :



Behold my code used to initialized the Billboard :
new BillboardTextVisual3D { Text = "1800", Position = new Point3D(0, 0, 0) };
May be this is due to antialiasing...
If somebody has a solution...

objo wrote at 2013-08-08 16:42:

Could some padding/margin around the text work? I think I added a property to control this.

jdek wrote at 2013-08-08 16:55:

Good idea thank you, but no, "dashes" are translated but still visible.
But I found a workaround :
Set this property on the HelixViewport3D :
RenderOptions.BitmapScalingMode="Fant"
"HighQuality" is working too. May be it is a lack of precision of my graphic card because this doesn't appear if I switch from one to another (laptop with Nvidia Optimus).

objo wrote at 2013-08-08 17:03:

thanks for the workaround. I hadn't seen the Fant mode before :)

3dfx_IceFire wrote at 2014-02-28 08:32:

I am having a similar problem with my source code. If I am creating my billboard text items by creating several BillboardTextVisual3D it looks nicely. However due to performance issues I would prefer to use BillboardTextGroupVisual3D with a list of BillboardTextItem but then I get the same rendering issues as mentioned by jdek above.
See the following picture as an example:


I fould out that this happens only if the background is not set to transparent.
See my cource code:

variant 1

         labelTextGroup = new BillboardTextGroupVisual3D()
         {
            Background = Brushes.White,
            Items = null
         };
[...]
var labelTextItems = new List<BillboardTextItem>();
labelTextItems.Add(new BillboardTextItem()
{
   Text = current.ToString(),
   Position = (Point3D)((double)i * Direction + (FontSize * 0.07) * DesciptionOrientation),
   VerticalAlignment = VerticalAlignment.Center,
   HorizontalAlignment = HorizontalAlignment.Center
 });
labelTextGroup.Items = labelTextItems;

variant 2

            BillboardTextVisual3D label = new BillboardTextVisual3D()
            {
               Text = current.ToString(),
               FontFamily = new FontFamily("Courier New"),
               FontSize = this.fontSize,
               Background = new SolidColorBrush(Color.FromRgb(255, 255, 255)),
               Position = (Point3D)((double)i * Direction + (FontSize * 0.07) * DesciptionOrientation),
            };
Besides that I cannot find a BitmapScalingMode property in the HelixViewport3D. Was there a change in the HelixViewport3D class?
0

VRML Importer version

Anonymous 12 years ago updated by Subhan Khan 5 months ago 1
This discussion was imported from CodePlex

michaeldjackson wrote at 2012-11-19 16:48:

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?


objo wrote at 2012-11-19 16:58:

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.


michaeldjackson wrote at 2012-11-19 18:35:

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:


glgweeke wrote at 2012-11-20 08:16:

Hi,

can you add your .wrl file?

Thanks!


michaeldjackson wrote at 2012-11-20 12:58:

Not sure how to attach file to reply.


glgweeke wrote at 2012-11-21 11:34:

Hi,

you can create a new issue and attach a file.

Max. 4MB. (use Zip)


objo wrote at 2012-11-21 11:55:

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. 


michaeldjackson wrote at 2012-11-21 13:37:

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.


glgweeke wrote at 2012-11-21 22:04:

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.


michaeldjackson wrote at 2012-11-29 19:50:

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.


glgweeke wrote at 2012-12-04 18:39:

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.