CSG Primitives Plugin!

Hey!

So this is a plugin I have wanted to make for a very long time, and now that we have an API for CSG with plugins, I was able to make it. Basically, the plugin gives you a list of ‘primitives’ which you can make. Then, for each shape, there is a list of properties you can choose for it and when you hit the ‘Create’ button, the plugin does all the CSGing for you, giving you a nice shape with little effort.

Here is a screenshot to give you an idea of how it works:

And here is the plugin itself.

I intend on continuing development for this for a while. So if you have any ideas for new features, additional properties or better organization of properties for existing primitives, or new primitives, let me know and I’ll see what I can do. If the primitive is complex, I would appreciate it if you could give a sort of ‘recipe’ as to how you would CSG it by hand and I can convert that to an algorithm.

Also, please let me know if you find any bugs!

Thanks, m0rgoth

1 Like

This looks really useful!

and it doesn’t error like crazy when making them?

jeez satan must be putting on his wool vest

Here’s a list of the primitives for anyone who’s interested:

Hollow cylinder
Torus
Half Sphere
Quarter Sphere
Eighth Sphere
Thin Part (wtf is the point of this btw if you can’t set the size to 0 on an axis – it’s looking like a normal part to me right now except unioned)
Cone

(WIP: Polygon Prism)

and OMG WHY YOU USE CONFIGURATIONS AND NOT FOLDERS. You can’t even drag scripts into configurations – they’re super annoying.

[quote] Here’s a list of the primitives for anyone who’s interested:

Hollow cylinder
Torus
Half Sphere
Quarter Sphere
Eighth Sphere
Thin Part (wtf is the point of this btw if you can’t set the size to 0 on an axis – it’s looking like a normal part to me right now except unioned)
Cone

(WIP: Polygon Prism)

and OMG WHY YOU USE CONFIGURATIONS AND NOT FOLDERS. You can’t even drag scripts into configurations – they’re super annoying. [/quote]

Thin Part: Well, if you can tell me how to make roblox move a part over by 0 studs and then negate it from another part I’d be happy to learn. As it is, you can make your axis size 0.00001 and it should have the desired effect.

As to configurations, I guess I am just so used to looking at them that I find the Folder object looks weird in the explorer. If it really causes you problems you can change up the plugin :slight_smile:

[quote] and it doesn’t error like crazy when making them?

jeez satan must be putting on his wool vest [/quote]

I have had to put in some limits on some of the operations to ensure no errors occur, but ya, it’s pretty sweet.

Hehehe. Magic. Insert block mesh set size to 0 on one axis and union. Bam – size 0.

[quote]
As to configurations, I guess I am just so used to looking at them that I find the Folder object looks weird in the explorer. If it really causes you problems you can change up the plugin :slight_smile: [/quote]

Change this to 58 (the image of the configuration) and it’ll look like a configuration. I’m sure you’ll appreciate being able to insert scripts directly into it instead of having to insert them somewhere else and then cut/paste it into configurations.

Beautiful, absolutely beautiful. One thing: I suggest you set UsePartColor to true, since the unions can only have one color anyway.

Done!

I’d be interested to see if you could do exactly what you’ve done here, but instead of us inputting all properties we would be able to resize these like a normal part. I realize that you don’t want to run an operation every time the size changes so you may want to look into that. I just know personally it’d make it a lot more appealing to me.

I definitely agree. Maybe have a setup so that if you select a part, there is a button to ‘map properties’ from the part to the plugin so that for each shape it will guess on the properties. That way I would not have to any fancy resize/move coding which has already been done a hundred times and devs can still use their favourite tool.

I had wanted to do something similar with a hollow ring plugin before, but never could figure out how to do it. I wanted to add the ring (in this case the CSGs) to the mouse’s TargetFilter and have an invisible part that when you clicked where the ring (CSGs) would be you would select the invisible part and resizing it resized the ring (CSGs), but TargetFilter is a member of plugin:GetMouse() which means it stops working as soon as you switch plugins :frowning:

My next idea for a plugin is a tool for making CSGing by hand easier so it will include tools like ‘subtract cylinder’ which would work in a similar vein.