Jump to content
renderfan

Cut Mesh with Curve

Recommended Posts

Hello all!

How can I cut Polygon Geometry with curve? Is it possible? Please see Image.

Thank you very much!!!

post-6984-0-34205000-1391438542_thumb.jp

Share this post


Link to post
Share on other sites

Hey Renderfan,

 

I think it depends on what you'd like to do with it. I would do this with a Surfsect,

 

convert the grid to nurbs,

resample the curve and create a nurbs ribbon by sweeping the curve with a line.

Feed it into a surfsect and then convert it back to polygons.

 

hope it helps 

Share this post


Link to post
Share on other sites

@Condor29

Thank you, I did try this but it only works with quads. My geometry is not clean because I have triangles, quads and n-gons (picture in my first post is only example). It works good for simple plane but not for more complex geometry.

 

@freaq

Thank you for tip. I allways forget orbolt. I think the asset is locked and if I want change something it is not possible. And I like to learn from it how something like cut with curve can work :)

 

All tips are welcome.

Thank you again.

  • Like 1

Share this post


Link to post
Share on other sites

You can extrude your curve and use a cookie sop with user defined operation.

 

Cheers

Share this post


Link to post
Share on other sites

hi petz ,

 

your files ( and those of some other members ) are abolutely helpful not only about the topic you post those .

 

ill use this occasion to write a sincere ' Thank You ! '

 

 

 

.cheers

Share this post


Link to post
Share on other sites

Hi Petz, 

I'm having some issue trying to see what you did in your polysplit node;
yous eem to execute this:

 

geo = hou.pwd().node("../null3").geometry().freeze()
points = geo.points()
 
attrib = geo.findPointAttrib("split_loc")
return " ".join([point.attribValue(attrib) for point in points])

however when I try to recreate this, I get errors even when switching the sop to python.
even on say an attribcreate it seems to not work.... how do you force this string to be executed?
Edited by freaq

Share this post


Link to post
Share on other sites
Guest mantragora

You need to set keyframe first and then paste the code there.

Share this post


Link to post
Share on other sites

I did that switched to python and still does not seem to work for me..
gives me errors such as "ge" not found... which is quite bizarre...

Share this post


Link to post
Share on other sites
Guest mantragora

Order of operation is very important. Switch to Python FIRST, set keyframe and then paste the code.

Share this post


Link to post
Share on other sites

@ Mantagora 

 

I did that... still does not seem to work,
even if I enter like this:
geo = hou.pwd().node("../null3").geometry().freeze();points = geo.points();attrib = geo.findPointAttrib("split_loc");return " ".join([point.attribValue(attrib) for point in points]);

error I get is an error occurred when processing "ge"
I really hope someone can explain this cause I really want this to work as this is something I've been wanting to do for a long time.

Share this post


Link to post
Share on other sites
Guest mantragora

Ok, I got the error. Don't paste it into this field. RMB on it and pick Expression => Edit String (or Alt + E) and then paste/write your code :D

1. Switch to Python

2. Set keyframe

3. Alt + E

4. Paste/Write code

Share this post


Link to post
Share on other sites

aaaah got it thanks... man that was backwards xD weird to see alt + E matters... but owk something new is learned everyday...

 

anyways you're a champ, would have never figured that one out thanks man!

Share this post


Link to post
Share on other sites

More good stuff from petz, awesome! Thanks man ;)

 

I was recently also working on a tool to cut polygons with curves and I actually got quite far using the XYZDist node in vop sops. The hardest part I find is solving the boundaries when a curve doesn't go beyond the polygon edges, but I'm enjoying the challenge. The easy way is to just draw a line to the nearest point and use that to end the cut, but I'm trying to make it so it extends the curve with a straight line in the same direction as the last segment of the curve (similar to the asset on Orbolt) within vop (so no dirty foreach loops with clip nodes and such).

Edited by whythisname

Share this post


Link to post
Share on other sites

if you are still looking for an alternative ways try Break SOP. very straightforward and topology independent. the curve needs to be closed and extruded though.

Share this post


Link to post
Share on other sites

in houdini 15 and up you can do this natively with the polysplitSop. just wire the curve into the second input. no need for any workaround anymore ...

hth.

petz

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×