setzer22 / blackjack

A procedural, node-based modelling tool, made in rust 🦀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No polygon node

Zireael07 opened this issue · comments

I wanted to extrude a polygon, but so far it's not possible (workaround: merge several boxes)

A polygon could be represented with a vector of 2D positions pretty easily.

EDIT: Please see my other comment below.

A polygon node sounds like a good idea, and it shouldn't be difficult to make. I can give this a go (might take a bit). Or in case you're feeling adventurous, I'd be happy to guide you (or anyone reading this!) through it so you can contribute 😄

Just for reference, here's here the primitives are defined: Adding a "polygon" primitive should be quite straightforward
https://github.com/setzer22/blackjack/blob/main/src/mesh/halfedge/primitives.rs

Here's where node types are defined:

And this PR is a good example of the whole "creating a node" process: #12

In case someone decides to work on this, please bear in mind that the way to define new nodes in blackjack has changed a lot and none of what I said in my comment applies anymore. I will take some time to document the new way after I finish working on some new features in the upcoming weeks.