For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!

Material/Texture can't be loaded in HelixViewport3D
charismatubagus wrote at 2013-01-25 07:50:
Hi I am a newbie in HelixToolkit. I would like to load 3D model (.obj and .mtl) into the scene. However, I can only load the object. The material can't be seen.
This is my code.
<h:HelixViewport3D Canvas.Left="377" Canvas.Top="253" Name="helixViewport3D1" Margin="195,190,185,12"> <h:FileModelVisual3D x:Name="model3D" > </h:FileModelVisual3D> </h:HelixViewport3D>
string _3DClothPath = (string)Application.Current.FindResource("3DClothes");
model3D.Source = _3DClothPath;

Box Selection
rinaldin wrote at 2013-10-27 13:25:
I'm trying for a long time to implement the box selection on the control using ContainerUIElement3D.
The last step in the box selection is to recognize which 3d objects are included, partially or totally, in the rectangle created with the mouse by the user ove the viewport.
To do this, I wrote the following code:
For Each element As ContainerUIElement3D In HelixViewport3D1.Children
Dim position = Overlay.GetPosition3D(element)
Dim position2D = matrix.Transform(position)
If position2D.X > rectOrig.X And position2D.X < (rectOrig.X + rect.Width) And _
position2D.Y > rectOrig.Y And position2D.Y < (rectOrig.Y + rect.Height) Then
' select element
Dim element1 = TryCast(sender, ModelUIElement3D)
Dim model = TryCast(element1.Model, GeometryModel3D)
If model.Material Is Materials.Green Then
model.Material = Materials.Yellow ' is selected!
ElseIf model.Material Is Materials.Yellow Then ' deselect
model.Material = Materials.Green
End If
End If
Next
but I receive every time an Invalid Cast exception in the first row (for each...); it seems I cannot use the ContainerUIElement3D inside the helixViewport.
Can you help?

AddExtrudedGeometry
rinaldin wrote at 2013-10-28 15:52:
I tried to use it, but with no success. Instead, the ExtrudedVisual3D works fine.
Thanks,
Giovanni
rinaldin wrote at 2013-12-20 20:31:
objo wrote at 2014-01-07 22:34:
Can you use the AddTube method? It can take a general section.
AnotherBor wrote at 2014-01-08 02:15:
Yesterday I wanted to check it out for Rinaldin but even though params were logically correct the mesh was wrong.
All the faces were compressed to a single plane that seemed to be defined by the first pair of points in the section.
objo wrote at 2014-01-08 07:30:

Newbie help please
Lainy wrote at 2013-10-18 23:04:
Just how do I get helix control on my WPF application? I usually use VB but need\want to learn WPF as I want to learn some 3D object manipulation.
I added a helixToolkit.wpf.dll as a reference and expected a control to be available to drop onto my WPF app. But no...?
I have :
Imports System.Text
Imports System.Collections.Generic
Imports System.IO.Ports 'for COM port manipulations
Imports System.Windows.Forms
Imports System.Windows.Forms.FolderBrowserDialog
Imports System.Windows
Imports System.Windows.Media
Imports System.Windows.Media.Media3D
Imports HelixToolkit.Wpf
At the top of my MainWindow.xaml.vb...
Would be really grateful any pointers?
Thanks
DK_danik wrote at 2013-10-22 13:56:

Visual3D's pinned to the camera
RobPerkins wrote at 2012-11-08 17:28:
I'm trying to think of a way to add something like a BillboardVisual3D such that its position stays fixed relative to the camera. Ultimately it would have an ArrowVisual3D reaching from the Billboard into the model space itself, pointing at a feature.
This would mean that as the camera is rotated, panned, zoomed, etc, the control would stay "stuck" to the front of the frustum, as it were.
If I understand things correctly the camera in Helix3D is the thing doing the moving during panning, rotating, and zooming; no transformations are computed on the model itself.
How would you approach this?
objo wrote at 2012-11-12 22:15:
Yes, in this library the camera properties are modified, not the world or camera transforms.
You need to update the 3D positions of your visuals each time the camera move. I think you could create a plane at the camera 'target' position, with the camera direction as the normal vector. Then use Viewport3DHelper.GetRay and Ray3D.PlaneIntersection to calculate the 3D positions.
RobPerkins wrote at 2012-11-12 23:05:
Good; that signifies an approach I could take. What if instead of doing that, we simply position the control in the visual tree as a 2D ContentControl atop the viewport, and then extend an ArrowVisual3D from the frustum front to a world coordinate? Would the same ViewPort3DHelper and Ray3D methods be useful, or is there something simpler?
(Yes, I can figure this out on my own, but I thought the discussion here would be beneficial to others.)
objo wrote at 2012-11-13 06:05:
Yes, that should also work - I have tested 2D overlays in the ExampleBrowser/OverlayDemo. The "target" adorner and "zoom by rectangle" features in HelixViewport3D are also 2D overlays.

How to use Vector3D when Drawing a Box
AQSRanck wrote at 2014-07-01 20:31:
I have a list of points3D for each vertex of the polygon, and can easily find the vector3D for the next vertex by subtracting the previous point3D from the next point3D, giving me the length as well.
The first box would be added with an AddBox(StartPoint, X Double, Y Double, Z double). This works fine. The question is how to Add the next rim perimeter box?
Ideally, an addBox construct would require a StartPoint, Vector and XYZ Doubles, but none exists. So the question is how can I accomplish this with an existing constructor of the AddBox.
Or perhaps another tool is more suited.
Thanks,
Bob
objo wrote at 2014-07-02 13:11:
Why can't you
foreach (var vertex in yourPolygon) yourMeshBuilder.AddBox(vertex, 1, 1, 1);
AQSRanck wrote at 2014-07-02 15:35:
The boxes are arranged nicely around the perimeter but they are all aligned in the same direction.
What we want is for each box to start at one vertex and end at the next vertex.
I have some nice screen shots that illustrate my work in Helix, that I would like to share with you, but need advice on how to get them to you.
Bob
AQSRanck wrote at 2014-07-04 21:47:
The solution you propose draws a box at each vertex but even if the box is a long rectangle, does not allow the azimuth of the box to be oriented towards the next vertex.
Is there a tool that allows you to describe a start point and an end point for a Box (like a Pipe), or alternatively a feature that allows you to describe a start point, a vector , and xyz sizes for the box?
I have fooled around at length with the 4th construct on Box that uses a - - center Point , Vector, Vector, X Double, Y Double, Z Double, and Faces Enum. Since I don't know what this construct is intended to do, I get really crazy boxes, some with a side missing and some with sides drawn in very unusual places. So I suspect that this construct of the AddBox is not the answer.
AQSRanck wrote at 2014-07-23 15:23:
I work with 2D CAD (where the origin is the upper left) and have a really tough time in 3D changing the origin to the center of the figure - - - in my mind.
The first chapter of Petzolds book helped get me reoriented for 3D. The mystery of the crazy shapes (4th Construct of AddBox) was also solved in Petzolds book, where he introduced me to the "basis vectors". I built a tester project that allows you to change the values of points, vectors, and lengths with dependency properties for any of the Helix figures. It has turned out to be an invaluable as a tool to get my head around what is going on in 3D. It has also eliminated endless experimentation with values to see the effect.
When learning something new like 3D, the resources are rather slim, but Petzolds book should be everyone's primer.
Bob

Create events for objects created at runtime?
andrey7b wrote at 2012-11-20 11:16:
I'm using the components of the helixtoolkit to my application and I came across the following situation, when I create an object, a rectangle, for example, and within it I create another object, of type square, only smaller, I can't seem to find the events for this object, I want to move it using the mouse, how should I proceed? Or object created in this way does not have events?

Selection Methods (Rectangle/Polygon Pick)
MalcolmWadia wrote at 2012-11-28 12:57:
Hi,
Great job with this toolkit!
We are using a standard hit-test method in the Helixviewport3d but was wondering if anyone knew the best way to implement, for example, a box select method?
There doesn't seem to be any specific selector classes but it might be nice to have these.

Best place to trigger element sorting when camera position changes
PhilDotC wrote at 2014-04-17 23:12:
objo wrote at 2014-04-29 10:18:
Should the billboards be shown behind or in front of the other objects in the scene?
Can you create an example/demo?
PhilDotC wrote at 2014-04-29 13:02:
Download demo solution zip file
If you pan around you will see that depending upon which direction you are looking from the transparency works or doesn't depending on which billboard is nearest the camera. I need to add code to sort the viewport contents depending on their distance from the camera but I am unsure where to hook this in. It would be nice if the was a camera position changed event or something like that or perhaps you can suggest a better solution.
objo wrote at 2014-05-05 15:03:
I created https://helixtoolkit.codeplex.com/workitem/10046

How to render an arch
My math/geometry is a bit rusty, but I can puzzle it out.
Thank you...
Customer support service by UserEcho