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

Help in translate/redraw a triangle geometry using a set of new points in 3D
pyrrhicpk1 wrote at 2012-10-16 11:37:
Hi,
I am able to draw a triangle using meshbuilder with Heli3DToolkit given three points in 3D space. My program updates these points and I want the triangle to get updated as well i.e. redrawn on the new points. How to do this?
At the moment I am re-creating the triangle using meshbuilder every time new set of points are available. This is working but computationally very expensive. It is also causing the UI to respond slowly. I was wondering if there could be a way to apply some transformation to the triangle geometry and re-position it to the new points rather than creating new triangle geometries.
Pleas guide me in this regard.
Thanks
objo wrote at 2012-10-16 15:37:
You should replace the positions only, it is not necessary to create new triangle indices and a new MeshGeometry3D instance.
See also http://msdn.microsoft.com/en-us/library/bb613553.aspx
pyrrhicpk1 wrote at 2012-10-17 04:17:
objo wrote:
You should replace the positions only, it is not necessary to create new triangle indices and a new MeshGeometry3D instance.
See also http://msdn.microsoft.com/en-us/library/bb613553.aspx
You mean, I should apply a TranslateTransform3D to my triangle geometry to reposition it to the new position. But, what would be this new position? My program is only updating the position of three spheres which I am using to create a triangle. So, when I get a new set of positions for these three spheres, how should I redraw/re-position my triangle geometry to these new positions? Could you please guide me with a few lines of sample code.
Thanks.
pyrrhicpk1 wrote at 2012-10-17 04:44:
I am creating a triangle as follows:
meshBuilder.AddTriangle(new Point3D(x, y, z));
var mesh = meshBuilder.ToMesh(true);
myTrianglegeometry = new GeometryModel3D();
myTrianglegeometry.Material = greenMaterial;
myTrianglegeometry.BackMaterial = yellowMaterial;
myTrianglegeometry.Geometry = mesh;
modelGroup.Children.Add(myTrianglegeometry);
myModelVisual3D = new ModelVisual3D();
myModelVisual3D.Content = modelGroup;
Now my program is updating the values for x, y, and z. So, I am calling the above code for each update of x, y, z which creates a new triangle every-time a set of new x,y,z are available. This works but computationally very intensive and causes the UI response very slow.
To avoid this, how should I re-draw/re-position "myTrianglegeometry" to the new values of x,y,z rather than creating new triangles? Is it possible to change the vertices of the "myTrianglegeometry"?
Please guide me in this regard.
Thanks.
objo wrote at 2012-10-17 08:40:
if you are drawing a single triangle I think you should create the MeshGeometry3D directly, not using the MeshBuilder.
See http://msdn.microsoft.com/en-us/library/bb613553.aspx
This section is important:
|

Mulitple import
JohnyWhite wrote at 2013-07-17 23:51:
I'm trying to learn Helix toolkit and started with analysing and modifying Model Viewer. I see that the object is loaded with the code:
var importer = new ModelImporter();
CurrentModel = importer.Load(CurrentModelPath);
However this code removes the previously loaded model. Could anyone advise how to load multiple objects.Any help (piece of code) will be much appreciated.
JohnyWhite wrote at 2013-07-18 01:00:
https://helixtoolkit.codeplex.com/discussions/406298
When I get it running, I will post my code.
Mrme wrote at 2013-07-19 10:56:

Moving manipulators by Code
rocheey wrote at 2012-07-23 20:56:
Great Toolkit. Im just getting started and Im already blown away.
I created a TruncatedConeVisual3D , as well as as a TranslateManipulator, in XAML, that is bound to the Cone Transform.
The Cone moves along the designated Axis correctly when dragging the TranslateManipulator
But after I move the Cone/manipulator in code using: (VB.Net)
OriginManipulator.Transform = New TranslateTransform3D(XShift, 0, 0) Cone1.Transform = New TranslateTransform3D(XShift, 0, 0)
The Pair update, but I am unable to drag the mouse on the manipulator afterwards. The manipulator seems frozen in that spot, but dragging the mouse anyway moves the Cone (but the manipulator stays in place)
Am I going about this the right way ?

Custom Billboard
aueit wrote at 2014-08-12 16:01:

Bug in MaterialHelper.ChangeOpacity
soheilvb wrote at 2012-04-14 00:35:
hi again .
in MaterialHelper.ChangeOpacity you forgot to add support for ImageBrush :
I just add this lines
var scbi = dm.Brush as ImageBrush;
if (scbi != null)
{
scbi.Opacity = d;
}
after
if (scb != null)
{
scb.Opacity = d;
}
and problem solved.
objo wrote at 2012-04-14 00:38:
Thanks for pointing this out! Actually, the code could be changed to
var dm = material as DiffuseMaterial; if (dm != null && dm.Brush != null) { dm.Brush.Opacity = d; }

How to show a 3D points cloud (and each point has a RGBA color value)
yetangye wrote at 2013-03-12 09:39:
I saw two discussiones has metioned that use PointsVisual3D can display point cloud,
But after I gave a look into the PointsVisual3D source code, I found it can not display a 3D point cloud which have color values on those points.
Is there any component in Helix 3D Toolkit which can show 3D model from a 3D point cloud with colors?
Thanks.
objo wrote at 2013-04-15 13:03:
To show different colors, you need to set texture coordinates on each point and use a brush material containing the colors!

CuttingPlane giving Exception with Pipe - Version 2014 1.1.1
terry_513 wrote at 2014-02-12 13:14:
textureCoordinates.ForEach(meshBuilder.TextureCoordinates.Add)
meshBuilder.TextureCoordinates in the class is null. My code is :
PipeVisual3D pipe1; // = DrawPipeOrg();
pipe1 = new PipeVisual3D
{
Point1 = new Point3D(0, 0, (-10 - 0.1)),
Point2 = new Point3D(0, 0, (-15 + 0.1)),
Diameter = 2*7.86,
InnerDiameter = 2*1.5,
// Material = HelixToolkit.Wpf.Materials.Green,
// BackMaterial = HelixToolkit.Wpf.Materials.Green
};
model.Children.Add(pipe1);
c = new Plane3D { Position = new Point3D(0, 0, -10), Normal = new Vector3D(0, 0, -1) };
cuttingGroup1.CuttingPlanes.Add(c);
In previous version I had used the same code and it was working perfectly well. But in 2014 1.1.1, it throws this exception. I tried with BoxVisual3D & Rectangle & it does work, but seems their is some problem with PipeVisual3D with CuttingPlane.
Objo, Can you please look into the matter and make it working.
Please help me out with this, couldn't find any way for this issue.
Thanks.

Zoom Rectangle
rufus9876 wrote at 2011-09-23 17:18:
First of all I want to say thank you for the good work with this toolkit!
I found a strange behaviour setting the ZoomRectangleCursor. It will show no effect. The reason may be the missing
ZoomRectangleCursor="{TemplateBinding ZoomRectangleCursor}"
within the ControlTemplate in "Generic.xaml".
objo wrote at 2011-09-30 07:46:
thanks for the fix! I have checked it in, #70897.

OBJ distorted texture
BCBlanka wrote at 2013-03-19 10:12:
I have a few complex obj models for which the texture isn't drawn correctly. The texture is drawn correctly in MeshLab, AC3D or GLC player, but not in Helix.
http://dl.dropbox.com/u/92726618/obj%20Models.zip
I am using Helix v. 2013.1.10.1.
Any help is appreciated.
Cheers,
Blanka
BCBlanka wrote at 2013-04-23 16:33:

Strange behavior with reverse axis and rendering
murray_b wrote at 2012-06-18 03:05:
Hi Objo
I have come across some strange behavor that I don't understand the reason for.
I recently reversed on the of the axis so that it matched the underlying data I am using.
ModelUpDirection=new Vector3D(0,0,-1);
This then draws the data correctly, but I am getting a lot of flickering on my screen. My view is mostly meshed polygons. ( using GeometryModel3D).
There are flat polygons sitting on top of each other ( 0.1 apart). But now the view is not drawing this correctly. It flickers a lot and the polygon mesh from behind is shown in front in places its like it can't work out the z levels even though the two shapes do not touch.
If is rotate the view and look at it from the reverse direction it draws correctly and the flickering disappears.
Do you have any idea why this might be happening?
Please let me know if my explanation is not detailed enough
regards
Murray
Customer support service by UserEcho