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

Obj files import and cursor position in HelixToolkit.Wpf.SharpDX

Igor 9 years ago updated 9 years ago 2

Hello guys! Thank you for great toolkit!


I have 2 questions, maybe anyone can help me:


First: I want to import obj model (with textures) and display it in Viewport3DX. How to do it correctly?
Now I have next:

ObjReader Reader = new HelixToolkit.Wpf.SharpDX.ObjReader();
List<Object3D> objs = Reader.Read(ModelPath);

After reading objs variable contains near 1000 objects. What shall be the next steps to to display model in viewport?


Second: And one more question: How to receive cursor position in Viewport3DX. Is there some property like CursorPosition in HelixViewport3D?

Thank you in advance!

0

Cutting of LinesVisual3D doesn't word

Tadeusz Wilczek 9 years ago 0

LinesVisual3D doesn't properly cat by cutting plane. In my example code:


<ht:CuttingPlaneGroup x:Name="CuttingGroup" IsEnabled="True">

<ht:CuttingPlaneGroup.CuttingPlanes>

<ht:Plane3D Normal="0,0,1" Position="0,0,0"/>

</ht:CuttingPlaneGroup.CuttingPlanes>

<ht:CubeVisual3D Center="4,4,2" SideLength="8"/>

<ht:LinesVisual3D Points="0,0,-10,0,0,22" Thickness="3" ></ht:LinesVisual3D>

</ht:CuttingPlaneGroup>


When cuttingPlaneGroup is disabled it looks good:

Image 39


When cuttingPlaneGroup is enabled, line is one-side-visible and has wrong size and direction:

Image 38


0

Find mesh in model

Vladimir 9 years ago updated by anonymous 7 years ago 2

Hi all!!

I have the 3d model in Blender. It has several objects (meshes). Image 33


I export the model and load it into helix. How can I get a link to mesh by it's name? GetName() functions retun null.

Image 34

0

Is there a way to set the DepthBuffer for an Element3D?

egon sepp 9 years ago updated 9 years ago 1

Can it be done already?


I would like to add an Element3D to the scene (a CoordinateSystem) when the user selects an object, but it should always be "on top" so it can be seen, even it is in the Element.


Greetings

Egon

0

view panning and the coordinate axis symbol

Frank 9 years ago updated by egon sepp 9 years ago 7

I have a HelixViewport3D window in a WPF app, with Pan and axis coordinate features enabled. I am rendering a 'point-cloud' using PointsVisual3D. When I Pan the point-cloud around, the coordinate axis stays in the center of the view instead of moving with the point cloud, and this seems wrong. I thought that the 'Pan' operation simply translated the camera around in the current viewing plane, which would make everything in the model (including the coordinate axis symbol) move together, but clearly this is not the case.


This screenshot shows the situation: The left-hand HelixViewport3D viewport shows a point collection panned off center, while the right-hand viewport shows the original, unpanned setup.


Image 29


What am I missing, and what do I need to do to make sure the coordinate symbol stays in the same relative position with respect to other model elements when panning the view?


TIA,


Frank


0

Magnetometer Calibration Tool using WPF & Helix Toolkit

Frank 9 years ago 0

I have created a Magnetometer Calibration tool for one of my robotics projects that uses a solid-state 3-axis magnetometer. The app was created in Visual Studio 2015 Community Edition using WPF and the Helix Toolkit. Specifically I have two HelixViewport3D viewports, and I use the PointsVisual3D and TubeVisual3D toolkit objects to display 'raw' and calibrated magnetometer data.


Image 28



This was my first exposure to WPF and the Helix Toolkit, and I learned *a lot* about both! I described my mental travels through the WPF & Toolkit jungles on my 'Paynters Palace' site at http://www.fpaynter.com. My wrap-up post on this subject is at http://fpaynter.com/2016/07/magnetometer-calibration-tool-part-iv/


As noted in the post, the sources and a ZIP file containing everything (except for Octave) needed to run the app can be found at my GitHub site at https://github.com/paynterf/MagCalTool.


This is my way of giving back to Oystein Bjorke and the other folks who created the wonderful Helix Toolkit - thanks!!


Frank


PS: Oystein - I apologize in advance for any/all mistakes, misstatements and/or outright falsehoods perpetrated by me in this app and my posts. As a WPF/Toolkit newbie I did my best, but I'm sure I did lots of stuff wrong! ;-).


0

Small sandbox example for HelixToolKit.SharpDX

Daniel Zibion 9 years ago updated by nick 4 years ago 1

Hello everyone,

First of all big thanks to the creators and contributors of the Helix Toolkit and of course thanks for sharing this with all of us.


So about my question...

the native HellixToolkit has this nice sandbox example with a teapot being visualized.

https://github.com/helix-toolkit/helix-toolkit/wiki/Getting-started-with-WPF-3D

I was wondering if somebody could share something similar for the HelixToolkit + SharpDX extension. ( create basic lighting and a basic object, say a box, in a code as small as possible, preferable only in XAML )


This would be extremely helpful when taking a closer look at one certain functionality or when sharing a certain problem on this forum.


I don't' have much of a programming background, depending quite on the example in the source code, which tend to be rather bulky.

But honestly I don't have a clue how i would compress this in one smaller example that can be easily shared in a forum.


Can somebody help me out with this?









0

ZoomExtents not working as expected?

Frank 9 years ago 0

I'm using a HelixViewport3D to display a collection of Point3D objects derived from raw magnetometer readings. Magnetometer X,Y,Z reading can vary from very small values (<< 1) to well over 5000.


When my program starts, I load a small collection of points whose radius is <= 1, as shown in Figure 1

Image 24


After loading my actual magnetometer data, all points are very far off-screen (Figure2), but zooming out with the mouse wheel allows me to see them all, and rotate/pan/zoom as desired (Figure3):

Image 25


Image 26


I decided to try calling ZoomExtents() after loading all the magnetometer points, in order to avoid having the user panic when no points were visible immediately after loading, but this resulted in points being clipped regardless of the zoom level produced by zooming in or out with the mouse wheel (See Figure4 below). I also tried using the 'S' command to move the camera position out, but the camera position moves so slowly using this method that it was unusable for my purposes.


Image 27


At the moment, I'm not quite sure how to proceed. Any idea what I'm doing wrong with the ZoomExtents() command?


TIA,


Frank


0

EllipsoidVisual3D problems

Frank 9 years ago updated 9 years ago 7

I am rendering a point cloud in WPF using PointsVisual3D and Point3DCollection. This all works well, and I now want to put a set of 3 principal plane-oriented 3D ellipses into the view as a set of reference circles. I am currently using 3 EllipsoidVisual3D objects with two of the radii set to 1 and the third set to zero to accomplish this, but I have a couple of problems

  • I can't seem to change the fill color. I have tried using the material and/or Fill properties for this, but nothing seems to affect the default (black) color
  • I would really like to have these objects be rings instead of disks, so they obscure as few data points as possible, but I can't figure out how to do this, either :-(

Any thoughts or pointers would be appreciated.


TIA,


Frank


0

How to perform mouse click hit testing on ModelVisual3d models in Helixtoolkit

Suran Mahawithana 9 years ago updated by Joe Soap 5 years ago 2

I am developing an application using Helix toolkit in which users are given control to click on the individual 3d models that have loaded and manipulate them independantly. 3d model loader in my application can load ModelVisual3D type models. the tutorials so far I could find were on performing hit testing on Model3D type models which didn't work with ModelVisual3D type whatsoever. Can anybody help ?