For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!
error in deisgner: The type 'HelixToolkit:HelixViewport3D' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built
Noylene wrote at 2013-01-21 14:47:
why do I have this error when opening XAML designer in any example project, or creating my own (adding reference manually or with Nuget, doesn't matter)?
In editor IntelliSense 'knows' namespace HelixToolkit but don't know anything inside it
Beside this, project compiles and runs
VS2010, .Net 4.0
mannest wrote at 2013-01-25 06:47:
I have same problem.
Did you build HelixToolkit.Wpf_NET40 project in x64 platform?
In my case, no problem in x86 platform built.
Anyway, I don't know how to solve that problem in x64 platform.
Noylene wrote at 2013-01-25 07:07:
No, it's x86, WinXP
JohnSourcer wrote at 2013-01-25 07:10:
It's a known problem and doesn't affect the build. There are several reports of this and workarounds/solutions. Most common seems to be issues with 64 bit vs 32 bit builds and dll's.
Help using Meshbuilder to create a line between two spheres
pyrrhicpk1 wrote at 2012-10-15 11:40:
Hi,
I am using the following code to draw a sphere in HelixViewport3D. Now I want to create a 3D line between two spheres. Any suggestions please.
Thanks
var meshBuilder = new MeshBuilder(false, false);
meshBuilder.AddSphere(new Point3D(0, 0, 0), 0.1f, 10, 10);
var mesh = meshBuilder.ToMesh(true);
modelGroup = new Model3DGroup();
var greenMaterial = MaterialHelper.CreateMaterial(Colors.Green);
var insideMaterial = MaterialHelper.CreateMaterial(Colors.Yellow);
mygeometry = new GeometryModel3D();
mygeometry.Material = greenMaterial;
mygeometry.BackMaterial = insideMaterial;
mygeometry.Geometry = mesh;
modelGroup.Children.Add(mygeometry);
myModelVisual3D = new ModelVisual3D();
myModelVisual3D.Content = modelGroup;
myview.Children.Clear();
myview.Children.Add(myModelVisual3D);
objo wrote at 2012-10-16 15:36:
use a cylinder? See MeshBuilder.AddCylinder
To draw a line, try LinesVisual3D.
InvalidOperationException when setting opacity
keegean wrote at 2011-10-27 01:34:
I was trying to change the opacity on a material using the MaterialHelper and it gave me the following exception:
System.InvalidOperationException was unhandled by user code
Message=Cannot set a property on object '#FFFFFF00' because it is in a read-only state.
Source=WindowsBase
StackTrace:
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean
isInternal)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value)
at System.Windows.Media.Brush.set_Opacity(Double value)
at HelixToolkit.MaterialHelper.ChangeOpacity(Material material, Double d)
at HelixToolkit.MaterialHelper.ChangeOpacity(Material material, Double d)
at Boids.BoidsViewModel.AddSightBoxes()
at Boids.BoidsViewModel.set_ShowSight(Boolean value)
InnerException:
I had created a Visual3D object and I set the material on it. I wanted to change the opacity so I used the helper. I passed in the Material of the Visual3D object, that is when I received this exception.
objo wrote at 2011-10-27 08:59:
is your material frozen? can you try changing the material without the helper method from Helix Toolkit?
keegean wrote at 2011-10-29 14:54:
I think the material was frozen. I was able to create the material and then modify it with the helper and then set on the object.
This api was accessed with arguments from the wrong context
We are adding and removing the ModelVisual3D object using background worker process and we got the the following error message:
Error : "This api was accessed with arguments from the wrong context"
Here is my code:
Private Sub backgroundWorker_ProgressChanged(sender As Object, e As ProgressChangedEventArgs)
Dim list = helixViewport3D.Children.OfType(Of ModelVisual3D).ToList()
Right Mouse click
egse wrote at 2014-02-04 16:05:
I am trying to get a hit test on the right mouse click.
However, I think the viewport is consuming the Event even I don't want to rotate. Is it possible to only consume the Event if the mouse has moved during the mousedown Event?
Reset camera on Zoom
JohnSourcer wrote at 2013-01-23 11:41:
Hi All,
I configure a camera at a sphere as follows, but when I zoom and then rotate it, it no longer rotates the sphere but seems to remember the original axis and rotates around that. Do I have to reset it or is there some way of always making sure it rotates around the center of the sphere:
view = sender as HelixViewport3D; CameraController cameraController = view.CameraController; cameraController.IsPanEnabled = false; cameraController.CameraRotationMode = CameraRotationMode.Turntable; cameraController.TouchMode = TouchMode.Rotating; cameraController.CameraMode = CameraMode.Inspect; cameraController.InertiaFactor = 0.5;
objo wrote at 2013-01-23 20:25:
Maybe the up axis (the ModelUpDirection property) should be changed to 0,1,0? (in this toolkit the default up axis is 0,0,1)
JohnSourcer wrote at 2013-01-24 12:27:
Thanks for the reply, objo.
Sadly that doesn't help. You can observe this behaviour in your Earth Demo. If you start infinite spin rotation on the globe, stop it, scale the globe (down or up) and then start infinite spin again.
BTW, this is an excellent bit of work. I know others have mentioned this but I too would be happy to pay for it. Reasonably ;)
BillboardVisual3D emissive text
DavidBrough wrote at 2014-03-20 00:27:
Any hints on how to fix this?
objo wrote at 2014-04-29 10:50:
edit obj
HI!
For an extention of my masterthesis, I need to calculate and present flowpaths of an digital surface model.
Therefore I have to questions.
1. i can import an *.obj-file with helix in a viewport with:
var modelImporter = new ModelImporter();
modelImporter.DefaultMaterial = material;
Model3DGroup model3DGroup = new Model3DGroup();
model3DGroup = modelImporter.Load("C:/exampleAreas/Area01.obj");
ModelVisual3D newVisual = new ModelVisual3D { Content = model3DGroup };
MyView.Children.Add(newVisual); // add it to the viewport
but how can I get acess to the geometry of the *.obj to readout the normal-vectors?
2. Is it possible to interact with the positions of the vertices of a loaded *.obj-file?
The hidden agenda is: manipulating the loaded *.obj-file, so the user can modify the height of vertices and change the flowpath.
It would be great if someone could give my a hint or small example :-)
Thanks for reading!
greetings!
Visual Studio 2010
rroveri wrote at 2012-10-22 16:03:
Hello,
i am not able to open the examples with Visual Studio 2010. Does anybody else have the same problem?
Thanks in advance
Riccardo
objo wrote at 2012-10-22 19:53:
Hi Riccardo, the examples are converted to .NET 4.5 and requires VS 2012 to compile. The HelixToolkit.Wpf library contains projects for both 4.0 and 4.5, but I don't want to maintain two sets of project files for all the examples.
To build with .NET 4.0, simply change the TargetFrameWorkVersion to v4.0 in the csproj files, no other change should be necessary!
rroveri wrote at 2012-10-23 16:27:
Thank you, changing the target did the job.
AddPolygon works only for convex polygons
baucez wrote at 2012-05-07 14:40:
I tryed to use MeshBuilder.AddPolygon to draw a concave polygon and it does not work as expected. In fact the method uses a TriangleFan in case of more than 4 points. That is ok if the polygon is convex but does not work in the other cases.
I think Delaunay triangulation is something that can be used in this case.
Is it implemented in the toolkit?
Does exists any work around?
Thanks
objo wrote at 2012-05-07 17:49:
Right, the AddPolygon method only works for convex polygons. A simple polygon triangulation method has been implemented in Geometry\CuttingEarsTriangulator.cs, maybe you can use this?
baucez wrote at 2012-05-08 12:30:
Great! It works perfectly!!
I was wondering why you don't use it in the mesh builder for polygons. I understand that the computational time is higher but it works in every case.
Customer support service by UserEcho