For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!
Show axis scale
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!
Trouble rotating the 3D object in WPF
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
hierarchical 3D model via Visual3D and AddVisual3DChild -> only root is rendered...
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;
}
}
}
HelixToolkit.SharpDX - Transparent billboard
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:
Best regards
Isdas
Need help with modelImport with large complex STL (= 3D scans etc )
I have developed a WindowsFileExplorerShellExtension using HelixToolkit to show STL files in the Windows File explorer.
Everythings works fine with normal "human made" STL-files, but scanned 3D models converted to STL becomes large and I get OutOfMemory violation at modelimporter.
I have a simplified VS 2017 solution that contains a simple testapplication and a simple STL viewer that popsup when a file is coosen or Drag-n-Droped.
This is the method I have used to create the model
QUESTION?? Is there a better way to create a model from a STL file??
public void ViewNewStl(string filename)
{
// WTF!! No file
if (!File.Exists(filename)) return;
// Check the file extension to be STL
FileInfo fileInfo = new FileInfo(filename);
if (fileInfo.Extension.ToLower() != ".stl") return;
ModelColor = "Blue";HelixToolkitTestApplication.ziptestapplication
Filename = filename;
// Create a model of the STL file
try
{
ModelImporter modellImporter = new ModelImporter();
modellImporter.DefaultMaterial =
new DiffuseMaterial(
new SolidColorBrush((Color)ColorConverter.ConvertFromString(modellColor)));
Model3DGroup model3DGroup = modellImporter.Load(filename);
StlModel.Content = model3DGroup;
myViewPort3D.CameraController.ResetCamera();
myViewPort3D.CameraController.ZoomExtents(0);
}
catch (Exception e)
{
Debug.WriteLine($"modelimporter crash {e.Message}");
}
}
Interaction of mouse with 3D *.obj file
Hi all,
I have imported a car as *.stl file. I want to add some "devices" onto it for visualization.So When I perform a right click on the Car, at this position a Sphere should come up. I want to do a doubleclick on that sphere, and enter something like name, filepath for a text file and so on.
Also I want to ensure, that the user can not add multiple spheres over each other on the same position.
It tried to cath this situation with the following:
if (!CreatedDevices.Any(t => Math.Abs(t.Center.X) + 300 > mousePos.X))
So the mousePos is the position of my mouse and the CreatedDevices is a list of spheres with their properties like center and radius etc..
However, I am not able to doubleclick on a sphere and do something, and in addition to that the mouse position.x is sometimes -83 and the sphere position.x is 1200. I think it has something to do with the Coodinate system of my obj file and that my mouse is not in the same coordinate system. is this possible? I attached my whole project - I need some urgent help because I have no clue how to go on from here... thanks a lot!My project should be attached.
Visual Studio 2017 Xamarin
Hi!
Is it possible to use HelixToolkit in Xamarin projects on Visual Studio 2017?
I can import the DLLs from Nuget, but they are marked by a warning sign.
My Xamarin project targets .Net standard 2.0.
Thanks!
Silhouette edge shader
Does anybody see a possibility to create a silhouette or edge shader to highlight edges?
Could I write it by my own, or does helix toolkit already provide something like this?
3D visualization from the kinect feed
I need to visualize the feed from Kinect in 3D. Is there an open source project using Helix Toolkit for this? The HelixToolkit.Kinect.sln project gives an error when building it saying that it's output is a class object even after changing it and assigning a startup object in project settings?
Is it possible to create a mesh editor
It is possible to create a mesh editor with Helix Toolkit? I would like to be able to be able to modify vectors, edges and faces by dragging on a design surface.
Customer support service by UserEcho