Hello,
I am building a model where I wish to extrude a base polygon (square to start) into a smaller square. I have accomplished this in the past by defining each base curve but thought it would be easier and less steps to start with a 2D grid. How can I ‘cap’ the sides of my extrusion?
Thanks,
-Bob
Seghier,
Thank you. I am new to GH and learned some new things from your code. I want to now allow movement of the ‘tip’ of the smaller end. I tied to add control but it does not look right. Any suggestions would be appreciated.
-BobExtrude square to square-move tip.gh (19.9 KB)
Thanks for taking the time to look at my script Seghier. I understand your suggestion, but it fails in the case of a filleted polygon because when a non-zero fillet is specified the PCen component changes the polygon from a Polyline to a Curve, and this causes PCen to fail. I guess this is another of the little quirks (features?) hidden inside GH.
Your suggestion works fine with a zero fillet, but fails with any positive value because of this. The overall scaling seems to work the same in either case however.
PS: I plan on using this approach to create a “waffle” bottom on things I 3D print. What I’ll do is set up an array of (probably) scaled squares and use SDiff to subtract them from the solid flat bottom of my object to be printed.
Thanks again for your attention to this. I wish I knew how the GH experts here figure out stuff like this.
Birk, great idea for the waffle pattern on 3D printed parts. Sometime a very flat bottom is difficult to remove from the bedplate. You can reduce the surface area, plus it makes for an interesting look!
That’s a nice approach Seghier - thanks. Avoiding SDiff is always desirable because of how slowly it runs. I don’t have the Pufferfish add-on so I’ll have to come up with a workaround for the Bounding Rectangle object, but I should be able to do this using the outside edge of the bottom of the part I want to print.