📄 2005-april.txt
字号:
Hello subscribbers,Mr. Herb asked:>Hi,>i need to build an application using ACIS 13 HOOPS 11.1 and QT 3.3.1.>After some searching i found the qtacishoopsrefapp.zip:>http://developer.hoops3d.com/downloads/DevZoneSamples/qtacishoopsrefapp.zip >I hoped that this is a good entry point for my work.>I'm able to compile it and the HOOPs part is also working (drawing>spheres, coni, etc.) >But whenever i want to load a SAT file a new Window is opened but only>with a black screen. no SAT BODY can be seen.>What i don't understand:>I've searched in the whole project for a api_initialize_hoops_acis_bridge>call but didn't find any. >From what I've learned in the ACIS manual concerning the HOOPS-ACIS>Bridge>this initialization function has to be called.>Furthermore there is a >"HA_Read_Sat_File(FileName, elist); // read an SAT file" >statement in the code but it doesn't seem to be reached. >My question: is this reference app really able to load and show sat>files? On Linux qthoopsrefapp did work, using qt3.3.3, hoops11 and acis14. I didinsert the following statements in the main.cpp codes:// Includes for ACIS#include <ha_bridge.h>#include <kernapi.hxx>#include <vers.hxx>#include <acis_options.hxx>At line 182:outcome acisinit = api_initialize_hoops_acis_bridge();api_start_modeller(0);HA_Init(0);At the public section of class MyHQWidget : public HQWidget, in the fileMyHQWidget.h:// Includes for ACIS#include <ha_bridge.h>#include <kernapi.hxx>#include <vers.hxx>#include <acis_options.hxx>ENTITY_LIST elist;ENTITY* entity;ENTITY_LIST m_entityList; At the method void MyHQWidget::load(const char * filename), in the fileMyHQWidget.cpp: else if (strstr("sat", extension)){ unsigned int i; OnClear(); m_pHView->GetModel()->GetStreamFileTK()->Restart(); elist.init(); entity=0; m_entityList.init(); HC_Parse_String(filename,".",-1,extension); for(i=0; i<strlen(extension);i++) extension[i]=(char) tolower(extension[i]); HC_Open_Segment_By_Key(m_pHView->GetSceneKey()); HC_Open_Segment("main"); bool leitura=true; leitura = HA_Read_Sat_File(filename, elist); if (leitura) result = InputOK; elist.init(); while (entity = elist.next()){ m_entityList.add(entity); } HC_Close_Segment(); HC_Close_Segment(); m_pHView->ZoomToExtents(); m_pHView->SetViewMode(HViewIso); }Hope it helps.Best regards,Edilson Gr?nheidt BorgesFrom avinash at cpdm.iisc.ernet.in Wed Apr 20 01:38:10 2005From: avinash at cpdm.iisc.ernet.in (Avinash)Date: Wed Apr 20 01:44:37 2005Subject: [Acis-alliance] To find if given face is cylindricalMessage-ID: <2584.144.16.64.4.1113975490.squirrel@144.16.64.4>Hi!I am using ACIS R14.I want to determine whether a face is cylinder.I restored a SAT file which is a simple cylinder part.With the following code I could determine the type of faces. FACE *ft = bod->lump()->shell()->face_list(); int f_num = 0; while(ft != NULL) { SURFACE *fs = ft->geometry(); printf("Face %d is a %s type \n", f_num,fs- >type_name()); ft = ft->next(); f_num++; }But for cylindrical face also it gives face type_name as cone.To determine if it is cylinder, I coded it asSURFACE *fs = ft->geometry(); surface *s = (surface*)fs; cone *c = (cone*)s; logical l = (*c).cylinder(); cout<<l;But instead of printing value 0 or 1, it is printing 2146533361.I don't know how to achieve the desired results.Further, I want to find the radius and axis of the cylindrical face.Your help is thankful.Regards,avinash.From harip at formz.com Wed Apr 20 09:40:42 2005From: harip at formz.com (Harigopal Polisetty)Date: Wed Apr 20 09:46:40 2005Subject: [Acis-alliance] To find if given face is cylindricalIn-Reply-To: <2584.144.16.64.4.1113975490.squirrel@144.16.64.4>Message-ID: <l03130300be8c066ae63f@[192.168.1.127]>if(is_conical_face(ft)){ SURFACE *fs = ft->geometry(); cone cn = (cone&) fs->equation(); logical l = cn.cylinder(); /* The conical face has an elliptical (or circular) base whichcontains the radius and axis information */ ellipse ell = cn.base; double r1 = ell.major_axis.len(); double r2 = r1*ell.radius_ratio; SPAposition axis1 = ell.centre; SPAposition axis2 = ell.normal; /* Note that the coincal face could be reversed, like in the caseof holes */ logical rev = cn.hollow();}Hope that helps.Hari PolisettyAt 1:38 AM -0400 4/20/05, Avinash wrote:>Hi!>I am using ACIS R14.>I want to determine whether a face is cylinder.>I restored a SAT file which is a simple cylinder part.>With the following code I could determine the type of faces.> FACE *ft = bod->lump()->shell()->face_list();> int f_num = 0;> while(ft != NULL)> {> SURFACE *fs = ft->geometry();>> printf("Face %d is a %s type \n", f_num,fs->> >type_name());> ft = ft->next();>> f_num++;>> }>But for cylindrical face also it gives face type_name as cone.>To determine if it is cylinder, I coded it as>>SURFACE *fs = ft->geometry();> surface *s = (surface*)fs;> cone *c = (cone*)s;> logical l = (*c).cylinder();> cout<<l;>>But instead of printing value 0 or 1, it is printing 2146533361.>I don't know how to achieve the desired results.>Further, I want to find the radius and axis of the cylindrical face.>Your help is thankful.>Regards,>avinash.>>>>_______________________________________________>Acis-alliance mailing list>Acis-alliance@cs.columbia.edu>http://lists.cs.columbia.edu/mailman/listinfo/acis-allianceFrom Zhengshu.Shen at asu.edu Wed Apr 20 15:44:01 2005From: Zhengshu.Shen at asu.edu (shen)Date: Wed Apr 20 15:45:08 2005Subject: [Acis-alliance] facet problem? Kind help?In-Reply-To: <03781128C7B74B4DBC27C55859C9D7381139488C@es06snlnt.sandia.gov>Message-ID: <IIEKJAKDBBNAOFCGMGKBEEDACBAA.Zhengshu.Shen@asu.edu>I’m using faceting of ACIS to generate polygon meshes for faces on a body.The degree of refinement is specified as follows. This specification doesn’t work with conical face, but work with spherical, toroidal and splinefaces. No matter how large the axial length of the conical face is, one edgeof every facet will be parallel to the axis and have a length equal to theaxial length of the conical face. My goal is to obtain a fine mesh having atleast 10 facets along the axial direction for all types of face. One thing Itried is to convert conical faces into spline faces, but the resulted meshesare still the same. Thank you for you input.Shen//--------------------------------------------------------double sd = (new_body_box.high() - new_body_box.low()).len() / 100.;double facet_edge_len = (new_body_box.high() - new_body_box.low()).len() /100.;REFINEMENT *ref = ::new REFINEMENT();ref->set_surf_mode(AF_SURF_ALL);ref->set_adjust_mode(AF_ADJUST_NON_GRID);ref->set_triang_mode(AF_TRIANG_NONE);ref->set_edge_length(facet_edge_len);ref->set_max_edge_length(facet_edge_len);ref->set_surface_tol(0.5);//sd);ref->set_normal_tol(25.);ref->set_grid_aspect_ratio(0.);ref->set_max_grid_lines(200);ref->set_grid_mode(AF_GRID_TO_EDGES);ref->set_min_u_grid_lines(10);ref->set_min_v_grid_lines(10);api_set_default_refinement(ref);parameter_token ptoken[2];ptoken[0]=POSITION_TOKEN;ptoken[1]=NORMAL_TOKEN;VERTEX_TEMPLATE *vt=::new VERTEX_TEMPLATE(2,ptoken);api_set_default_vertex_template(vt);//--------------------------------------------------------From huangyb at hustcad.com Thu Apr 21 04:51:40 2005From: huangyb at hustcad.com (=?gb2312?B?u8bUy7Gj?=)Date: Thu Apr 21 04:57:00 2005Subject: [Acis-alliance] How to understand the following codes?Message-ID: <MDAEMON-F200504211655.AA5510953md50000006187@nbol.net>Hello,everyone. Could you tell me what is the purpose of the following codes in HoopsBridge project?class HA_History_Callbacks : public history_callbacks{ // declare any data related to handling roll. public: void Before_Roll_States() { // Do your before roll stuff for a group of DELTA_STATEs } void Before_Roll_State(DELTA_STATE*) { // Do your before roll stuff for one DELTA_STATE; } void get_changed_entitys(BULLETIN_BOARD* bb, ENTITY_LIST &elist) { for (BULLETIN *b = bb->start_b; b != NULL; b = b->next_ptr) { ENTITY* e2 = b->new_entity_ptr(); ENTITY* e3 = b->old_entity_ptr(); ENTITY *owner2, *owner3; api_get_owner(e2, owner2); api_get_owner(e3, owner3); if (owner2 && (!owner3 || owner2 == owner3)) { logical add=FALSE; ENTITY_LIST owners; if (is_APOINT(owner2)) { if (!((APOINT*)owner2)->get_owners(owners)) add=TRUE; } else if (is_CURVE(owner2)) { if (!((CURVE*)owner2)->get_owners(owners)) add=TRUE; } else if (is_PCURVE(owner2)) { if (!((PCURVE*)owner2)->get_owners(owners)) add=TRUE; } else if (is_SURFACE(owner2)) { if (!((SURFACE*)owner2)->get_owners(owners)) add=TRUE; } else if (is_toplevel(owner2)) add=TRUE; if (add) elist.add(owner2); } else if (owner2 && owner2 == owner3) { if (is_toplevel(owner2)) elist.add(owner2); } } } void Before_Roll_Bulletin_Board(BULLETIN_BOARD* bb, logical discard) { // Do your before roll stuff for one BULLETIN_BOARD // if discard is true, the roll is due to error processing and the // BULLETIN_BOARD will be deleted along with all its BULLETINS. if (discard) return; API_NOP_BEGIN ENTITY_LIST DelEntities; get_changed_entitys(bb,DelEntities); HA_Delete_Entity_Geometry(DelEntities); API_NOP_END } void After_Roll_Bulletin_Board(BULLETIN_BOARD* bb, logical discard) { // Do your after roll stuff for one BULLETIN_BOARD; // if discard is true, the roll is due to error processing and the // BULLETIN_BOARD will be deleted along with all its BULLETINS. if (discard) return; API_NOP_BEGIN ENTITY_LIST NewEntities; get_changed_entitys(bb,NewEntities); HA_Render_Entities(NewEntities); API_NOP_END } void After_Roll_State(DELTA_STATE*) { // Do your after roll stuff for one DELTA_STATE; } void After_Roll_States() { // Do your after roll stuff for a group of DELTA_STATES }}; Yunbao Huang Ph.DCAD Center of Huazhong University of Technology & ScienceWuhan,China.P.R. 430074Tel:86+27+87547405Fax:86+27+87547405E-mail:huangyb@hustcad.com2005-04-21
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -