You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are replacing HOOPS code by using Xbim.
We are able to replace the model loading and showing on desktop application.
We need to get shell points of any component. Specifically IfcGeographicElement.
Function using HOOPS is as follows:
publicvoidGetShellPointsOfComponent(HPS.Componentcomponent,outList<HPS.Point>shellPoint,outList<int>faces,outList<int[]>FacesSet,List<Mathematical_Utility.Point>mathPoints=null){FacesSet=newList<int[]>();shellPoint=newList<HPS.Point>();faces=newList<int>();HPS.Component[]children=component.GetSubcomponents();if(children.Length>0){//HPS.Component[] SubComponents = children[0].GetSubcomponents();foreach(HPS.Componentcomp1inchildren){foreach(HPS.Componentcompincomp1.GetSubcomponents()){HPS.Component.ComponentTypecompType=comp.GetComponentType();if(compType==HPS.Component.ComponentType.ExchangeRIPolyBRepModel){Exchange.ComponentexchComponent=newExchange.Component(comp);HPS.Key[]keys=exchComponent.GetKeys();Stack<HPS.Component>componentStack2=newStack<HPS.Component>();componentStack2.Push(comp);HPS.ComponentPathComponentPath2=newComponentPath(componentStack2.ToArray());KeyPath[]paths=ComponentPath2.GetKeyPaths();paths[0].ShowNetModellingMatrix(outMatrixKitmKit);foreach(HPS.Keykeyinkeys){if(key.Type()==HPS.Type.SegmentKey){HPS.SegmentKeysegKey=newHPS.SegmentKey(key);_=segKey.Find(Search.Type.Geometry,// searching for geometrySearch.Space.SegmentOnly,// within all this segmentoutSearchResultssearchResults);HPS.SearchResultsIteratorit=searchResults.GetIterator();while(it.IsValid()){HPS.KeygeomKey=it.GetItem();HPS.TypegeomKeyType=geomKey.Type();if(geomKeyType==HPS.Type.ShellKey){HPS.ShellKeyshellKey=newShellKey(geomKey);HPS.Point[]shellPoints;shellKey.ShowPoints(outshellPoints);intk=0;foreach(HPS.PointpointinshellPoints){HPS.Pointtemp=mKit.Transform(point);shellPoints[k]=temp;if(mathPoints!=null)mathPoints.Add(newMathematical_Utility.Point(temp.x,temp.y,temp.z));k++;}shellPoint.AddRange(shellPoints.ToList());}it.Next();}}}}}}}}
How can we write similar function in xbim?
The text was updated successfully, but these errors were encountered:
We are replacing HOOPS code by using Xbim.
We are able to replace the model loading and showing on desktop application.
We need to get shell points of any component. Specifically IfcGeographicElement.
Function using HOOPS is as follows:
How can we write similar function in xbim?
The text was updated successfully, but these errors were encountered: