# Circular shape to a square shape.

9 messages
Open this post in threaded view
|

## Circular shape to a square shape.

 Hi, I'm new to the software and I have a question. I have a file of a circular piece, and I would like to make it a square piece Preserving the details, but I do not know how to make the modification. The link of the part is down. twisted_vase.scad
Open this post in threaded view
|

## Re: Circular shape to a square shape.

 I have noted in the code you provide that there is a line faces = 8; When that value is changed to 4, the individual "layers" of the shape become square. Is this the answer you seek?
Open this post in threaded view
|

## Re: Circular shape to a square shape.

 Thanks for the response ! No... This is the image of the code I want to know if it is possible to change the shape that is like a cup, to something like a box, for exemple, including this special details. The changes that you proposed, only make difference on the details.
Open this post in threaded view
|

## Re: Circular shape to a square shape.

 The "special details" part escapes me. The method used in the original cup-type code is to rotate the basic shape (faces) which provides what I think of as the details. If "faces = 4" is used, each layer is a square. If one desires a cube shaped receptacle, this code: ```difference(){ cube([75, 75, 32.5]); translate([3, 3, 3]) cube([69, 69, 39]); }```gives this shape: Can you clarify what special details you seek?
Open this post in threaded view
|

## Re: Circular shape to a square shape.

 Thanks man ! I`m really a new one on openscad. I understood that using faces = 4 then we have the image you upload, but it is possible to have  that number of "special details", that number of faces, but this details on the sides of a box ? I`ll tried to explain better... On this code, we have some subdivisions and some number os "special details"But, besides become a "cup" at the and, besides creates this details on a cylinder, now create on the sides of a box, its possible ? Thanks !
Open this post in threaded view
|

## Re: Circular shape to a square shape.

 I see that you'd like to have facets on the sides of the box. The facets in the faces=8 are really rotations of the basic shape. When that is done with faces=4, you get the image I provided, but I think you feel that the variations are too great and would like to have more subtle changes to the faces. I'm mostly new to OpenSCAD too and not much of a programmer-thinking kind of person. Most of my creations are simple and involve a lot of "try this, fail, try something else." I believe that there is someone on the list who has strong programming skills and can create complex code to create facets on the faces of the cube. I believe that I would have very little understanding of the code, however. If, for example, you desired to have one "point of facet" in the side of the cube, I could manually create polygons, but it would be "brute force" generation, while a more skilled user would create algorithms to accomplish the same thing, and with more flexibility.
Open this post in threaded view
|

## Re: Circular shape to a square shape.

 make a giant version with many tiny (it its scale) facets, difference out a piece that is the size of one box wall, if you have made the giant version big enough it should look almost flat at the smaller scale... use this 4 times rotated 90 degrees each time to make the four sides check the wiki / manual etc to see how boolean geometry is used (difference and union I abuse a lot!) hope this is enough to get you started / learning Chris On 09/04/17 01:14, fred_dot_u wrote: > I see that you'd like to have facets on the sides of the box. The facets in > the faces=8 are really rotations of the basic shape. When that is done with > faces=4, you get the image I provided, but I think you feel that the > variations are too great and would like to have more subtle changes to the > faces. > > I'm mostly new to OpenSCAD too and not much of a programmer-thinking kind of > person. Most of my creations are simple and involve a lot of "try this, > fail, try something else." > > I believe that there is someone on the list who has strong programming > skills and can create complex code to create facets on the faces of the > cube. I believe that I would have very little understanding of the code, > however. > > If, for example, you desired to have one "point of facet" in the side of the > cube, I could manually create polygons, but it would be "brute force" > generation, while a more skilled user would create algorithms to accomplish > the same thing, and with more flexibility. > > > > -- > View this message in context: http://forum.openscad.org/Circular-shape-to-a-square-shape-tp21129p21137.html> Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > [hidden email] > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org