[brlcad-tracker] [ brlcad-Support Requests-2934277 ] mk_extrusion not working
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: SourceForge.net <no...@so...> - 2010-01-18 15:40:19
|
Support Requests item #2934277, was opened at 2010-01-18 14:18 Message generated for change (Settings changed) made by ocarretero You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640803&aid=2934277&group_id=105292 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Geometry Editing Group: None >Status: Deleted >Resolution: Fixed Priority: 5 Private: No Submitted By: Oscar (ocarretero) Assigned to: Nobody/Anonymous (nobody) Summary: mk_extrusion not working Initial Comment: Hello, I'm triing to write an external program that uses the CSG capabilities of BRL-cad. In fact, I want to fill a db with some objects, do boolean operations with them, do the triangulation, and get the triangles. I'm beginning with some tests, and I use the db_walk_tree sample from brl-cad. When I add a box and a sphere (or a cone, or a cilinder), it works really fine. I get the triangles and the resulting mesh object is ok. Then I try to do an extrusion from an sketch. It's a very simple sketch with 5 points. But the program seems to hang for a while and then crashes... I've revised everything in my code and i dont see anything wrong. Can someone tell me what i'm doing wrong? I'm missing anything? This is the part of the code where i add the extrusion: int index; struct rt_sketch_internal *skt; vect_t u, V, h; point2d_t lpt[5]; int i,a; BU_GETSTRUCT(skt, rt_sketch_internal); VSET( skt->u_vec, 1.0, 0.0, 0.0 ); VSET( skt->v_vec, 0.0, 1.0, 0.0 ); VSET( skt->V, 75.0, 75.0, 75.0 ); skt->magic = RT_SKETCH_INTERNAL_MAGIC; skt->vert_count = 5; skt->verts = bu_calloc( skt->vert_count, sizeof(point2d_t), "2d points" ); lpt[0][X] = 0; lpt[0][Y] = 0; lpt[1][X] = 0; lpt[1][Y] = 75; lpt[2][X] = 75; lpt[2][Y] = 75; lpt[3][X] = 75; lpt[3][Y] = 0; lpt[4][X] = 0; lpt[4][Y] = 0; for ( index=0; index < 5; index++ ) { V2MOVE(skt->verts[index], lpt[index]); } mk_sketch( wdbp, "skt.s", skt); VSET( u, 1.0, 0.0, 0.0 ); VSET( v, 0.0, 1.0, 0.0 ); VSET( V, 75.0, 75.0, 75.0 ); VSET( h, 0.0, 0.0, 100.0 ); mk_extrusion(wdbp, "extr.s", "skt.s", V, h, u, v,0); I apologise for my bad programming skills and for my worst english... Thanks, Oscar ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640803&aid=2934277&group_id=105292 |