📄 2005-november.txt
字号:
From schmiddie78 at gmail.com Tue Nov 1 10:07:57 2005From: schmiddie78 at gmail.com (Stefan Schmidt)Date: Tue Nov 1 10:08:22 2005Subject: [Acis-alliance] api_sweep_with_options() problemsIn-Reply-To: <3404FFFE3A3D264F911AC78D782708C670469C@groupware.ASI.COM>References: <3404FFFE3A3D264F911AC78D782708C670469C@groupware.ASI.COM>Message-ID: <436784CD.50805@gmail.com>Hi all,I am looking to construct a "WEDGE" body. This is basically a rectangular box (define by height, width, length) cut in half diagonally. I am not sure how to contruct this in ACIS given the height, width, length. Any suggestions? Thanks.StefanESWAR wrote:> Hi,> Call api_initialize_sweeping() function before calling> api_sweep_with_options(). After sweeping is done terminate sweeping by> calling api_terminate_sweeping().> > Regards,> Eswar> > -----Original Message-----> From: acis-alliance-bounces@cs.columbia.edu> [mailto:acis-alliance-bounces@cs.columbia.edu] On Behalf Of Stefan> Schmidt> Sent: Monday, October 24, 2005 10:54 PM> To: acis-alliance@cs.columbia.edu> Cc: rGraebert@givemepower.de> Subject: [Acis-alliance] api_sweep_with_options() problems> > Hi,> > I am trying to run the following code snippet but pSweepResult is always> > NULL. I do api_initialize_sweeping() and so forth before. Anybody knows > what else I need to take care of or which fields in sweep_options I have> > to set? Thanks for any help.> > SPAposition origin(0.0,0.0,0.0);> SPAposition left(0.0,10.0,0.0);> SPAposition right(10.0,0.0,0.0);> FACE *fprofile = NULL;> > check_outcome(api_make_plface(origin, left, right, fprofile));> FACE *faces[1];> faces[0] = fprofile;> BODY *sheet = NULL;> check_outcome(api_mk_by_faces(NULL,1,faces,sheet));> check_outcome(api_body_to_2d(sheet));> ENTITY_LIST face_list;> check_outcome(api_get_faces((ENTITY*)sheet,face_list));> ENTITY *profile=face_list[0];> sweep_options opt;> opt.set_draft_angle(0.349);> BODY* pSweepResult = 0;> double dist = -30.0;> outcome error = api_sweep_with_options(profile, dist, &opt,> pSweepResult);> _______________________________________________> Acis-alliance mailing list> Acis-alliance@cs.columbia.edu> http://lists.cs.columbia.edu/mailman/listinfo/acis-alliance> From alames at sandia.gov Tue Nov 1 10:20:57 2005From: alames at sandia.gov (Ames, Arlo)Date: Tue Nov 1 10:22:06 2005Subject: [Acis-alliance] api_sweep_with_options() problemsMessage-ID: <46EAC19F3066C14BB20DF799A649C5F401EBFA0D@ES23SNLNT.srn.sandia.gov>3 ways:1. construct a block of given h,w,l. Construct a much larger block.Translate and rotate the second block to correspond to the diagonal ofthe first block. Subtract second block from first.2. Construct a planar face corresponding to the triangular base of theblock. Do api_sweep_with_options to construct the side faces. Maybefinish with api_cover_wires/api_cover_body to close the block.3. (Spatial doesn't like this one). Perform all the low-level callsyourself to construct the wedge. You make a bunch of APOINTS, VERTEXs,STRAIGHTs, EDGEs, COEDGEs, LOOPs, PLANEs, FACEs, SHELLs, LUMPs andBODYs, and make sure all the sense bits, next and prev pointers, etc arecorrect.Approach 1 is trivially easy.Approach 2 gets you into some of the vagaries of the documentation aboutoptions in api_sweep_with_options, so plunges you into the same concernsas the bottom posting below.Approach 3 is by far the most labor intensive, and annoys Spatialbecause they have issues with trying to swap libraries for minorreleases of their product. I recommend it, though, as at least a mentalexercise, as it will greatly expand your understanding of ACIS. Untilyou understand all the data structures it's manipulating, you don'tfully appreciate what you have and will make mistakes regardingcomputational and geometric difficulties the modeler faces.Arlo Amesalames@sandia.gov-----Original Message-----From: acis-alliance-bounces@cs.columbia.edu[mailto:acis-alliance-bounces@cs.columbia.edu] On Behalf Of StefanSchmidtSent: Tuesday, November 01, 2005 8:08 AMTo: acis-alliance@cs.columbia.eduSubject: Re: [Acis-alliance] api_sweep_with_options() problemsHi all,I am looking to construct a "WEDGE" body. This is basically arectangular box (define by height, width, length) cut in halfdiagonally. I am not sure how to contruct this in ACIS given the height,width, length. Any suggestions? Thanks.StefanESWAR wrote:> Hi,> Call api_initialize_sweeping() function before calling > api_sweep_with_options(). After sweeping is done terminate sweeping by> calling api_terminate_sweeping().> > Regards,> Eswar> > -----Original Message-----> From: acis-alliance-bounces@cs.columbia.edu> [mailto:acis-alliance-bounces@cs.columbia.edu] On Behalf Of Stefan > Schmidt> Sent: Monday, October 24, 2005 10:54 PM> To: acis-alliance@cs.columbia.edu> Cc: rGraebert@givemepower.de> Subject: [Acis-alliance] api_sweep_with_options() problems> > Hi,> > I am trying to run the following code snippet but pSweepResult is > always> > NULL. I do api_initialize_sweeping() and so forth before. Anybody > knows what else I need to take care of or which fields in > sweep_options I have> > to set? Thanks for any help.> > SPAposition origin(0.0,0.0,0.0);> SPAposition left(0.0,10.0,0.0);> SPAposition right(10.0,0.0,0.0);> FACE *fprofile = NULL;> > check_outcome(api_make_plface(origin, left, right, fprofile)); FACE > *faces[1]; faces[0] = fprofile; BODY *sheet = NULL; > check_outcome(api_mk_by_faces(NULL,1,faces,sheet));> check_outcome(api_body_to_2d(sheet));> ENTITY_LIST face_list;> check_outcome(api_get_faces((ENTITY*)sheet,face_list));> ENTITY *profile=face_list[0];> sweep_options opt;> opt.set_draft_angle(0.349);> BODY* pSweepResult = 0;> double dist = -30.0;> outcome error = api_sweep_with_options(profile, dist, &opt, > pSweepResult); _______________________________________________> Acis-alliance mailing list> Acis-alliance@cs.columbia.edu> http://lists.cs.columbia.edu/mailman/listinfo/acis-alliance> _______________________________________________Acis-alliance mailing listAcis-alliance@cs.columbia.eduhttp://lists.cs.columbia.edu/mailman/listinfo/acis-allianceFrom schmiddie78 at gmail.com Tue Nov 1 10:34:00 2005From: schmiddie78 at gmail.com (Stefan Schmidt)Date: Tue Nov 1 10:34:44 2005Subject: [Acis-alliance] api_sweep_with_options() problemsIn-Reply-To: <46EAC19F3066C14BB20DF799A649C5F401EBFA0D@ES23SNLNT.srn.sandia.gov>References: <46EAC19F3066C14BB20DF799A649C5F401EBFA0D@ES23SNLNT.srn.sandia.gov>Message-ID: <43678AE8.2070703@gmail.com>Thanks for your help. I am a bit under time pressure so I vote for a quick and dirty aproach: create a box and slice it up using the diagonal plane. Will have to do for now.Ames, Arlo wrote:> 3 ways:> 1. construct a block of given h,w,l. Construct a much larger block.> Translate and rotate the second block to correspond to the diagonal of> the first block. Subtract second block from first.> > 2. Construct a planar face corresponding to the triangular base of the> block. Do api_sweep_with_options to construct the side faces. Maybe> finish with api_cover_wires/api_cover_body to close the block.> > 3. (Spatial doesn't like this one). Perform all the low-level calls> yourself to construct the wedge. You make a bunch of APOINTS, VERTEXs,> STRAIGHTs, EDGEs, COEDGEs, LOOPs, PLANEs, FACEs, SHELLs, LUMPs and> BODYs, and make sure all the sense bits, next and prev pointers, etc are> correct.> > Approach 1 is trivially easy.> > Approach 2 gets you into some of the vagaries of the documentation about> options in api_sweep_with_options, so plunges you into the same concerns> as the bottom posting below.> > Approach 3 is by far the most labor intensive, and annoys Spatial> because they have issues with trying to swap libraries for minor> releases of their product. I recommend it, though, as at least a mental> exercise, as it will greatly expand your understanding of ACIS. Until> you understand all the data structures it's manipulating, you don't> fully appreciate what you have and will make mistakes regarding> computational and geometric difficulties the modeler faces.> > Arlo Ames> alames@sandia.gov> > -----Original Message-----> From: acis-alliance-bounces@cs.columbia.edu> [mailto:acis-alliance-bounces@cs.columbia.edu] On Behalf Of Stefan> Schmidt> Sent: Tuesday, November 01, 2005 8:08 AM> To: acis-alliance@cs.columbia.edu> Subject: Re: [Acis-alliance] api_sweep_with_options() problems> > Hi all,> > I am looking to construct a "WEDGE" body. This is basically a> rectangular box (define by height, width, length) cut in half> diagonally. I am not sure how to contruct this in ACIS given the height,> width, length. Any suggestions? Thanks.> > Stefan> > ESWAR wrote:> >>Hi,>> Call api_initialize_sweeping() function before calling >>api_sweep_with_options(). After sweeping is done terminate sweeping by> > >>calling api_terminate_sweeping().>>>>Regards,>>Eswar>>>>-----Original Message----->>From: acis-alliance-bounces@cs.columbia.edu>>[mailto:acis-alliance-bounces@cs.columbia.edu] On Behalf Of Stefan >>Schmidt>>Sent: Monday, October 24, 2005 10:54 PM>>To: acis-alliance@cs.columbia.edu>>Cc: rGraebert@givemepower.de>>Subject: [Acis-alliance] api_sweep_with_options() problems>>>>Hi,>>>>I am trying to run the following code snippet but pSweepResult is >>always>>>>NULL. I do api_initialize_sweeping() and so forth before. Anybody >>knows what else I need to take care of or which fields in >>sweep_options I have>>>>to set? Thanks for any help.>>>>SPAposition origin(0.0,0.0,0.0);>>SPAposition left(0.0,10.0,0.0);>>SPAposition right(10.0,0.0,0.0);>>FACE *fprofile = NULL;>> >>check_outcome(api_make_plface(origin, left, right, fprofile)); FACE >>*faces[1]; faces[0] = fprofile; BODY *sheet = NULL; >>check_outcome(api_mk_by_faces(NULL,1,faces,sheet));>>check_outcome(api_body_to_2d(sheet));>>ENTITY_LIST face_list;>>check_outcome(api_get_faces((ENTITY*)sheet,face_list));>>ENTITY *profile=face_list[0];>>sweep_options opt;>>opt.set_draft_angle(0.349);>>BODY* pSweepResult = 0;>>double dist = -30.0;>>outcome error = api_sweep_with_options(profile, dist, &opt, >>pSweepResult); _______________________________________________>>Acis-alliance mailing list>>Acis-alliance@cs.columbia.edu>>http://lists.cs.columbia.edu/mailman/listinfo/acis-alliance>>> > > _______________________________________________> Acis-alliance mailing list> Acis-alliance@cs.columbia.edu> http://lists.cs.columbia.edu/mailman/listinfo/acis-alliance> > > > _______________________________________________> Acis-alliance mailing list> Acis-alliance@cs.columbia.edu> http://lists.cs.columbia.edu/mailman/listinfo/acis-alliance> From schmiddie78 at gmail.com Thu Nov 3 09:14:07 2005From: schmiddie78 at gmail.com (Stefan Schmidt)Date: Thu Nov 3 09:14:27 2005Subject: [Acis-alliance] Transforming between Coord SysMessage-ID: <436A1B2F.9080503@gmail.com>Hi,I have one coordsys1 defined by:origin = (0,0,0) and axis (1,0,0), (0,1,0), (0,0,1)And I have coordsys2 defined by:origin = (0,0,0) and three different orth. axis.How do I transform the geometry most effectively between both system inACIS?So far I tried (unsuccessfully) two diff. approaches:1) Define and set Work Coord Sys:api_wcs_create(SPAposition(0,0,0), xpt, ypt, new_wcs);api_wcs_set_active(new_wcs);2) Define and apply Rotational Transform:transf_decompose_data transfData;transfData.rotatex = AngleXAxis;transfData.rotatey = AngleYAxis;transfData.rotatez = AngleZAxis;// etc...trans.compose(transfData,TRUE);api_transform_entity(pSatEntity, trans);api_change_body_trans(pSatEntity,NULL);Does this make sense? And if so how do I find the rotation angles(AngleXAxis,AngleYAxis, AngleZAxis) from the coordsys def above?Any help much welcome. Thanks.-- Stefan SchmidtGiveMePower/Felix Support and Development+49 30 89690350From alames at sandia.gov Thu Nov 3 10:56:05 2005From: alames at sandia.gov (Ames, Arlo)Date: Thu Nov 3 10:56:47 2005Subject: [Acis-alliance] Transforming between Coord SysMessage-ID: <46EAC19F3066C14BB20DF799A649C5F401EC01FC@ES23SNLNT.srn.sandia.gov>I have always liked the undocumented function restore_transf toaccomplish this kind of thing. Spatial might have a good officialanswer, but I haven't found anything that takes the place ofrestore_transf. Call Spatial tech support to see what alternatives theymight have to restore_transf.restore_transf lets you set every individual item of the transform infundamental terms. Your coordinate axes, if normalized, are thecomponents of the matrix m that forms the rotation of the transf. Thetranslation is the translation vector argument. If you have issues withyour rotations, try transposing.Arlo Amesalames@sandia.gov-----Original Message-----From: acis-alliance-bounces@cs.columbia.edu[mailto:acis-alliance-bounces@cs.columbia.edu] On Behalf Of StefanSchmidtSent: Thursday, November 03, 2005 7:14 AMTo: acis-alliance@cs.columbia.eduSubject: [Acis-alliance] Transforming between Coord SysHi,I have one coordsys1 defined by:origin = (0,0,0) and axis (1,0,0), (0,1,0), (0,0,1)And I have coordsys2 defined by:origin = (0,0,0) and three different orth. axis.How do I transform the geometry most effectively between both system inACIS?So far I tried (unsuccessfully) two diff. approaches:1) Define and set Work Coord Sys:api_wcs_create(SPAposition(0,0,0), xpt, ypt, new_wcs);api_wcs_set_active(new_wcs);2) Define and apply Rotational Transform:transf_decompose_data transfData;transfData.rotatex = AngleXAxis;transfData.rotatey = AngleYAxis;transfData.rotatez = AngleZAxis;// etc...trans.compose(transfData,TRUE);api_transform_entity(pSatEntity, trans);api_change_body_trans(pSatEntity,NULL);Does this make sense? And if so how do I find the rotation angles(AngleXAxis,AngleYAxis, AngleZAxis) from the coordsys def above?Any help much welcome. Thanks.--Stefan SchmidtGiveMePower/Felix Support and Development+49 30 89690350_______________________________________________Acis-alliance mailing listAcis-alliance@cs.columbia.eduhttp://lists.cs.columbia.edu/mailman/listinfo/acis-alliance-------------- next part --------------An HTML attachment was scrubbed...URL: http://lists.cs.columbia.edu/pipermail/acis-alliance/attachments/20051103/2ace0b27/attachment.htmlFrom schmiddie78 at gmail.com Thu Nov 3 11:56:19 2005From: schmiddie78 at gmail.com (Stefan Schmidt)Date: Thu Nov 3 11:56:44 2005Subject: [Acis-alliance] Transforming between Coord SysIn-Reply-To: <46EAC19F3066C14BB20DF799A649C5F401EC01FC@ES23SNLNT.srn.sandia.gov>References: <46EAC19F3066C14BB20DF799A649C5F401EC01FC@ES23SNLNT.srn.sandia.gov>Message-ID: <436A4133.5040903@gmail.com>Found it, what are the three flags for???Code:SPAmatrix mat(xpt,ypt,normal);SPAtransf trans = restore_transf(mat, SPAvector(0,0,0), 1.0,logical, logical, logical);Ames, Arlo wrote:> I have always liked the undocumented function restore_transf to > accomplish this kind of thing. Spatial might have a good official > answer, but I haven't found anything that takes the place of > restore_transf. Call Spatial tech support to see what alternatives they > might have to restore_transf.> > restore_transf lets you set every individual item of the transform in
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -