Slab Edge Offset Vectors swap

Hello!

Long-time follower, first time poster…

I’m trying to import slab edges into dynamo, offset the slab edges (to the outside), assign a model line and line type and push back into Revit since the floor plates are not the same on all floors.

Where I’m having trouble is understanding the logic behind how the curve (and polycurve) offset node reads and executes the vectors for the offset. All of the floor plates were created the same way, but when I run this script, some are offset to the outside, other floors (at random) are offset to the inside. I’m guessing this has something to do with the vectors of the lines and how they were created. Is there a way to read a list of values for how the curve will offset (by inside of outside) so I can filter and change the values to be all outside?

Does anyone have this similar problem and can provide some hints?

Offset Slabedge Vectors

 

It has to do with the start and end points order of the curve. This is my suggestion:

Capture

poly-test

I drew two poly-curve rectangles; the first from left to right, the second from right to left:

-offset your polys
-convert both the initial and the offset polys to surfaces
-extract their areas
-compare with an operator (>)
-filter the misbehaving ones and offset again with a negative offset
-ta-da

Hope that helps. Good luck!

@Dimitar Venkov,

Thank you for the hints, this makes complete sense!

I can get this process working on smaller models, but when I switch to say a 90 story model, it begins to break down. I’m looking into it and if I find a solution, I’ll upload to the package manager.

I’ll report back with the model file that won’t work if I can’t solve it myself.

Thanks much!

Pat

Thanks Dimitar Venkov for providing quick solution.

Hello Pat Hopple,

Look forward to get your solution uploaded to Package Manager, so that others will get benefited

Do let us know if you stuck again.

Thanks,
Ritesh