If we inspect the code we can see that it controls whether CurrentPosition is calculated or not:
protected override void OnMouseMove(MouseEventArgs e)
var pt = e.GetPosition(this);
var pos = this.FindNearestPoint(pt);
if (pos != null)
this.CurrentPosition = pos.Value;
var p = this.Viewport.UnProject(pt);
if (p != null)
this.CurrentPosition = p.Value;
So, each time OnMouseMove method is called the (Point3D) pos is calculated (by FindNearstPoint) and that may be a costly operation to perform each time the mouse is moved.
Why CurrentPosition is needed and why it is optional?
behnam263 wrote at 2014-08-26 13:22:
I'am reading an STL file in my WPF c# application. I want to store it to database. All database connections are done but I don't know how to store 3d model in database. What kind of converting needed for this purpose? And later similarly I want to get that information from database to turn it 3d models.Is there any basic function for STL converting to binaries then merging it again?
FaceMaterial default's color is blue , I need to change facematerial color by C#
main.FaceMaterial = Materials.Red
and try to set transparent
main.FaceMaterial = nothing
it's not happen anything. 'main' it still 'Blue'
Please help. How can I change this property?
and Thanks to all answer and suggestion.
I adding to my viewport3d a model (STL file) using ModelImport function but first nothing show up. To see added 3DModel I have to do zoom out. My question is, are there any way to do dynamically/programmatically zoom out or rotate camera to the newly added model or anything needed to show it immediately.
I am using C# WPF.
I am loading STL file into viewport and then I want to read each facet in that model. In helixtoolkit STLReader class it is done from reading stream, but this methods is private so I can't call it in my program. Is there any public method for reading facets or should I override this existing methods?
thanks for that great toolkit! Really like to work with it. Actually i am searching for a way to calculate a 3D surface out of a pointcloud. How am i able to do that? I allready got the points in a list (
The result should be a rectangle with drillholes.
I appreciate any kind of help.
Customer support service by UserEcho