Honeycomb Array
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Honeycomb Array
A further note, to make the array fully parametric, the Array intervals would need to update with the changes in the two dimensions in the screenshot.
I know very little about the spreadsheet module, but perhaps it could be used?
Mark
I know very little about the spreadsheet module, but perhaps it could be used?
Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
Re: Honeycomb Array
Yes once the concept of Spreadsheet PropertyController will be re-introduced in FreeCAD we will be able to use it again for cases like this. Like in my example where it would calculate and control that 2 formulas automatically instead of users calculating and setting properties manually.I know very little about the spreadsheet module, but perhaps it could be used?
All of the examples including OpenSCAD examples can be made as solids.All these arrays need to be trim(m)able
Can you share your .fcstd file and describe what you would like to achieve?My HoneyComb matrix looks good but blows up during bool operation.
Anyone have a version that is trimable?
Re: Honeycomb Array
Are you wanting to make something like a mold or press for wax foundations?bill wrote:I need it for actual bees.
Yea, that's one of the many things I don't know about spreadsheet. Thanks for the current info on it.triplus wrote:Yes once the concept of Spreadsheet PropertyController will be re-introduced in FreeCAD we will be able to use it again for cases like this. Like in my example where it would calculate and control that 2 formulas automatically instead of users calculating and setting properties manually.
Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
Re: Honeycomb Array
Fuse did the trick!
However, the array size I need seems to be unmanageable (400mm by 400mm). Too long calc time and too large a file.
Anyways thanks mark and others!
I will use a less detailed proxy-object instead.
mark, btw, yes it is for hive foundations!
thanks
However, the array size I need seems to be unmanageable (400mm by 400mm). Too long calc time and too large a file.
Anyways thanks mark and others!
I will use a less detailed proxy-object instead.
mark, btw, yes it is for hive foundations!
thanks
Re: Honeycomb Array
Hi bill, maybe you could post a small section with the size hexagon and finished shape your wanting. There may be a better way to create the model that would be less CPU intensive.bill wrote:Fuse did the trick!
However, the array size I need seems to be unmanageable (400mm by 400mm). Too long calc time and too large a file.
Anyways thanks mark and others!
I will use a less detailed proxy-object instead.
mark, btw, yes it is for hive foundations!
thanks
Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
Re: Honeycomb Array
I liked ulrichs approach, so that is what i tried to emulate!
Thanks in advance!
Thanks in advance!
Re: Honeycomb Array
Yes things can get a bit heavy with arrays/patterns. What i would do i would probably set up everything in a way i would only need to wait at the final stage(s). Or if i would know exactly what it is you are after maybe other solution could be used.
Could you make what you are after in smaller form for us to see what is the final (bigger) outcome you are after?
Could you make what you are after in smaller form for us to see what is the final (bigger) outcome you are after?
Re: Honeycomb Array
Yes, very true.triplus wrote:Yes things can get a bit heavy with arrays/patterns.
I need a panel (square) of honeycomb, 360mm by 360mm by 2mm thick.
My machine will generate it eventually; takes a long time (seems to be a load on CPU) ; on the order of +5 minutes for each array. And the file size is over 5Mbytes. I be interested to see how long it takes to generate this size matrix on some else's machine?
I was hoping I was doing something wrong and there was a better approach; since this was the first time I had used ARRAYS in FreeCAD.
Thanks for your help!
bill
Re: Honeycomb Array
Will you make 2D DXF file for your machine? If the answer is yes i would do it in 2D (as faces). Focus only on "pocket faces" and array "pocket faces". After do a boolean cut between "array of pocket faces" and "rectangle face". That should in general work faster and should provide you what you need to get to 2D DXF file.
But if you need to create solid to perform additional modelling operation on it that just can't be done in 2D (can't it be done?) then you will have to produce a solid from that 2D face and that will take time.
But if you need to create solid to perform additional modelling operation on it that just can't be done in 2D (can't it be done?) then you will have to produce a solid from that 2D face and that will take time.
Re: Honeycomb Array
Here's another option Bill - I just banged this macro out for another project, before searching around with the right keywords apparently . There are a couple parameters at the top that should be fairly self explanatory, it makes a 2D "Face" first, a 72x72 cell one took my computer (nothing special) probably 10-15 seconds to do.
Out of curiosity, have you read about "natural cells" at the Bush Farms site?
Seeing your handle reminded me about that placement thing from a couple months ago, will have a think about that and get it done soon hopefully. -Ian-
Out of curiosity, have you read about "natural cells" at the Bush Farms site?
Seeing your handle reminded me about that placement thing from a couple months ago, will have a think about that and get it done soon hopefully. -Ian-
Code: Select all
import Part, FreeCAD
from FreeCAD import Base
from math import cos, sin, pi
rows = 10
cols = 10
cellWD = 4.9 # Calling this "wrench diameter" - inside distance between opposite flats
wallThickness = 0.5
# x and y are centre, counter-clockwise winding
def hexGenerator(x, y, radius):
lastPt = Base.Vector( x + radius * cos(pi / -3.0),
y + radius * sin(pi / -3.0) )
for p in xrange(6):
nextPt = Base.Vector( x + radius * cos(p * pi / 3.0),
y + radius * sin(p * pi / 3.0) )
yield Part.Line(lastPt, nextPt).toShape()
lastPt = nextPt
xOff = (wallThickness + cellWD / 2.0) / cos(pi / 6.0)
yOff = cellWD / 2.0 + wallThickness
xDelta = (cellWD + wallThickness) * sin(pi / 3.0)
yDelta = cellWD + wallThickness
# Make a box to draw the whole thing in - I bet there's a utility for this...
# clockwise winding
boxHalfWidth = xOff + max(0, cols - 1) * xDelta / 2.0
boxHalfHeight = yOff + max(0, rows - 1) * yDelta / 2.0
corner = [ Base.Vector(-boxHalfWidth, boxHalfHeight), # top left
Base.Vector(boxHalfWidth, boxHalfHeight), # top right
Base.Vector(boxHalfWidth, -boxHalfHeight), # bottom right
Base.Vector(-boxHalfWidth, -boxHalfHeight) ] # bottom left
box = Part.Wire([ Part.Line(corner[0], corner[3]).toShape(), # left
Part.Line(corner[1], corner[0]).toShape(), # top
Part.Line(corner[2], corner[1]).toShape(), # right
Part.Line(corner[3], corner[2]).toShape() ]) # bottom
# Centre on the origin
xOff -= boxHalfWidth
yOff -= boxHalfHeight
cellRad = (cellWD / 2.0) / cos(pi / 6.0)
faces = [box]
for col in xrange(cols):
x = xOff + xDelta * col
for row in xrange(rows - (col % 2)): # one less row on odd columns
y = ( yOff + (col % 2) * (cellWD + wallThickness) / 2.0 + #offset
yDelta * row ) #increment
cell = Part.Wire([s for s in hexGenerator(x, y, cellRad)])
faces.append(cell)
myObject = App.ActiveDocument.addObject("Part::Feature", "Honeycomb")
myObject.Shape = Part.Face(faces)