We are working on tool that converts beams to plates. We have to build surfaces based on beams shapes. (few surfaces for single beam). We have decreased amount of surfaces by building not elements but members (set of elements with same prop between connections) but still for big models amount of surfaces to create is huge:
Currently we use App.feSurfaceCorners function (it creates single surface).
Is there any function that creates multiple surface using one call?
If not, is it possible to add such function Surface.PutArray(...) in the next Femap release?
We also use lock functions to lock graphic window, helps a bit with performance. Any ideas about improvements for performance are appreaciated.
I suppose there ia a reason why you did not want to combine the 4 beams labeled 1 2 3 4. But in case there isn't you can create groups by line elements which are aligned, kind of like what "Group > Operations > Generate" does for 2D elements.
Here's a code example which will regroup line elements by "aligned" elements, thus combining your 4 zones into 1 and reducing the number of surfaces you have to create.
Sub Main Dim App As femap.model Set App = feFemap() Dim v1 As Variant, v2 As Variant Dim lineElSet As femap.Set, elSet As femap.Set, el As femap.Elem Set lineElSet = App.feSet Set elSet = App.feSet Set el = App.feElem lineElSet.AddRule(FTO_LINE2,FGD_ELEM_BYSHAPE) elSet.AddRule(FTO_LINE2,FGD_ELEM_BYSHAPE) Dim gr As femap.Group Dim set1 As femap.Set, set2 As femap.Set Set set1 = App.feSet Set set2 = App.feSet While el.NextInSet(elSet.ID) App.feCoordOnNode(el.Node(0),v1) App.feCoordOnNode(el.Node(1),v2) For i = 0 To 2 v2(i) = v2(i)-v1(i) Next set1.Clear : set2.Clear '1e-4 (cf line below) is a user defined tolerance set1.AddAroundVector2(FT_NODE,v1,v2,FPC_BELOW_MIN,1e-4,1) set2.AddSetRule(set1.ID,FGD_ELEM_BYALLNODES) set2.RemoveNotCommon(lineElSet.ID) Set gr = App.feGroup gr.SetAdd(FT_ELEM,set2.ID) gr.Put(gr.NextEmptyID) elSet.RemoveSet(set2.ID) Wend End Sub
There isn't anything specifically now to create multiple surfaces at once, but we will try to add something like feSurfaceCornersMultiple( ) for the next release.
Thank you for the suggestion. I will add your idea as an option. Because we plan also to mesh them automatically and maybe even create connections (and for that probably would be better to have members cut in connection positions).