Create Cone & Pyramid shape's in 2d image using ruby


#1

Hi All,

I want to create a Cone & Pyramid shape’s in 2D image using ruby script, I have tried so many things, but still i didn’t get any idea’s.

Please if anyone help me for this.

Thanks,
Siva S


#2

What is the question and what many things did you try?

A 2D image is rectangular, not a cone or pyramid. Are you trying to paint a cone or pyramid on the pixels of the image?


#3

Actually i want to create cone and pyramid shapes in SketchUp using ruby script.


#4

You could look at and use part of the code from my SketchUcation plugin SU Draw Parametric Shapes.


#5

… You an get the extension itself here …

And the source code is here …


#6

Thanks @DanRathbun


#7

@DanRathbun, thanks for the direct reference. However, the one on the Extension Warehouse is the original Sketchup Team 3D Shapes.

The one on SketchUcation (https://sketchucation.com/pluginstore?pln=jwm_shapes) has several useful enhancements that I made, including non-square pyramids and a user-selectable number of segments for the circular base of the cone. The code in the plugin isn’t protected in any way, so although it isn’t on GitHub, you can still examine and copy it.

I should have given the full link in my earlier post - sorry.