Home
Reply
Contributor
pwang8097
Posts: 18

wrong in sweep along a helix path

I create a circle edge, then make it a plane by api_cover_plane_wire. the R of the circle is 0.1mm. 

the I make a helix by api_helix_edge,  the pitch of the helix is 1mm,

then i sweep the plane along the helix by api_sweep_with_option,

The result body is not regular. it look like having been squeezed .

 Are there some problems in the sweep function? How can I make the helix solid body I wanted?

Spatial Moderator
ybiyani
Posts: 223

Re: wrong in sweep along a helix path

Hello pwang8097,

 

Can you submit the journal scripts for the sweeping operation and an image to show what you mean by squeezed?

 

Regards,

Yogesh

Contributor
pwang8097
Posts: 18

Re: wrong in sweep along a helix path

hello  ybiyani

 

 The profile does not sweep along the helix exactly. The bitmap has shown this.

helix.JPG
Spatial Moderator
ybiyani
Posts: 223

Re: wrong in sweep along a helix path

Hello pwang,

 

Please create a support incident with the journal scripts so that this can be investigated further.

 

Regards,

Yogesh

Contributor
pwang8097
Posts: 18

Re: wrong in sweep along a helix path

hello ybiyani

 

thanks for your help. but I have to take a few days to learn how to make the journal scripts. Can you give me some hints?

Do I make the journal scripts by the ACIS aide(ACIS interface driver extension)?

AR
Contributor
AR
Posts: 23

Re: wrong in sweep along a helix path

To learn how to make journal scripts, you can use this article on Journaling.

 

-AR

Contributor
pwang8097
Posts: 18

Re: wrong in sweep along a helix path

 Hello ybiyani

 

The sweep along helix problem have been solved。 I increase the sparesfit  resolution,the surface become more robust.

 

And I hava picked up the skill to make journal scripts. But another problem confused me. I make modle using funtions that are all journal vailable.

 

But after the code executed, there are no scripts at all.

So I can not submit the journal scripts to you. Here are my codes doing the sweep along helix. Hope you can help me.

 

#ifdef _DEBUG
 // Set the units and product_id.
 FileInfo fileinfo;
 fileinfo.set_units (1.0);
 fileinfo.set_product_id ("Example");
 res = api_set_file_info((FileId | FileUnits), fileinfo);

 // Also set the option to produce sequence numbers in the SAT file.
 res = api_set_int_option("sequence_save_files", 1);

 // Create an AcisOptions object and initialize journalling
 AcisOptions * ao = ACIS_NEW AcisOptions();
 api_start_journal(ao);
#else
 AcisOptions * ao = NULL;
#endif
  EDGE* pEdge;
  api_edge_helix(SPAposition(0.007, 0, 0), SPAposition(0.008, 0, 0), SPAvector(0, 1, -3.2051034546938615e-009), 0.002, 0.001, false, pEdge);
   
  EDGE* pline;
  api_mk_ed_line(SPAposition(0.0068999999999999999, 0.002, 0), SPAposition(0.0071000000000000004, 0.002, 0), pline);
 
  EDGE* pArc;
  api_curve_arc_center_edge(SPAposition(0.0070000000000000001,0.002, 0), SPAposition(0.0068999999999999999, 0.002, 0),  SPAposition(0.0071000000000000004, 0.002, 0), &SPAunit_vector(0,0,1), pArc);
 
  ENTITY_LIST pEdges;
  pEdges.add(pline);
  pEdges.add(pArc);
 
  int nNumEdge = pEdges.count();
  ENTITY** pEdgesArr = pEdges.array();

  int nBodys;
  BODY** pBodies = NULL;
  res = api_make_ewires(nNumEdge, (EDGE**)pEdgesArr, nBodys, pBodies);
 
  ENTITY_LIST wireBodys;
  for (int i = 0; i < nBodys; i++)
  {
   wireBodys.add(pBodies[i]);
  }
  ENTITY_LIST wiresError;
  BODY* pProfile;
  res = api_cover_planar_wires(wireBodys, pProfile, wiresError);
    
  BODY* pSweepBody;
  sweep_options swOptions;
  swOptions.set_solid(true);
  api_initialize_sweeping();
  {
   API_BEGIN
    res = api_sweep_with_options(pProfile, (BODY*)pEdge, &swOptions, pSweepBody);
   API_END
  }
  if (!res.ok())
  {
   string strError = GetErrorString(res);
   api_terminate_sweeping();
   return -1;
  }
 //////then save the sweeped body.
#ifdef _DEBUG
 // Terminate journalling and delete the AcisOptions object
 api_end_journal(ao);
 ACIS_DELETE ao;
#endif

Contributor
pwang8097
Posts: 18

Re: wrong in sweep along a helix path

hello AR

 

Tt is very kind of you. Thanks for your help.