Hi Guys,
Need to find out the project point on mesh element.
using the below function i am getting wrong output.
mdlProject_perpendicular(&ProjectPt,NULL,NULL,MeshElmDescr,MASTERFILE,Pointtoproject,NULL,0.00);
How to get project point on mesh element ?
Unknown said:Using the below function i am getting wrong output
Please be more explicit. If you phone the doctor and say "I am ill, please give me some medicine" you are likely to receive an unhelpful reponse. If you want a diagnosis, you must tell the doctor your symptoms.
What is the 'wrong output'? What status code does the function return?
Regards, Jon Summers LA Solutions
Hi Jon,
Here is the function used for project point and debug.
mdlProject_perpendicular(&ProjectPt,NULL,NULL,gFinalDynShpElmDescr,MASTERFILE,&ElmVer[j],NULL,0.00);
mdb> ElmVer[j]
.x = 70934775.421326503
.y = 281863485.86801028
.z = 20538.92767599841
mdb> ProjectPt
.x = 8.0017527547837894e-078
.y = -5.1645010176166069e+120
.z = 2.0425610856036236e-312
int status = mdlProject_perpendicular (...);
mdb> status
Unknown said: .x = 8.0e-078 .y = -5.1e+120 .z = 2.0e-312
.x = 8.0e-078 .y = -5.1e+120 .z = 2.0e-312
Hmmm. It does seem unlikely that the projected point is several light years from the mesh 8-)
You're passing a tolerance of zero. I don't know if that might cause problems in the algorithms involved. Try passing a non-zero value, such as 1 UOR... const double Tolerance = 1.0;int status = mdlProject_perpendicular (..., Tolerance);
int status = non zero ---- error.
Generated mesh in this process.
mdlSelect_addElement(PointFilepos,MASTERFILE,&PointElm,TRUE); /// Adding the required points to selection.
mdlInput_sendSynchronizedKeyin("FACET TRIANGULATE XYPOINTS;Selview 1", 0, 0, ustnTaskId); ///// by using this keyin generating the mesh.