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

Same 3D-Model act like different one?

Ardahan 10 years ago updated 10 years ago 1

I load STL files to helixviewport3d and store them in dictionary as key and file name as value.

But then I load same STL file and check if it is already in dictionary. But then It is not found and adding same model into viewport. where do i go wrong?


0

Listener on camera change

Anonymous 11 years ago 0
This discussion was imported from CodePlex

chriskro wrote at 2013-11-05 12:58:

Hi,
is there any chance to be able to register if the camera of the viewport is changed?

Greets,

Chris

chriskro wrote at 2013-11-05 13:11:

HelixViewport3D.CameraChanged fires the right event.
0

How to tell TextVisual3D dimensions

Michael Powell 11 years ago updated by ไอยดา สุรีวงค์ 4 years ago 8
I want to determine the size, length or width, of a block of TextVisual3D, especially for purposes of measuring and placing it in a scene. Is this possible? I don't see it in the TextVisual3D itself. Would it be possible to coordinate that issue embedding a text in a RectangleVisual3D in the appropriate dimensions, UpDirection, TextDirection, etc? However, along these lines, I'm not sure I see any options for HorizontalAlignment or VerticalAlignment, i.e. 'Stretch'.
0

MeshBuilder Revolve WPF Lines

Anonymous 11 years ago 0
This discussion was imported from CodePlex

mcrxb wrote at 2012-01-18 18:43:

Hello,

Is it possible to use MeshBuilder to create a revolved mesh from WPF lines and arcs?

Thank you!


objo wrote at 2012-01-18 18:50:

see the AddRevolvedGeometry method:

public void AddRevolvedGeometry(IList<Point> points, Point3D origin, Vector3D direction, int thetaDiv)
This creates a mesh from a 2D curve and an axis of revolution (x coordinates are radius and y coordinates are distance along the axis). ThetaDiv specifies the number of points around the mesh.


mcrxb wrote at 2012-01-23 13:24:

Thanks for the quick reply. I was wondering, though, if I could take a WPF object like Path and revolve that. If not, do you have a small sample app that utilizes MeshBuilder for creating revolves? I couldn't find any uses in the sample applications.

Thank you.


objo wrote at 2012-01-26 20:07:

Most of the Visual3D classes in the toolkit is using the MeshBuilder to generate the geometry. See the ArrowVisual3D.Tesselate() method (using an AddArrow method that again uses AddRevolvedGeometry).

No, the revolve method is not accepting Path objects (this would be more work to support all the different path segment types), it just takes a simple list of points. 

0

Camera view of rectangles

Nit29 10 years ago 0
Hi

I am new to 3d manipulation esp with helix toolkit.
Am trying to have a camera fixed to a side of rectangle. When the rectangle is rotated or moved, the camera should relatively change it's view. Is there any property that ties the camera to an object or a specific vector of an object? Also, there will be 2 rectangles used as planes intersecting making an 'X' shape from the top view. So there has to be 2 views of one side of each plane and a top view.

I am looking forward to understand a way to make this work.Thanks!
0

Display the 3D mesh

Anonymous 11 years ago 0
This discussion was imported from CodePlex

kirru wrote at 2013-11-16 10:06:

Wishes everyon,
                   I loaded the .obj file into WPF visual c# application, now the issue is how to display the mesh generated by that .obj file using Helix tiilkit. Any help is appreciated.

objo wrote at 2013-11-19 22:27:

Have a look at the examples on how to create a "HelixViewport3D" and add a .obj file model!
See Source\Examples\SimpleDemo and Source\Examples\ModelViewer and http://www.nudoq.org/#!/Packages/HelixToolkit/HelixToolkit.Wpf/ObjReader
0

Two questions on Manipulator

Anonymous 11 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 11 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 11 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 11 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!