Divide a segment by Minimun Dimension Constrain

Hi there,

I hope you are well.

I am wondering how to split/divide a “curve” having a Minimum Spacing Contrain, (like the curtain wall in Revit). I can make it work by number of segment, distance but I could not figure out how I can do it with a minimum Spacing constrain.

Is it posisble?

Thank you very much.

Something similar to this?

https://forum.dynamobim.com/t/how-can-i-make-a-if-node/11939/11

Tom, thank you for the quick answer.

Please correct if I am wrong, the formule does not work as a minimun Spacing constrain. From what I see there, it divides the curve in equal spaces, having a different starting point, isn’t it? Please let me know if I am missing something.

What I am trying to achieve is the same idea as curtain wall. You have any geomtry and I want to split the geometry in equal segments but not going less than a known dimension.
Minimum space2

As the exmaple show, the curtain wall / segment is divided in 746 equal parts as the minimun spacing constrain is 700.

Thanks

I am not totally sure to understand how to use a minimum value since the result could be any greater number. Would that mean that the result should be the closest value? Or is a parameter missing, such as the number of divisions?
Anyway, to get started on something, you could simply try to divide your segment with this minimum spacing constraint, get the floor integer of this number:
http://dictionary.dynamobim.com/#/Core/Math/Action/Floor
Retrieve one from another and allocate the result proportionally to every segment, or anything along this line, and send a screenshot of what you tried so that we can see clearly where the issue lies.

Hi Yna,

Thank you for the reply.

Well it is the tricky scnario right.

Probably my english is not good enough to explain what I am trying to achieve. Let me try again:

“It is divide a curve equally with the minimun dimnesion possible, but not less than a dimension known”. I know the Math Floor action, but I do not think it will solve the problem unless I am missing something.

A few picture as requested, it could help to undertnad the problem as you said
.

As you can see I do not want to have 621 (as an example) as it is less than 700 (as an example). the line is divide by 700 perfectely but obviously the the whole dimension cannot be divided equally by 700, the last bit is less than 700.

I hope it make easier to undertand my goal.

Thank you very much.

10400 / 700 = 14.8571…
MathFloor(14.8571…) = 14
14 x 700 = 9800
10400 - 9800 = 600
600 / 14 = 42.8571…
700 + 42.8571… = 742.8571… = closest eligible value from the minimum constraint.
Is this what you’re after?

1 Like

Edit: Looks like @Yna_Db beat me too it. Here’s an image to go along with it.

1 Like

I usually prefer that users try something first, it helps more to learn than just copy-pasting and requires to get involved somewhat…
For further information on this topic, see here:
http://dynamoprimer.com/en/07_Code-Block/7-3_shorthand.html
http://dynamoprimer.com/en/04_The-Building-Blocks-of-Programs/4-2_math.html
http://dictionary.dynamobim.com/#/Geometry/Curve/Action/PointAtSegmentLength

Thank you guys.

It is great.

I completely agree, but his graph was pretty close already. He was just mixing up a few minor details.

This is exactly what I mean :slight_smile: