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

Tube is not visible

Anonymous 11 years ago 0
This discussion was imported from CodePlex

TSpiller wrote at 2014-06-13 18:26:

Hi,

I just started to use this wonderfull toolkit and I'm trying to create a 3D model consisting of spheres and tubes.
No problems with the spheres, but the tubes are not visible.

Code defining tubes:
int dia = 15;
HelixToolkit.Wpf.TubeVisual3D tube = new TubeVisual3D();
tube.Path = new Point3DCollection();
tube.Path.Add(new Point3D(15, 0, 0));
tube.Path.Add(new Point3D(-15, 0, 0));
tube.Diameter = dia;
tube.IsPathClosed = false;
tube.Fill = Brushes.DeepPink;
3DWindow.Children.Add(tube);
xaml:
<hel:HelixViewport3D Name="3DWindow" ShowFrameRate="True" Grid.Column="1" Margin="5" Grid.Row="1">
                <hel:SunLight  />

</hel:HelixViewport3D>
What could eb the reason fo the tubes to not show up?
Am I missing sth?

Thanks in advance,

Thomas

Pyramidex wrote at 2014-06-14 17:07:

Hi Thomas,

I encountered the same problem and reported it in the Issues section (Id #10054) with title TubeVisual3D.
It look like it does not like tubes where the Y value is the same.

Regards, Edwin

TSpiller wrote at 2014-06-16 09:57:

Thanks a lot!

So the workaround for me is to alter the Y coord i.e. by 0.00001 which is still accurate enough.

Regards
Thomas
0

Add depth to rectangular mesh for surface plot visual

Anonymous 11 years ago 0
This discussion was imported from CodePlex

HafsaY wrote at 2014-05-26 15:24:

Hi,

I'm a bit of a newbie to 3D WPF, and am working on simulating cracks and holes dynamically on a surface.

I found your SurfacePlotDemo to be extremely useful, and was able to do this:



but would like to extend it to something like this:



The workaround I tried was using a BoxVisual3D (with the TopFace set to false) that is aligned with the surface, but this obviously doesn't render well when the hole is near the edges of the block.



While going through the SurfacePlotVisual3D class, I noticed the use of AddRectangularMesh() which creates the surface from an array of 3d points. Is there a method in MeshBuilder that can extend or add "depth" to to it as well? Or append another "cuboidal" geometry with one face and the sides to match the surface plot - this would perhaps be more ideal because I'd like the bottom half to be partially transparent in order to actually view the crack during rotation.

Any ideas or suggestions would be greatly appreciated. Thanks!
0

How can i change texture in run time (used class StudioReader)

Anonymous 11 years ago 0
This discussion was imported from CodePlex

DK_danik wrote at 2013-10-22 13:49:

Many thanks for product


i want change texture in run time at 3ds model or obj.
var reader = new StudioReader();
reader.TexturePath = "";
and then do something like this
while (materials in this model) 
{
  var actualTexturePath = this.TexturePath ?? string.Empty;
  string path = Path.Combine(actualTexturePath,"My_selected_texture_on_run_time.jpg");
}
0

Deleting/Insert Object

Anonymous 11 years ago updated by ไอยดา สุรีวงค์ 4 years ago 1
This discussion was imported from CodePlex

CesarMayorine wrote at 2013-09-23 16:43:

By means of a variable will insert or delete elements into 3d view.
Have anyone a sample code?

0

simpleDemo in vb.net

Anonymous 11 years ago 0
This discussion was imported from CodePlex

regha wrote at 2013-09-08 10:49:

Hello,
I'm not familiar with C #.
Somebody has already translate simpleDemo in vb.net ?
thanks

Pathogenix wrote at 2013-09-08 22:52:

Try the software SharpDevelop. You can convert C#.NET Projects to VB.NET

regha wrote at 2013-09-09 08:37:

Thanks for your answer.
ok I have found a solution.
Discussion closed
0

Reset Camera {Home} key and DBL CLICK Middle Mouse Button flips model

Anonymous 11 years ago 0
This discussion was imported from CodePlex

michaeldjackson wrote at 2012-10-18 18:07:

Why does the Home key and DBL CLICK middel mouse button always flip my model? I have all Viewport settings as default, meaning I don't set any Axis, UpDirection, LookDirections, etc.

I draw one simple pipe, run, hit home key and model flips upside down.


objo wrote at 2012-11-02 22:47:

The default up direction is (0,0,1) in this toolkit (as in mathematics, I know (0,1,0) is standard in computer graphics...)

Is your model using Y-up? Did you set the ModelUpDirection property of the viewport? There may be a bug. http://helixtoolkit.codeplex.com/workitem/9962

0

center loaded obj

Anonymous 11 years ago updated by ไอยดา สุรีวงค์ 4 years ago 1
This discussion was imported from CodePlex

Kszyhu wrote at 2011-12-09 18:30:

Hi!

First of all - great work with Helix. Really good 3dViewPort!

But now question - is it possible, to "AutoFit" or "Center" object when loaded? When I load object (obj file) it shows "somewhere" in viewpost, and I have to scroll out until it shows :o Is it possible, to make it automaticly? like: Model3d.Camera.CenterToObject() or Model3dCamera.FitObjectToScreen()? 

Best wishes

Chris


objo wrote at 2011-12-09 18:44:

hi Chris, try the ZoomExtents() method on the HelixViewport3D. Or set ZoomExtentsWhenLoaded=true if the model was added before the view is loaded.

See all properties/methods of the control at http://helixtoolkit.codeplex.com/wikipage?title=HelixViewport3D


Kszyhu wrote at 2011-12-09 18:59:

:o ! It works! Solution was so close, but I was too lazy, to read all descriptions :P

Thx for help!

0

Hide part

Anonymous 11 years ago 0
This discussion was imported from CodePlex

RusGIS wrote at 2011-12-07 10:46:

How can I hide part the 3D model? For example to remove the roof of the building. Is this possible?


objo wrote at 2011-12-07 11:11:

Remove the Model3D or Visual3D from the visual tree. There is no "Visibility" flags in the WPF 3D model.

0

disable mousewheel zooming

Anonymous 11 years ago 0
This discussion was imported from CodePlex

charlh wrote at 2011-12-02 07:28:

hi there. Just want to first say thanks for your awesome code, absolutely brilliant. Excuse the simple noob question, but is there anyway to disable the mousewheel zooming function on your HelixViewport3D?


objo wrote at 2011-12-03 11:58:

try to set IsZoomEnabled = false on the HelixViewport3D. This should also disable zooming by the right mouse button.

The MouseWheel handling is not bound to a gesture since the standard mousewheel gesture is missing the delta value. 

0

using arrow keys to roll camera instead of pan

Anonymous 11 years ago 0
This discussion was imported from CodePlex

mihaipruna wrote at 2013-11-22 20:42:

Basically I need to be able to use the arrow keys to effect custom transformations to the camera. I already coded a Quaternion but I think these key events are intercepted by the camera controller.
How do I stop that?

objo wrote at 2013-12-02 20:04:

The arrow keys are handled by the KeyDown event. Try to use the PreviewKeyDown event or add some InputBindings!