So this will either require some math (Line/Line intersections) but it 
would be harder for doing it with a curve of a degree higher than 1.
Though I remembered maya had a split by curve tool so I had a quick look 
for you.

The steps are to "project the curve" onto the mesh and then "split the mesh 
by projected curve".
This creates a *polyProjectCurve *node and a *polySplit *node. The 
interesting bit here is that the PolySplit node "splits" based on a 
predefined set of information for where to split.
As such this information must be provided (in some way) by the 
polyProjectCurve node for it to work.

Next step would be to investigate a bit into what's connected between the 
two nodes, where the critical information is in the curvePoints compound 
attributes.
There it's stored as a set of "split points" that represent the "face id", 
"triangle id" and the "barycentric coordinate".
Unfortunately there doesn't seem to be information on the node that just 
gives an "edge id" and a percentage along that edge... but it might get you 
closer?

Just thought I'd share this to see if it helps in any way. It's not 
necessarily trivial to go from there, but it shouldn't be impossible either.
The nice thing by using the project curve method it allows you to do it 
using any degree of curve and all of the functionality Maya provides along 
with it.

Node that the polySplit will always create a vertex on the edge, but might 
also create more... maybe there's a way to set it up so it only creates 
points on the edges or query that easily, but I didn't investigate that 
further.
Hope it helps.

On Monday, January 18, 2016 at 6:05:24 PM UTC+1, Dilen Shah wrote:
>
> Thanks for the reply but i am looking for something in Maya. Thanks.
>
> On Monday, January 18, 2016 at 5:40:41 PM UTC+1, Marcus Ottosson wrote:
>>
>> Very interesting questions, Dilen. :) It's the kind of low-level things 
>> that make you appreciate Softimage's ICE, Houdini's VEX or Fabric Engine. I 
>> don't have an answer for you, but if you have the opportunity, it sounds 
>> like there's a better tool for the job out there than Maya.
>>
>> On 18 January 2016 at 16:15, Dilen Shah <[email protected]> wrote:
>>
>>> Hey guys,
>>>
>>> I am trying to get the position of the all the red marked points from 
>>> the image.
>>>
>>> So there are 2 meshes, one the plane which is like the grid and the 
>>> other mesh is inside the grid.
>>>
>>> Is there a way to get the positions of all the red marked points from 
>>> these 2 meshes. I tried using MfnMesh.allintersection method but it gives 
>>> me the exact position of the grid points not the point position of the red 
>>> marked points.
>>>
>>> Any ideas would be helpful.
>>>
>>> Thank you.
>>>
>>> D.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/python_inside_maya/e2d32034-fe61-484e-8511-e0d86d071b38%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/python_inside_maya/e2d32034-fe61-484e-8511-e0d86d071b38%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> *Marcus Ottosson*
>> [email protected]
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/bc8bffb6-9602-4a82-8a57-5777f37d185d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to