Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Two coedges using the same edge
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-02-2007 03:33 AM
Hello. I'm trying to create a bunch from two coedges and one edge.
I receive this image after all manipulations with entities:
- coedge1: sense 0, linked with edge, partner with coedge2
- coedge2: sense 1, linked with edge, partner with coedge1
- edge: sense 0, linked with coedge 1. Bounding box of edge
found from the start and end points of intcurve underlying it.
This bound is using with loop also.
... and, as result I have Error: error in face loop (No periphery loop)
Tell me please about meaning of this error in my situation. It would
be nice if anyone show me how to make this bunch correctly.
Thanks!
I receive this image after all manipulations with entities:
- coedge1: sense 0, linked with edge, partner with coedge2
- coedge2: sense 1, linked with edge, partner with coedge1
- edge: sense 0, linked with coedge 1. Bounding box of edge
found from the start and end points of intcurve underlying it.
This bound is using with loop also.
... and, as result I have Error: error in face loop (No periphery loop)
Tell me please about meaning of this error in my situation. It would
be nice if anyone show me how to make this bunch correctly.
Thanks!
Re: Two coedges using the same edge
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-19-2007 01:51 PM
Hello Ignorius,
I am not sure what you are trying to do here, or how you gotten to the point you describe. Are you trying to construct a body by building up the topology yourself? As you can imagine, this is complicated and one must then ensure that every pointer between corresponding topological entities is exactly right. In general, this is not recommended; it is much easier and safer to construct bodies through the API and let the modeller worry about getting everything hooked up correctly.
In general, the relationships you describe between the coedges and the edges sound right, but you have not mentioned anything else about the construction, so it would be difficult to determine where an error may lie. The error "error in face loop (No periphery loop)" basically means that a loop for the outer boundary of the face is either not present, not detected properly, or cannot be traversed due to errors in it, all of which are illegal conditions that can cause problems downstream when an operation needs to access the loop.
Perhaps I am misunderstanding your question and how you are trying to create this "bunch". It sounds like you may have intended to attach an image, but I do not see it in the post.
Please let the community know if you have more information and we will try to help.
Best Regards,
Stacey
Re: Two coedges using the same edge
[ Edited ]Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-21-2007 03:24 AM - edited 11-21-2007 03:26 AM
Hello Stacey!
Yes, I'm trying to create topology by myself. It's very difficult operation, but I need to do that =)
At first, I want to create correct body represents a sphere. I have sperical surface equation (bs3_surface) and two parameter curves (coedges) as the input data.
I have a nice result with create topology like this: surface + coedge1<->edge1 + coedge2<->edge2, this body looks like sphere but it's not solid and I can't to do any boolean operations with it.
As next step I want to receive a body with coedge1<->edge<->coedge2.
Here is parts of my code:
1 - Create SURFACE with equation I have. Ok...
2 - Create PCURVE and then receive EDGE and COEDGE. Ok...
EDGE *edge = NULL;
intcurve *intcurv = ACIS_NEW intcurve(NULL, -1.0, surf->equation(), *(surface const*)NULL_REF, bs2curv, NULL, *(SPAinterval const*)NULL_REF, TRUE);
api_make_edge_from_curve(intcurv, edge);
first_coedge = ACIS_NEW COEDGE(edge, FALSE, NULL, NULL);
first_coedge->set_geometry(pcrv);
pcrv->add_owner(first_coedge);
first_coedge->set_edge(edge);
edge->set_coedge(first_coedge);
3 - Trying to create second PCURVE and COEDGE pair:
// ... here I create PCURVE ... Ok...
coedge = ACIS_NEW COEDGE(first_coedge->edge(), TRUE, first_coedge, first_coedge); // take edge from first_coedge, set first_coedge as previous and next
coedge->set_geometry(pcrv); // give new PCURVE to coedge
pcrv->add_owner(coedge); // and set owner to PCURVE
coedge->set_partner(first_coedge); // set partner coedges
first_coedge->set_partner(coedge);
coedge->set_sense(!first_coedge->sense()); // set senses
ACISRETURN(coedge); // and returns new coedge
4 - Trying to create BODY from COEDGEs (in coedges_list[]) and SURFACE
LOOP *new_loop = NULL;
if (coedges_count > 0)
{
new_loop = ACIS_NEW LOOP(coedge_list[0], NULL);
for (n = 0; n < coedges_count; n++)
{
coedge_list[n]->set_owner(new_loop);
coedge_list[n]->set_loop(new_loop);
}
}
FACE *new_face = NULL;
if (coedges_count > 0)
new_face = ACIS_NEW FACE( new_loop, NULL, surf, FALSE );
else
{
new_face = ACIS_NEW FACE();
new_face->set_geometry(surf);
}
new_face->set_next(NULL);
new_face->set_loop(new_loop);
new_loop->set_face(new_face);
EDGE *edge = new_loop->start()->edge();
SPAbox *bound_box = edge->bound();
new_loop->set_bound(bound_box);
new_loop->set_next(NULL);
// make new body
SHELL *new_shell = ACIS_NEW SHELL( new_face, NULL, NULL );
new_shell->set_next(NULL);
new_face->set_shell(new_shell);
LUMP *new_lump = ACIS_NEW LUMP( new_shell, NULL );
new_lump->set_next(NULL);
new_shell->set_lump(new_lump);
BODY *body = ACIS_NEW BODY(new_lump);
new_lump->set_body(body);
Thanks for any help!
Message Edited by Igorunius on 11-21-2007 02:26 PM
Yes, I'm trying to create topology by myself. It's very difficult operation, but I need to do that =)
At first, I want to create correct body represents a sphere. I have sperical surface equation (bs3_surface) and two parameter curves (coedges) as the input data.
I have a nice result with create topology like this: surface + coedge1<->edge1 + coedge2<->edge2, this body looks like sphere but it's not solid and I can't to do any boolean operations with it.
As next step I want to receive a body with coedge1<->edge<->coedge2.
Here is parts of my code:
1 - Create SURFACE with equation I have. Ok...
2 - Create PCURVE and then receive EDGE and COEDGE. Ok...
EDGE *edge = NULL;
intcurve *intcurv = ACIS_NEW intcurve(NULL, -1.0, surf->equation(), *(surface const*)NULL_REF, bs2curv, NULL, *(SPAinterval const*)NULL_REF, TRUE);
api_make_edge_from_curve(intcurv, edge);
first_coedge = ACIS_NEW COEDGE(edge, FALSE, NULL, NULL);
first_coedge->set_geometry(pcrv);
pcrv->add_owner(first_coedge);
first_coedge->set_edge(edge);
edge->set_coedge(first_coedge);
3 - Trying to create second PCURVE and COEDGE pair:
// ... here I create PCURVE ... Ok...
coedge = ACIS_NEW COEDGE(first_coedge->edge(), TRUE, first_coedge, first_coedge); // take edge from first_coedge, set first_coedge as previous and next
coedge->set_geometry(pcrv); // give new PCURVE to coedge
pcrv->add_owner(coedge); // and set owner to PCURVE
coedge->set_partner(first_coedge); // set partner coedges
first_coedge->set_partner(coedge);
coedge->set_sense(!first_coedge->sense()); // set senses
ACISRETURN(coedge); // and returns new coedge
4 - Trying to create BODY from COEDGEs (in coedges_list[]) and SURFACE
LOOP *new_loop = NULL;
if (coedges_count > 0)
{
new_loop = ACIS_NEW LOOP(coedge_list[0], NULL);
for (n = 0; n < coedges_count; n++)
{
coedge_list[n]->set_owner(new_loop);
coedge_list[n]->set_loop(new_loop);
}
}
FACE *new_face = NULL;
if (coedges_count > 0)
new_face = ACIS_NEW FACE( new_loop, NULL, surf, FALSE );
else
{
new_face = ACIS_NEW FACE();
new_face->set_geometry(surf);
}
new_face->set_next(NULL);
new_face->set_loop(new_loop);
new_loop->set_face(new_face);
EDGE *edge = new_loop->start()->edge();
SPAbox *bound_box = edge->bound();
new_loop->set_bound(bound_box);
new_loop->set_next(NULL);
// make new body
SHELL *new_shell = ACIS_NEW SHELL( new_face, NULL, NULL );
new_shell->set_next(NULL);
new_face->set_shell(new_shell);
LUMP *new_lump = ACIS_NEW LUMP( new_shell, NULL );
new_lump->set_next(NULL);
new_shell->set_lump(new_lump);
BODY *body = ACIS_NEW BODY(new_lump);
new_lump->set_body(body);
Thanks for any help!
Message Edited by Igorunius on 11-21-2007 02:26 PM

