- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Use api_combin e_edges within a loop
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-22-2011 08:07 AM
Hello all:
I have a list of edges, which I stored in an ENTITY_LIST. I would like to combine these edges (in a loop) to use the combined edge as the profile for a sweeping operation; I could not get that to work. Could someone be kind enough to point out what am I doing wrong, or point me to the right direction? Many thanks! My code is as follows:
// Declare, and initialise entity lists
ENTITY_LIST entityList, edgeList;
edgeList.init();
entityList.init();
// Construct a list of edges using an array of "SPAposition" points
int k = 0;
EDGE *edge;
for (int i=0; i<pointArraySize-1; i++){
api_mk_ed_line(pointArray[i], pointArray[i+1], edge);
k = edgeList.add(edge, TRUE);
}
// Create a "combined edge" using the first two edges of "edgeList"
EDGE *combinedEdge;
rOutcome = api_combine_edges( (EDGE *)edgeList[0],
(EDGE *)edgeList[1],
combinedEdge,
NULL);
// Loop through "edgeList", and add the remaining edges to
// "combinedEdge"
for (int i=2; i<edgeList.count(); i++)
{
rOutcome = api_combine_edges( (EDGE *)edgeList[i],
combinedEdge,
combinedEdge,
NULL);
}
Re: Use api_combin e_edges within a loop
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-22-2011 10:01 AM
Hello elkott,
As you have a set of points an easier api to use would be api_make_wire which you can then pass to the sweeping api.
Please note api_combine_edges expects the edges to be G1 continious. From the code you are creating a set of straight edges
for (int i=0; i<pointArraySize-1; i++){
api_mk_ed_line(pointArray[i], pointArray[i+1], edge);
k = edgeList.add(edge, TRUE);
}
so unless these edges are all in one line this api will not work.
I hope this helps.
Regards,
Yogesh
Re: Use api_combin e_edges within a loop
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-23-2011 05:42 AM
Hello Yogesh:
Thanks a lot for your response to my question; it certainly helped a lot.
Thanks and have a wonderful day.
Diaa ElKott

