Ok. I understand why I have to give the shape Id.
IShapes.GetFaceLoops(ElementItemId face) API gives me List<int> with count 2.
Then, I am calling IShapes.GetLoopEdges(ElementId shape, loopId)
where,
loopId = integer Id returned by Ishapes.GetFaceLoops() API.
The call is giving exception 'Invalid loop Identifier'. I guess this means, loopId is invalid.
Is there anything I am doing wrong here?
Or Is there any other way of getting the loopId?
Calculation of Face Area
Moderators: remi77, jacs, Daniel
-
- Private First Class
- Posts: 18
- Joined: Tue Sep 08, 2015 11:04 am
- TopSolid Module: TopSolid'Design
- TopSolid Version: 6.25
-
- Chief
- Posts: 107
- Joined: Mon Mar 26, 2007 9:40 am
- TopSolid Module: TopSolid'Cam
- TopSolid Version: 6.26
- Location: The netherlands
- Contact:
Re: Calculation of Face Area
Why do you use GetLoopEdge if you already have both loops? What are you trying to achieve?
Do you want to get the 4 seperate edges?
Are you sure you give the same shape in both functions. Above you write:
GetFaceLoops (element id face)
GetLoopEdges (element id shape, loop id )
So it seems you give a different shape id in both function. I think it should be the same.
GetFaceLoops (element id face)
GetLoopEdges (element id face, loop id )
Or is this what you wrote in the previous post?
Do you want to get the 4 seperate edges?
Are you sure you give the same shape in both functions. Above you write:
GetFaceLoops (element id face)
GetLoopEdges (element id shape, loop id )
So it seems you give a different shape id in both function. I think it should be the same.
GetFaceLoops (element id face)
GetLoopEdges (element id face, loop id )
Or is this what you wrote in the previous post?
-
- Private First Class
- Posts: 18
- Joined: Tue Sep 08, 2015 11:04 am
- TopSolid Module: TopSolid'Design
- TopSolid Version: 6.25
Re: Calculation of Face Area
The Id cannot be the same because, parameters passed o both APIs are different.
1. IShapes.GetFaceLoops(ElementItemId face)
2. IShapes.GetLoopEdges(ElementId shape, int loopId)
I have two loop IDs, now I am trying to get the edges of each loop.
ie.- 4 separate edges.
The exception is 'Invalid loop Id'. Why is the loop Id wrong?
1. IShapes.GetFaceLoops(ElementItemId face)
2. IShapes.GetLoopEdges(ElementId shape, int loopId)
I have two loop IDs, now I am trying to get the edges of each loop.
ie.- 4 separate edges.
The exception is 'Invalid loop Id'. Why is the loop Id wrong?