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

Click to select the model

Smile 5 years ago updated by ไอยดา สุรีวงค์ 3 years ago 1
  • 我使用以下代码导入了多个模型


Microsoft.Win32.OpenFileDialog对话框=

新的Microsoft.Win32.OpenFileDialog();

dialog.Filter =“3dFile | * .obj”;

if(dialog.ShowDialog()== true && System.IO.File.Exists(dialog.FileName))

{

ObjReader CurrentHelixObjReader = new ObjReader();

Model3DGroup MyModel = CurrentHelixObjReader.Read(dialog.FileName);

ModelVisual3D model = new ModelVisual3D();

model.Content = MyModel;

View3D.Children.Add(模型);

MessageBox.Show( “成功!”);

}


但是,如何通过单击鼠标选择模型并移动它

0

Mouse bindings

nsy 5 years ago 0

Does anyone know how to change the mouse bindings? At the moment, the right mouse button is used to rotate the object. I would like to move this binding to the left mouse button and free up the right mouse button. The right mouse button will be used to display a context menu.

0

Loading Objects and Meshbuilder Questions

Bob 5 years ago 0

First off, I do not want to waste anyone's time here.  I have searched extensively for answers to my questions but honestly, I haven't found a centralized source where one can go to learn about the Helix Tool Kit.  Any suggestions for the definitive source would be very helpful.


Loading an OBJ model

I am writing an application that is basically an IMU head tracker.  I have used Helix to create three viewports; one each for front, top, and side views.  I am using the teapot for the object.  I have it working where the teapot in each viewport rotates according to the data from the IMU.  I have an OBJ file of a human head and for the life of me, I can't seem to get that file to load.  I don't see the need to load it programmatically.


From an example I found, I added:


<Helix:FileModelVisual3D x:Name="Head3D" Source="c:\malehead.obj"/>

in place of:


<Helix:teapot\>

Is that all that is necessary?  FYI: If I have to do it programmatically, I am using VB, not C# in Visual Studio.


Meshbuilder


I also want to create a POV viewport.  I will have a wireframe sphere with the origin at 0,0,0.  The perspective camera will also be at 0,0,0 so the camera will be showing the wireframe from inside the sphere.  The camera will rotate in three axis based on the incoming IMU data.  Placing text on the wireframe showing the angular distance from 0,0 would be icing on the cake.

I just have not been able to find any example, tutorial, or documentation on how Meshbuilder is used.

Your help is greatly appreciated.

0

Tubidy Mobi

tubidy3 5 years ago updated by anonymous 5 years ago 1
Music comes among the most beautiful and most pleasant hobbies for many. People feel good by listening to music and feel quite good and so naive. Nowadays, when the technology is developing so well, it can be seen that pleasant options will come to the fore in smartphones and tablets, and the most rare works are now carried in the tubidy mobile, and every time and anytime these music can be listened to offline. Among the quality options used in this sense, the tubidy application draws attention.

This application provides assistance in listening to music downloaded from the internet, and is also the most popular way to listen to tubidy mp3. All kinds of smartphone and tablet device that can be downloaded, is extremely simple to install and at the same time also free with this application, anyone can carry all kinds of pieces can no longer carry. It is possible to listen to the songs that are pocketed at leisure times, at rest times or at every place that comes to mind.

The fact that the tubidy music download option is active as its most functional function further highlights this application. Listeners can download songs from Youtube and make their own list and listen to the downloaded songs without the need for internet. Then they can enjoy the application in order to experience the most beautiful and pleasant moments.
0

plane and 3d model intersection

Armaghan 5 years ago 0

hello. how can I cut a 3D model using a plane in helix ?

0

Using FbxSharp for FBX imports?

enjlectric 5 years ago updated by Christophe PINNA 4 years ago 1

Hello,

for a project of mine it would be convenient if I could find a way t o import FBX files into the Wpf.SharpDX version of the toolkit.

https://github.com/izrik/FbxSharp

I have found this FBX Parser for C# and am currently trying to read my way into that, but as I am doing so I'm wondering if anyone else has tried the same, or if this can even possibly yield any good results. I've only started using Helix earlier this week so I'm not exactly an expert, so there may aswell be a logical impossibility when trying to convert a model from the FBX scene class to the Object3D class. If that's the case, I would like to know where these problems lie, out of curiousity.

Thank you for reading.

0

Show axis scale

Artem Artem 6 years ago updated 6 years ago 0

Hello.

I'm just stuck.

I've starte research Helix-tookit. I very like, but I have some troubles.

 I want to display axis scale(perfectly it's display real numbers corresponding to grid node)

Markup looks like

--------------------------

<Window x:Class="UpDirectionDemo.MainWindow" 
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:h="clr-namespace:HelixToolkit.Wpf;assembly=HelixToolkit.Wpf" Title="UpDirectionDemo" Height="480" Width="640" xmlns:local="clr-namespace:UpDirectionDemo" > 
 <DockPanel> 
 <TextBlock DockPanel.Dock="Top" HorizontalAlignment="Center" Text="HelixViewport3D.ModelUpDirection = 0,1,0" Padding="8" Foreground="Black"/> 
 <h:HelixViewport3D x:Name="view1" CameraRotationMode="Turntable" ModelUpDirection="0,1,0" ShowCoordinateSystem="True" > 
 <h:HelixViewport3D.Camera> 
 <PerspectiveCamera Position="5, 30, 40" LookDirection="-5, -30, -40" FieldOfView="45" UpDirection="0,1,0"/> 
 </h:HelixViewport3D.Camera> 
 <h:DefaultLights/> 
 <h:CoordinateSystemVisual3D ArrowLengths="10" /> 
 <h:BillboardTextVisual3D Position="12 0 0" FontSize="24" Text="X" /> 
 <h:BillboardTextVisual3D Position="0 12 0" FontSize="24" Text="Y" /> 
 <h:BillboardTextVisual3D Position="0 0 12" FontSize="24" Text="Z" /> 
 <h:GridLinesVisual3D Normal="0,1,0" LengthDirection="1,0,0"/> 
 </h:HelixViewport3D> 
 </DockPanel> 
</Window> 

--------------------------

I cant find this params. I've just only found ThetaDiv in ArrowVisual3D class. 

Is any way to display to display what I want? Thearetically I can create my own class MyArrowVisual3D(extends from ArrowVisual3D ) and create method for display it, but it to complex, I guess.

Thx!



0

Trouble rotating the 3D object in WPF

JMaroun 6 years ago 0

Hello,


I have been experiencing trouble when I try to rotate the 3D object that I have loaded into my main window by X, Y and Z coordinates and I was wondering if I could see an example project where this is fully implemented. Basically I want to be able to feed a degree in and be able to rotate the model by that degree in the specified axis. The model behaves very weirdly when I try to do this so any code that has this functionality would be of much help. 

Thanks!


Johnny

0

hierarchical 3D model via Visual3D and AddVisual3DChild -> only root is rendered...

LuNo 6 years ago updated 6 years ago 1

Hi,


I am relatively new to the HelixToolkit and I have a (probably simple) question: I want to build a scene out of several .stl files and I aim to employ parent/children relations in order to apply transforms to the whole hierarchy "automatically".
I created the following class to represent a mechanical axis (imagine a robot arm with a few scene graph nodes), but when I build up the data structure, only the root is rendered. The strange thing is: The Visual3D objects cannot be added to the Viewport3D once they have been set as a child somewhere else (e.g. after I added the Visual3D children to the parents, this is expected behaviour afaik). But these children are not rendered (except the root). I do assume I am missing some event or notification I should trigger? I browsed through most of the examples, usually a Model3D is built on the fly if an aggragation of meshes is needed. I would be grateful for any hints in this matter.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Windows;
using System.Windows.Media.Media3D;
using PropertyTools.DataAnnotations;
using BrowsableAttribute = System.ComponentModel.BrowsableAttribute;

using HelixToolkit.Wpf;

namespace Vizualizer_WPF
{
    //class MachineAxis3D : UIElement3D
    class MachineAxis3D: ModelVisual3D
    {
        public static DependencyProperty RotationAngleProperty = DependencyPropertyEx.Register<double, MachineAxis3D>("RotationAngle", 0, (s, e) => s.AppearanceChanged());
        public static readonly DependencyProperty PrincipalDirectionProperty = DependencyPropertyEx.Register<Vector3D, MachineAxis3D>("PrincipalDirection", new Vector3D(1, 0, 0), (s, e) => s.AppearanceChanged());

        public MachineAxis3D()
        {

        }

        [Category("AxisProperties")]
        [Slidable(0, 360)]
        [Browsable(true)]
        public double RotationAngle
        {
            get
            {
                return (double)this.GetValue(RotationAngleProperty);
            }

            set
            {
                this.SetValue(RotationAngleProperty, value);
            }
        }

        public Vector3D PrincipalDirection
        {
            get
            {
                return (Vector3D)this.GetValue(PrincipalDirectionProperty);
            }

            set
            {
                this.SetValue(PrincipalDirectionProperty, value);
            }
        }

        public int ChildrenCount()
        {
            return this.Visual3DChildrenCount;
        }

        public void AddChild(Visual3D visual3D, Model3D model3D)
        {
            Model3DGroup newGroup = new Model3DGroup();
            newGroup.Children.Add(this.Content);
            newGroup.Children.Add(model3D);
            Content = newGroup;
            AddVisual3DChild(visual3D);
        }        

        // handles the rotation of the axis
        private void AppearanceChanged()
        {
            var tg = new Transform3DGroup();
            tg.Children.Add(new RotateTransform3D(new AxisAngleRotation3D(PrincipalDirection, RotationAngle)));
            Transform = tg;
        }
    }
}



0

HelixToolkit.SharpDX - Transparent billboard

Isdas 6 years ago 0

Hi


Great work on the new version of HelixToolkit! Really impressed by the work done!


A small question: When I set the transparency of a billboard to Color.Transparent the billboard gets transparent (great). One small problem I have right now: other billboards that are behind this billboard gets cut. Is there any way of solving this problem?


Picture:

Image 110


Best regards

Isdas