discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: Build a wall for a box - here is the profile

RP
Ronaldo Persiano
Fri, Mar 25, 2022 1:18 AM

Em qui., 24 de mar. de 2022 às 23:57, Jan Öhman via Discuss <
discuss@lists.openscad.org> escreveu:

Is it possible to combine the examples below

I don't see exactly how you intend to combine Jordan's and mine examples
for two reasons.

  1. the examples aim to build different kinds of models; Jordan's model is a
    linear extrusion upward of a shell of your wall shape so requiring one
    input data: the shape; mine is a sweep of the wall shape along a generic
    path requiring two set of data: a shape and a path; (*)

  2. Jordan's model is produced by operating (by hull() and linear_extrude()
    ) on primitive objects (circles); the principles of my example are very
    different because essentially only one operator is applied (BOSL2 sweep() )
    to two lists of points (section and path); at the very end, sweep() calls
    an OpenSCAD operator: polyhedron().

Those approaches might be compared to defining a polygon either by
operating (with union(), difference(), etc) on circles and squares or by
passing a list of points to the primitive polygon().

But is it possible to put together several formulas? (in some way)

  1. A formula from the first corner (90 degrees) to the second corner
  2. The second corner (a circle sector of 90 gtrader) should not be
    difficult.
  3. A line to the third corner.
  4. 3rd corner (circle sector <90 degrees)
  5. Where should the next straight line begin
    etc.

As Jordan showed there are many ways to define a shape by a list of its
vertices. I used the concept of BOSL2 region in order to define the wall by
a code similar to your original wall() module but it could have used any
list of points defined by list comprehension.

Other alternatives are possible like unioning and/or differencing models
produced by sweeps.

(*) it is possible to argue that linear_extrude is a specific kind of sweep
operating on polygons where the path is a vertical segment.

Em qui., 24 de mar. de 2022 às 23:57, Jan Öhman via Discuss < discuss@lists.openscad.org> escreveu: > Is it possible to combine the examples below > I don't see exactly how you intend to combine Jordan's and mine examples for two reasons. 1) the examples aim to build different kinds of models; Jordan's model is a linear extrusion upward of a shell of your wall shape so requiring one input data: the shape; mine is a sweep of the wall shape along a generic path requiring two set of data: a shape and a path; (*) 2) Jordan's model is produced by operating (by hull() and linear_extrude() ) on primitive objects (circles); the principles of my example are very different because essentially only one operator is applied (BOSL2 sweep() ) to two lists of points (section and path); at the very end, sweep() calls an OpenSCAD operator: polyhedron(). Those approaches might be compared to defining a polygon either by operating (with union(), difference(), etc) on circles and squares or by passing a list of points to the primitive polygon(). > But is it possible to put together several formulas? (in some way) > 1) A formula from the first corner (90 degrees) to the second corner > 2) The second corner (a circle sector of 90 gtrader) should not be > difficult. > 3) A line to the third corner. > 4) 3rd corner (circle sector <90 degrees) > 5) Where should the next straight line begin > etc. > > As Jordan showed there are many ways to define a shape by a list of its vertices. I used the concept of BOSL2 region in order to define the wall by a code similar to your original wall() module but it could have used any list of points defined by list comprehension. Other alternatives are possible like unioning and/or differencing models produced by sweeps. (*) it is possible to argue that linear_extrude is a specific kind of sweep operating on polygons where the path is a vertical segment.