Some weirdness in my def? linear array and culling

been working on this definition and am having a problem getting it to section and create a plane.i’m thinking there is an issue with the linear array component?

in the file i circled the controlling slider.

also when doing the linear array i keep getting 2 planar surface at the start of the array because my spacing dimension is negative and positive, i can’t figure out how to cull one of them out.

any help or suggestions would be appreciated. (18.8 KB)
(hopefully i internalized the main body.)

1 Like

The problem you circled in red is because Offset Curve is offsetting inwards instead of outwards on that particular curve, probably because its direction needs to be flipped?

Better than flipping the anomalous curve, however, would be to understand and fix the problem that caused it. The first thing I noticed is that in top view, your Brep is not square with World XY and neither is your Plane, which also isn’t square with your Brep!?

That might cause problems… but fixing them isn’t easy. Why are they skewed?

1 Like

yeah, something is wrong with the bounding box, i’m going to address that now to see what is going on before i venture further. i need to use that bottom surface as my cplane to base the bbox off of, atleast that what do natively to bbox it. these bodies are out in space so they aren’t oriented to world x,y “cleanly”. and i can’t move them because i’m making tools off of the bodies in the model. but yeah, i need them square with the bottom.

i did rework what i originally posted to have the curve arrayed instead of the cplane like i had before. that seems to be giving me a more consistent result for some reason.

thank you for pointing that out. i’ll probably be back ehehehehh

Here’s how I would do it, using one of the long bottom edges of the brep as a basis for pFrames: (13.7 KB)

Shift List with ‘W’ (Wrap) set to False (Invert) is used twice to ignore the first and last pFrames.

1 Like

i think i got it right in this one, now if i could cull out one of those duplicates at the center i’ll be (15.4 KB)

yours is a hell of a lot cleaner than mine. let me dig in there and digest it. thank you!

You could do this if you want a hole in the Boundary surfaces: (13.4 KB)

Cleaner and more accurate! :sunglasses: I like clean and simple code.

1 Like

your doing some advanced stuff that’s way over my head. lol. i’m surprised i’ve gotten this far on with the master definition this is a part of.

so i got the planes trued up in and it’s looking good except the duplicates at the center of the array. you said some kung fu was going to be needed huh? (16.7 KB)

I’ve done my bit here, it’s simple enough for a beginner to understand if you try. Not interested in proof reading more code, sorry.

got ya, thank you!

The only part of my solution that is fragile, in the sense that it might break using different breps, is choosing one of the long bottom edges of the brep as a basis for pFrames. I used List Item with an index value of 1 but that might not always be true.

You could sort the brep edges by length and cull the four longest edges, then sort them by the Z value of their midpoint and choose the lowest one. Like this (white group, “find a long bottom edge”): (18.4 KB)

This assumes that either bottom edge will give the same result, which might not always be true?