Rebuild List From Boolean Value

Hi,

My main goal here is to unify the curve direction into a same direction. So i used filter.byboolmask and reverse the vector. I’m trying to merge these reversed vector with the unreversed one by using the boolean as the base.

I know this can be done by replace.bycondition but it doesnt works if i had more complex nurbs curve.

Is there anyone can help?

helpppp

 

 

 

 

 

 

Thanks in advance

 

Hagani

File: UniformCurveDirection.dyn

The attached file aligns all curves in a list to be the same as the first curve.

20150902-1

Hi Vikram, Thanks for your reply.

I tried your using your file but it doesn’t work with me. I have a single curbs curve with many vector at specific parameter point. What i want to do is to unify all the vector of this single curve into the same direction.

Attached file best describe of what i mean…

 

Thanks a lot

H

HelpUnnifyCurve

 

File: UniformDirectionAtParameter.dyn

20150903-1

ReverseVectors

Hi,

The above methods might not work for very extreme cases. You might want to consider looking into a solution based on this for those cases:

2015-09-04_12-51-48

1 Like

@Dimitar - my solution is based on the assumption that the inconsistency in direction occurs at the points where the Z axis is reversed.

It worked in all cases, I’ve tried. I’ve attached a Design Script version of the earlier file. Try it out when you have some time and see if it works.

File: CrUniDirAtPar.dyn

20150904-1

Vikram, you are right. Your solution works for all cases. I should have studied it in greater depth before jumping to conclusions.

Just as food for thought, I’ve tried both and have found a case where yours doesn’t work Vikram but Dimitar’s does. I’ve used a spline (Vikrams highlighted - Dimitars not).

As attached:

Normals

 

:frowning:

So, Dimitar was right after all :slight_smile:

1 Like

Thanks to all you guys, in my case both solution works! You guys awesome!

 

Cheers

Hey guys
Could you maybe post Dimitar picture again, cos i cant zoom it or click on it.
Tnx

It’s still available here:

http://dynamobim.org/forums/topic/rebuild-list-from-boolean-value/

3 Likes

Ok now i see it…tnx alot for that:-)