geometry data like getallarray

Valued Contributor
Valued Contributor

Hi,

Like getallarray for elements and nodes, is there anything similar for surfaces, curves etc. I'm trying to map the surfaces and its respective curves...and curves and its respective points...I'm currently using addrule to do this. This takes quite a bit of time to run. Any alternative method? Thanks.

 

For i As Integer = 0 To curveList.Count - 1

Dim tempcurveset As femap.Set = App.feSet

 

tempcurveset.Add(curveList(i))

While tempcurveset.Next

Dim femapcurve As femap.Curve = App.feCurve

Dim temppointset As femap.Set = App.feSet

 

femapcurve.Get(tempcurveset.CurrentID)

temppointset.AddRule(tempcurveset.CurrentID, zGroupDefinitionType.FGD_POINT_ONCURVE)

While temppointset.Next

Dim femappoint As femap.Point = App.fePoint

 

femappoint.Get(temppointset.CurrentID)

If Not femapCurves.ContainsKey(tempcurveset.CurrentID) Then

femapCurves.Add(tempcurveset.CurrentID, New List(Of Integer))

End If

 

femapCurves(tempcurveset.CurrentID).Add(temppointset.CurrentID)

End While

End While

Next

 

3 REPLIES 3

Re: geometry data like getallarray

Valued Contributor
Valued Contributor
Out of curiosity, is there a reason why you are using an array instead of a `Set` or `Sort` object?

Also, what type of object is `femapCurves`? It looks like you're treating it like a `Set`, but I'm not able to find anything on the `ContainsKey` method in the API or WinWrap documentation. It might be clearer if you post the whole script.

Re: geometry data like getallarray

Valued Contributor
Valued Contributor

I'm using vb.net. Femapcurves is dictionary of (integer, list(of integer)....using a dictionary with a relation between key and values gives a flexibility on how we that data. Only this part of code deals with mapping curves and respective points. All i'm looking for is to get all the details on surface or curve at one shot (like getallarray for elements...)

Re: geometry data like getallarray

Valued Contributor
Valued Contributor
Ah, okay. Sorry, I don't really know much of VB.NET =(

From what you're saying, though, I think you could get similar functionality out of a `Sort` object. Unlike a dictionary, however, you wouldn't be able to use strings for keys or data. You would be limited to real and integer values indexed by entity ID only. I'm unsure if `Sort` objects would also require that IDs be unique, so that could also pose a problem depending on how you implement it.