Only my i3 built-in graphic does not cater 1038 Links object well Probably Link Array which is only 1 object with many Link Elements should optimise performance.
Thanks! Realthunder's implementation of Links has already lots to learn
I have treid his branch, testing this and that, and particularly lighting which is very impressive indeed ! Hope have more gap to test if performance would be better.
But I hope the 0.19/0.20_pre built-in Link with Elements should already helps this case, so 1 Link with 1038 Link Elements, rather than 1038 LInks.
paullee wrote: ↑Sat Aug 14, 2021 10:37 am
I am wrong
I am able to make 1 Link with 1038 elements but no improvement in graphic performance.
(File size is super small, with 1038 Links, it is 4xx KB; 1 Link with 1038 Elements, it is only 8xKB !!!)
Screenshot from 2021-08-14 18-34-33.png
Hello,
paullee I am trying to do more or less the same workflow that you are doing with another application than architectural, the main difference is that I would like to fill up completely the original object (even if the "voxel" is not completely inside of it) and then intersect them with the solid. would it be possible to share the python script? I am having quite headache scripting with freecad....(actually, I came to the forum to ask some questions and saw your post ahahah). It would help me to learn a little bit and create my own script that does what I am looking for.
otaolafr wrote: ↑Sun Aug 15, 2021 5:45 pm
I am trying to do more or less the same workflow that you are doing with another application than architectural, the main difference is that I would like to fill up completely the original object (even if the "voxel" is not completely inside of it) and then intersect them with the solid. would it be possible to share the python script? I am having quite headache scripting with freecad....(actually, I came to the forum to ask some questions and saw your post ahahah). It would help me to learn a little bit and create my own script that does what I am looking for.
The script is only a quick study to test out the idea, you may like to have a look if it help you to develop it further
You may find many variables are hard-coded with the model file attached.
doc = App.ActiveDocument
obj = doc.getObject('Cut001')
box = doc.getObject('Group')
v = doc.addObject('App::Link')
v.setLink(box)
vv = doc.addObject('App::Link')
vv.setLink(v)
vv.ShowElement=False
count = 0
pList = []
if True: # Just to make below run in python console in 1 go
for xx in range (0,10):
for yy in range(0,10):
for zz in range(0,16):
xl = xx*1000
yl = yy*1000
zl = zz*1000
v = None
if obj.Shape.isInside(App.Vector(xl,yl,zl),0,True): # if point lies on a face it's considered inside
count = count + 1
pList.append(App.Placement(App.Vector(xl,yl,zl),App.Rotation(App.Vector(0,0,1),0)))
print(count)
vv.ElementCount = count
vv.PlacementList = pList
otaolafr wrote: ↑Sun Aug 15, 2021 5:45 pm
I am trying to do more or less the same workflow that you are doing with another application than architectural, the main difference is that I would like to fill up completely the original object (even if the "voxel" is not completely inside of it) and then intersect them with the solid. would it be possible to share the python script? I am having quite headache scripting with freecad....(actually, I came to the forum to ask some questions and saw your post ahahah). It would help me to learn a little bit and create my own script that does what I am looking for.
The script is only a quick study to test out the idea, you may like to have a look if it help you to develop it further
You may find many variables are hard-coded with the model file attached.
doc = App.ActiveDocument
obj = doc.getObject('Cut001')
box = doc.getObject('Group')
v = doc.addObject('App::Link')
v.setLink(box)
vv = doc.addObject('App::Link')
vv.setLink(v)
vv.ShowElement=False
count = 0
pList = []
if True: # Just to make below run in python console in 1 go
for xx in range (0,10):
for yy in range(0,10):
for zz in range(0,16):
xl = xx*1000
yl = yy*1000
zl = zz*1000
v = None
if obj.Shape.isInside(App.Vector(xl,yl,zl),0,True): # if point lies on a face it's considered inside
count = count + 1
pList.append(App.Placement(App.Vector(xl,yl,zl),App.Rotation(App.Vector(0,0,1),0)))
print(count)
vv.ElementCount = count
vv.PlacementList = pList
Forgot to outline the current / conceiving workflow for comment / suggestion: -
Current Prototype
1. Create the 'voxelisation' object
2. Select the shape object to 'voxelise'
3. Adjust the size of 'voxel'
4. Recompute to return the result
Further Development
5. Can select the shape of voxel, like the previos example with 4 Walls, Windows, Slab etc.
6. Now the size (boundbox) of selected shape is used to 'voxelise' and used as each 'voxel'