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

Setting SphereVisual3D center

Anonymous 12 years ago 0
This discussion was imported from CodePlex

lmat619 wrote at 2012-06-13 23:03:

Hey Objo. I'm trying to change the center of a SphereVisual3D object and make it a 2D object by setting the Z parameter to 0. The problem is it won't flatten the sphere. Is there any way to do this? Or is there any other way to make a 2D filled in circle using your toolkit? Thanks. Here's my code:

 

private void Mouse_Down(object sender, MouseButtonEventArgs e)
{
     lineOne = (Point3D)GetPoints(e);
}

private void Mouse_Up(object sender, MouseButtonEventArgs e)
{
     lineTwo = (Point3D)GetPoints(e);
     SphereVisual3D sphere = new SphereVisual3D();
     sphere.Center = new Point3D((lineOne.X + lineTwo.X) / 2, (lineOne.Y + lineTwo.Y) / 2, 0);
     sphere.Radius = Math.Abs(lineOne.X - lineTwo.X) / 2;
     viewport.Children.Add(sphere);
}

objo wrote at 2012-06-15 06:09:

Try a ScaleTransform3D(1,1,0). I am not sure it will look good, but it should flatten the sphere..

http://msdn.microsoft.com/en-us/library/system.windows.media.media3d.scaletransform3d.aspx

0

Free object manipulation (translatetransform of mouse pos in 3D space)

Anonymous 12 years ago 0
This discussion was imported from CodePlex

ps2323ps wrote at 2013-03-01 11:55:

Hi,

I am looking at transforming a sphere (My own implementation of a Manipulator UIElement) freely in space, thus without visible manipulators and known direction. I started looking at how to translate the mouse movement into a direction, thus be able to use the existing manipulator implementations. But what is the best way to go forward here?
0

Model Comparison

Anonymous 12 years ago 0
This discussion was imported from CodePlex

pggarland wrote at 2012-12-03 20:02:

I have a couple of questions.

1. Why does the ModelViewer example app use ModelVisual3D instead of HelixVisual3D?

2. I would like to load up 2 models into a HelixViewport3D, and use a slider to change opacity between the 2, for comparison purposes.  I would have to use a switch to manipulate 1 model at a time.  Any thoughts as to the best way to accomplish this?

Thanks,

Paul


objo wrote at 2012-12-03 21:20:

1. Use ModelVisual3D to show models loaded from the supported file formats, use HelixVisual3D to show 3D helix models.

2. I suggest you use DiffuseMaterials on your models, and bind the opacity property of the brushes

http://msdn.microsoft.com/en-us/library/system.windows.media.brush.opacity.aspx
http://msdn.microsoft.com/en-us/library/system.windows.media.media3d.diffusematerial.aspx

0

Is there any simple way to detect if reading STL file is in ASCII or Binary Format?

Ardahan 10 years ago 0

How can I found programmatically if reading STL file is in ASCII or Binary format.


0

Render RectangleVisual3D with borders

Michael Powell 11 years ago updated by ไอยดา สุรีวงค์ 5 years ago 1
Is it possible to render RectangleVisual3D with borders? Or do I need to have some collection of LinesVisual3D to support this?
0

Stair Stringer

Anonymous 12 years ago 0
This discussion was imported from CodePlex

AQSRanck wrote at 2014-08-14 19:26:

Is there an existing example of how to draw a stair stringer. If not, could you give some suggestions about how to create a stair stringer figure.

Thank you, Bob
0

3D Piping

Anonymous 12 years ago updated by anonymous 8 years ago 0
This discussion was imported from CodePlex

michaeldjackson wrote at 2012-06-24 18:07:

Awesome job on Helix3D.

I'm searching for guidance or best practices on a project I'm working on.

In my application, I have an ObservableCollection of pipe segments, which describe length, diameter, inclination from vertical and azimuth from north. I need to iterate thru this collection (note: collection will number in the hundreds and sometimes thousands of segments), and build the pipe system, one segment at a time. Each 3D pipe segment will eventually be re-colored according to some calculation and hopefully each pipe segment object will contain the numerical results of the calculations performed on each segment. I will need to click or hover over the segment in the 3D view, and display the numerical results per segment in a wpf control.

Anyone have thoughts or suggestions?

Thanks in advance.


objo wrote at 2012-06-25 08:33:

You should add the pipes to the 3D model yourself (I don't think ItemsControl will work in a Viewport3D), and modify the 3D model when the observable collection changes.

I would suggest the following

  • Use a ModelUIElement3D for each pipe to make the segments clickable.
  • Use the HelixToolkit's MeshBuilder to create the pipe geometry (as in PipeVisual3D).
  • Create a Transform3D to set the position and orientation (you can also set the start and endpoints, but if you use a transform you can easily change position/orientation later).
  • Create a Material to define the color (see HelixToolkit's MaterialHelper.CreateMaterial)

If performance is not good enough, you should combine all pipes into a common geometry and use texture coordinates and a gradient brush material to set the colors.

http://msdn.microsoft.com/en-us/library/system.windows.media.media3d.modeluielement3d.aspx

Use of the MeshBuilder:

var builder = new MeshBuilder(false,false);
builder.AddPipe(this.Point1, this.Point2, this.InnerDiameter, this.Diameter, this.ThetaDiv);
return builder.ToMesh();

(returns a MeshGeometry3D)


dturvey wrote at 2012-06-25 11:22:

Hi,

 

I am also trying to add 1000+ Visual3D objects to a viewport and would be interested in the most efficient way to do this.

 

I am currently binding to an observable collection as shown in the MVVM demo and just adding each Visual3D individually in a loop. This is firing a collection changed event for each call to the Add method. Is there a better way accomplish a bulk add?

 

thanks


objo wrote at 2012-06-26 05:54:

See http://msdn.microsoft.com/en-us/library/bb613553.aspx

Combine objects that can share the same material.

Yes, you should avoid the collection change event when initializing your collection - don't bind it to the visual tree before it has been initialized.


michaeldjackson wrote at 2012-06-26 20:34:

Thanks for the reply. I have another question, though.

As mentioned in my initial post, I need the ability to hover over or clicka pipe segment in order to obtain properties of that segment, ie: length, temperature, pressure, etc. I also need to draw a sem-transparent 3D element (basically another pipe segment) around the segment, thus creating a pipe within a pipe. However, I need to "click" the inner pipe to obtain it's properties. The outer pipe will no doubt hinder hit-test on the inner pipe, correct? So, I'm wondering how to select the inner pipe when clicking. Maybe 1) propogate the inner pipes properties to the outer pipe or 2) allow a pipe segment to have children pipe segments.

Any suggestions?

BTW, I am just barely getting started with Helix 3D.

Thanks.


0

HelixViewport3D create and select vertex

Ricardo Furtado 11 years ago 0
I have a BillbardVisual3D with an image (defined at runtime) and I need to select certain "points" of that image and move them in a certain axis.
Is it possible to create and move vertexes in the BillbardVisual3D? How?
I've been googleing and making tests but I've had no luck.
My thanks in advanced.
0

Is SharpDx Fork ongoing?

Anonymous 12 years ago 0
This discussion was imported from CodePlex

eonxxx wrote at 2014-03-02 00:18:

Hi objo,

is there a chance that helix sharpDx developement is ongoing in next time.
Or could you offer a packed .dll, like helixtoolkit itself?

best regards
eonxxx

eonxxx wrote at 2014-03-02 00:28:

oh. i found the alpha :)
thanks for sharing!
eonxxx
0

Multi Touch Support

Anonymous 12 years ago 0
This discussion was imported from CodePlex

praveenv4k wrote at 2012-03-24 06:37:

Can multitouch gestures be realized with Helix 3D toolkit?


objo wrote at 2012-04-03 01:28:

I implemented pinch-zoom and rotate/pan events last autumn. See the code for handling of the manipulation events in the CameraController class.

It was tested on a Samsung tablet with windows 8, seemed to work ok!

Other gestures implemented:
two-finger tap -> zoom extents 
holdenter -> change 'look-at' point