Jump to content

Is there a way to group curves in a group?


magneto

Recommended Posts

Hi,

If you want to make an asset that's only meant for curves, can you filter out the incoming geometry to only work on the curves?

I know curves are abstracted to be primitives but I don't know any way to know whether a primitive is a polygon, a NURBS surface or a curve.

Is there a way to group only curves in a group and leave out everything else?

Thanks :)

Edited by magneto
Link to comment
Share on other sites

Umm, the Group SOP has filters for primitive type?

Don't think you can differentiate between a polygon and a polycurve though. This is an interesting problem, I think the basic solution is to find primitives where the first and last vertex are not in the same position, right?

  • Like 1
Link to comment
Share on other sites

Thanks Macha, I wouldn't have control over the creation of the curves because the asset will accept curves to modify but not create them from scratch.

Wow Eetu I didn't notice the Primitive filters, that solved the problem. Thanks alot :)

EDIT: tjeeds, you are right, if it's a polygon curve then it doesn't see them as curves. That's interesting.

EDIT2: I just tried but even MAPU doesn't work if it's a polygon curve, so they all return 0 for u.

Edited by magneto
Link to comment
Share on other sites

case is solved but a new question was born =) :

what is a polycurve ?

--

edit : got it ! example : Curve SOP drawing in polygon mode .. =)

in this case to separate a poly-curve from a usual poly , a Measure SOP measuring the ' area ' should do its job .

the poly-curve must have its area attribute value equal to Zero . No ?

Edited by zarti
Link to comment
Share on other sites

Perhaps there is no difference between a polygon and a polycurve then, whether it's open or not?

example you uploaded ( should ) behave/s like a polygon ( or primitive , like they are called in houdini ) .

if you 'shoot' a point towards it , it will collide .. ( very probably somewhere not over the 'curve' ) .

if you use a clip SOP it will be cut . an extra line , connecting two or more points of the 'curve' , will be created out of nothing .

.. and so on .

-- { show me waht you do , so i can tell you who you are } =)

now , polygon and polycurve or whatever are just names , conventions .

what matters are how their content behaves like . thats what defines those better , IMHO .

personally , i do not even agree the term polycurve does make any sense at all ( ?! ) .

because curve manifests another very clear attribute :

curve:

a. A line that deviates from straightness in a smooth, continuous fashion.

b. ..

- polypath ?

- maybe ..

=)

  • Like 1
Link to comment
Share on other sites

Thanks zarti, good points.

I think the main distinction comes when it's looked at as a collection. A string of polygons, whether closed or open, can be thought as a curve, which would a be single closed polygon if the curve is closed.

But if the polygons share edges like in a grid or box, then those shouldn't be seen as polygonal curves.

So in this regard, if the curve is open, doesn't matter if it's polygon or nurbs, but if it's closed, only isolated singular polygons should be included in the group.

Something like this:

TgVGM.png

Can this be done?

Link to comment
Share on other sites

Use the duck test. If it looks like a duck and quacks like a duck it probably is a duck. A curve is one-dimensional and a surface is 2 dimensional, so you can tell that from its uv values. And whether it is poly or nurbs, you can probably tell from how it behaves when the direction changes; is it smooth or stepped. You just build a selection of tests like these to distinguish your ducks from your geese and you should be fine.

And, isn't there a python thing that gives you the type of an object?

Link to comment
Share on other sites

Do you mean the isspline expression? It returns false for polygonal splines.

I know duck typing. For my tests I just need to see if a point is shared by more than 2 edges/faces. That should separate multi polygon objects from single polygons. Unless there is a simpler way to detect singular polygons :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...