For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!
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
problem with opacity change of objects
soheilvb wrote at 2012-04-14 09:22:
hi .
i am using lot's of models that overlap a lot. when i change opacity of a model the models behind that model just don't refresh ....
i use a method to remove the model and add it again to viewport3d and that somehow do the trick . but there's a lot of problem with this ...
isn't any method to just refresh the viewport ?
tnx a lot
soheilvb wrote at 2012-04-14 11:10:
i'm pretty sure the problem is when to add models to viewport3d. models that are added after the model that it's opacity has changed have problems.
but the models that are added before are ok with opacity and ... .
i mean the arrange in viewport3d.children is important.
so when i remove the model with opacity change and add it again to viewport . everything is fine . until in some point i want to change another model opacity and remove and add that again and that gets messy ...
i don't test it with Viewport3d and just tested it with Helixviewport3d .
murray_b wrote at 2012-04-16 05:52:
It sounds like your problem is to do with WPF transparency being determined by the order of the objects
See this article
http://www.ericsink.com/wpf3d/2_Transparency.html
I hope that helps
soheilvb wrote at 2012-04-16 06:15:
yes . the problem is z order .
my problem is a little complicated because i may have thousand transplant models that have intersections . then the simple remove add and remove won't solve it .the problem is managing lot's of transplant objects that have overlap ...
i wanna use Emissive Material but that has a lot of problems and ...
objo wrote at 2012-04-16 21:49:
It is hard to get around this with wpf 3D, unless you have a single transparent object. See the TransparencyDemo (using the HelixToolkit.SortingVisual3D) which demonstrates sorting within the limitations of wpf 3D.
To create renderings with transparent objects you can export the wpf model to an .obj file, and render in a package like Octane. See the ExportDemo, which will even start the renderer for you.
soheilvb wrote at 2012-04-17 04:17:
i have used SortingVisual3D. that's extremely slow and produce really strange results ...
tnx by the way ...
objo wrote at 2012-04-17 07:58:
Let us know if you find a bug or improvement to the code - I think it is quite limited what is currently possible to do with wpf 3d. The demo application shows what the SortingVisual3D can do, but it can of course not handle complex models.
Consider using directx/opengl and other techniques such as depth peeling!
Grid Lines working only for square
siv_inreco wrote at 2012-09-10 11:46:
Hi, i tried to use GridLines from Rhino Example, but when define Width = Length the grid lines drawing not correct. Please help to solve a problem.
Rotations query
Nikk wrote at 2013-07-03 03:07:
I'm new to this toolkit and it looks pretty good :) Nice and quick to get good controls and objects in place quickly.
I am building a simple app to help our users understand some 3D geometry. To that end
I have built some spheres with manipulators which seem to function as expected. I can move them around and rotate at will. What I would like to do now, is get a report out that details the bearings, in polar coordinates of the rotated objects. However I am unsure of what to query to get the new bearings of a shape after it has been rotated?
I'd really like to eventually be able to manipulate other 3D objects too, so knowing how to query either the manipulators, or the objects for their directions would be great.
Can anyone offer any guidance?
Here is a snippet of the code I have used to generate the sphere and manipulator:
var builder = new MeshBuilder(true, true);
var position = new Point3D(0, 0, 0);
builder.AddSphere(position, 1);
var geom = new GeometryModel3D(builder.ToMesh(), Materials.Red);
var visual = new ModelVisual3D();
visual.Content = geom;
r1Manip = new RotateManipulator();
r1Manip.Color = Colors.Orange;
r1Manip.Axis = new Vector3D(0, 0, 1);
r1Manip.Diameter = 1;
r1Manip.Bind(visual);
r2Manip = new RotateManipulator();
r2Manip.Color = Colors.Blue;
r2Manip.Axis = new Vector3D(0, 1,0);
r2Manip.Diameter = 1;
r2Manip.Bind(visual);
r3Manip = new RotateManipulator();
r3Manip.Color = Colors.Green;
r3Manip.Axis = new Vector3D(1, 0, 0);
r3Manip.Diameter = 1;
r3Manip.Bind(visual);
ModelArea.Children.Add(r1Manip);
ModelArea.Children.Add(r2Manip);
ModelArea.Children.Add(r3Manip);
ModelArea.Children.Add(visual);
ModelArea is my ModelVisual3D element in the XAML Thanks
Nikk
objo wrote at 2013-07-12 23:14:
hbdev wrote at 2014-04-21 09:11:
I copied and pasted this code, but i don't see the colors mentioned in the code. What i get is completely black figure though i can rotate it. Can please post full code for this?
objo wrote at 2014-04-29 10:14:
Where are the example sources?
JayDevelop wrote at 2012-06-13 11:15:
The example sources seem to be missing, what's the best way to keep updated? and also - is there a way of getting bone animation into this?
objo wrote at 2012-06-15 06:07:
You find the source code for all example under Source\Examples
I also added the source code links on all the example wiki pages.
overlaying 2D controls on 3D (OverlayDemo) - where to transform and update coordinates
d3p0 wrote at 2012-08-29 09:41:
Hi,
I've created a matlab style 3D plot with a lot of help from Helix Toolkit.
For axes labels, grid lines, tick marks etc, I used WPF 2D geometry and text objects, and transformed the 3D points to 2D in a similar way to the OverlayDemo. (These lines look cleaner than screen space 3D lines, especially since I can apply SnapsToDevicePixels).
In the OverlayDemo, the transformation of coordinates is performed in the window's CompositionTarget.Rendering event. In my case I have a serious amount of layout logic and coordinates to transform, and having all of this called every frame is wasting CPU. I'd like to just update the coordinates when something changes - the camera, the host layout control resizes etc.
So that's cool, I can update coordinates on CameraChanged event (and a few other places). That seems to work with normal mouse interaction (rotation, zooming etc). But when I try and set the camera view in another way (e.g. with HelixViewport3D.SetView()), the 3D to 2D transformation blows up and my 2D coords end up with infinity and NaN. I'm unsure, but I think what happens is one aspect of the camera is changed (e.g. lookDirection), and then this fires the camera changed event. Since coordinates are transformed inside this event handler, that code tries to execute but the transformation matrix isn't formed properly yet (still requires position and upDirection to be set?). Specifically the matrix offset data seems to be wrong. Anyway, this yields incorrect values and the program fails.
(1) Is there a more sensible place to transform 3D to 2D coordinates?
(2) Why doesn't this fail with normal mouse interaction? Are all camera settings set before the CameraChanged event is fired?
(3) Is there some way to keep this logic in CompositionTarget.Rendering but unhook the event handler when nothing is happening and hook it back up when something does change? What should it depend on? - relying on CameraChanged would still cause the transformation to blow up.
Any ideas will be very much appreciated. I'm totally new at this stuff, so please excuse me.
Thanks!
objo wrote at 2012-09-02 23:02:
Sorry, I am not sure what the problem is caused by here. Can you create a small example application that reproduces this behaviour?
d3p0 wrote at 2012-09-03 07:05:
Hi, thanks for your response. I've come up with a solution to get me by for now. I don't know where this falls on the scale of clunky, but time-constraints restrain me from too much elegance:
In my CompositionTarget.Rendering handler, I check to see if the camera has changed (LookDirection, Position & UpDirection) or if its parent panel has resized before allowing any coordinates to update. When nothing has changed, CompositionTarget.Rendering is doing almost nothing, so CPU usage is negligible.
I thought it would be required to ensure that LookDirection, Position and UpDirection have all changed collectively before allowing coordinates to update. This would ensure the transform matrix (Viewport3DHelper.GetTotalTransform()) would be correctly formed before any coordinates are transformed. However, this doesn't seem to matter when the update of coordinates happens inside CompositionTarget.Rendering - just checking to see that one aspect of the camera has changed (e.g. LookDirection) is enough. I don't know why, but not too concerned about this.
I hope this makes some amount of sense - its probably not relevant to most users of WPF 3D anyway...
Help using meshbuilder
GilbertF wrote at 2012-07-13 02:11:
first thanks for this great tool, im looking for samples of how to build a 3d mesh using meshbuilder poly by poly maybe using addpolygon also will like to find examples how to use CuttingEarsTriangulator.cs and where i can download this class.
thanks
objo wrote at 2012-08-09 01:04:
The cutting ears triangulator is located in the HelixToolkit.Wpf/Geometry folder.
Customer support service by UserEcho