acis常用函数

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

acis常用函数基本几何造型函数://立方体api_make_cuboid(length(x),width(y),height(z),BODY)api_solid_block(SPAposition(左上角顶点坐标),SPAposition(右下角顶点坐标),BODY)//球体api_make_sphere(半径,BODY)api_solid_sphere(SPAposition(圆心坐标),半径,BODY)//圆环体api_make_torus(外环半径,环宽,BODY)api_solid_torus(SPAposition(环心坐标),外环半径,环宽,BODY)//圆锥体api_make_frustum(height(z),length(x),width(y),顶部半径,BODY)api_solid_cylinder_cone(SPAposition(顶部圆心坐标),SPAposition(底部圆心坐标),m*M_PI(底部长轴),n*M_PI(底部短轴),0(顶部半径),NULL,BODY)//圆柱体api_make_frustum(height(z),length(x),width(y),顶部半径,BODY)api_solid_cylinder_cone(SPAposition(顶部圆心坐标),SPAposition(底部圆心坐标),m*M_PI(底部长轴),n*M_PI(底部短轴),0(顶部半径),NULL,BODY)//棱柱api_make_prism(height(z),length(x),width(y),棱数,BODY)//棱锥api_make_pyramid(height(z),length(x),width(y),顶部半径,棱数,BODY)//闭合样条api_curve_spline(int,SPAposition*,SPAunit_vector*(NULL),SPAunit_vector*(NULL),EDGE*&,logical(TRUE),logical(TRUE),AcisOptions*)//曲线api_curve_line(constSPAposition&pt1,constSPAposition&pt2,EDGE*&line,AcisOptions*ao=NULL)//连接边的实体api_make_ewire(intnum_edges,EDGE*[]edges,BODY*&body,AcisOptions*ao=NULL)//着色api_rh_set_entity_rgb((ENTITY*&)body,rgb_color(r,g,b));//其中,api_gi_set_entity_rgb是着色函数,(ENTITY*&)body指定实体,body,rgb_color(r,g,b)进行着色。//移动SPAvectortranss(i,j,k);SPAtransfmovee=translate_transf(transs);api_transform_entity((ENTITY*&)new_body,movee);//其中,api_copy_entity是复制函数,(ENTITY*&)pre原实体,(ENTITY*&)new_body新实体;transfmovee=translate_transf(trass)是定义移方向和大小的函数;api_transform_entity是移位函数,把(ENTITY*&)new_body按movee规则平移。//旋转api_copy_entity((ENTITY*&)pre,(ENTITY*&)new_body);transfroti=rotate_transf(arc,acis);api_transform_entity((ENTITY*&)new_body,roti);//其中,api_copy_entity是复制函数,(ENTITY*&)pre原实体,(ENTITY*&)new_body新实体;transfroti=rotate_transf(arc,acis)是定义旋转方向和度数的函数;api_transform_entity是旋转函数,把(ENTITY*&)new_body按roti规则旋转。api_boolean(body_a,body_b,UNION);//求两body的并集,结果保存在body_b中api_boolean(body_a,body_b,INTERSECTION);//求两body的交集,结果保存在body_b中api_boolean(body_a,body_b,SUBTRACTION);//求两body的差集,结果保存在body_b中api_sweep_with_options((ENTITY*)circle,(ENTITY*)arcedge,options,(BODY*&)lei);//扫略api_find_vertex(BODY*fuwa,SPAposition(0,0,1),blv(接收));//获得实体上指定点附近的点api_q_edges_around_vertex(v[j],&vedge_list[j]);//得到共享给定点的边api_smooth_edge_seq(cir_edge[j],edges_to_blend[j]);//得到与给定边相连的边的序列(ENTITY_LIST&)api_get_faces(ENTITY*ent,ENTITY_LIST&face_list,PAT_NEXT_TYPEinclude_pat=PAT_CAN_CREATE,AcisOptions*ao=NULL)//获取所有面api_set_const_rounds(edges_to_blend[j],r);//设置混合半径0点y向、z向、x向,1点z向、x向,2点z向、x向,3点z向、x向api_fix_blends(edges_to_blend[j]);//进行混合,产生曲面api_rh_create_light(constchar*type,RH_LIGHT*&light)//创建光源api_rh_set_light_state(RH_LIGHT*light,logicalon(off))//开关光源api_rh_set_material_texture(ENTITY_LISTconst&entity_list,constchar*tex_name)//贴图HA_Delete_Entity_Geometry(ENTITY*entity)//取消实体的显示api_del_entity(ENTITY*given_entity,AcisOptions*ao=NULL)//删除实体api_transform_entity((ENTITY*&)e,translate_transf(SPAvector(1,0,0)));//动画api_find_vertex(e,SPAposition(0,0,5),blv);//找到实体上指定点附近的顶点,放到列表blv里api_q_edges_around_vertex(blv,&edge_list);//寻找顶点谅连接的边。0号边是y方向(屏幕上下),1号是z方向(屏幕内外),2号x方向(屏幕左右)api_smooth_edge_seq((EDGE*)edge_list[2],edges_to_blend);//得到与给定边相连的边的序列api_set_const_rounds((ENTITY_LIST&)edges_to_blend,1.5);//设置混合半径,0点边的混合次序y向、z向、x向,注意不可以过大。api_initialize_blending();api_fix_blends((ENTITY_LIST&)edges_to_blend);//进行混合,用新面取代老面3xzyapi_terminate_blending();//sweep扫略sweep_options*options=ACIS_NEWsweep_options();options-set_cut_end_off(TRUE);api_initialize_sweeping();api_get_owner((ENTITY*)profile,(ENTITY*&)fuwa);api_sweep_with_options((ENTITY*)profile,(ENTITY*)path,options,(BODY*&)fuwa);api_terminate_sweeping();ACIS_DELETEoptions;贴图和混合差不多。首先获取实体中的面,放到一个面的列表里。然后给这个列表的所有元素贴图。ENTITY_LISTball;api_solid_block(SPAposition(0,0,0),SPAposition(5,5,5),fuwa);api_get_faces(fuwa,ball);//获取所有面api_rh_set_material_texture(ball,mm.bmp);如果需要只给几个面贴图,只需要创建另一个列表,把需要贴图的面放到里面就可以了。FunctionDescriptionapi_boolean()CanbeusedtogeneratetheintersectionbetweentwoBODIES.api_clash_bodies()DeterminesiftwoBODIESclash,andoptionallythenatureoftheclash.api_clash_faces()DeterminesiftwoFACESclashandthenatureoftheclash.api_edent_rel()DeterminesthespatialrelationshipbetweenanEDGEandanotherENTITY.api_edfa_int()GeneratestheintersectionbetweenanEDGEandaFACE.api_entity_entity_distance()DeterminestheminimumdistancebetweentoENTITIES.api_entity_entity_touch()DeterminesiftwoENTITIEStouch.api_entity_point_distance()DeterminesthedistancebetweenapointandanENTITY.api_fafa_int()Generatestheintersectionbetweentwofaces.api_find_cls_ptto_face()DeterminesthepointonaFACEnearestagivenpoint.api_find_vertex()DeterminestheVERTEXonaBODYnearestagivenpoint.api_intersect()GeneratestheintersectionbetweentwoBODIES.api_intersect_curves()DeterminestheintersectionbetweentwoEDGESortheirunderlyingcurves.api_planar_slice()GeneratesthewireBODYrepresentingtheintersectionbetweenaplaneandaBODY.api_point_in_body()Determineswhetherapointliesinside,outside,orontheboundaryofaBODY.api_point_in_face()Determineswhetherapointliesinside,outside,orontheboundaryofaFACE.ThepointisassumedtolieonthesurfaceoftheFACE.api_pt

1 / 4
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功