Home
Reply
Contributor
Moaz
Posts: 5

Sweep problem

Hi friends,
 
I have a problem in the sweeping function.
 
sweep_options sweep_opts;
BODY* bf = NULL;
outcome rc = api_sweep_with_options(face, SPAvector(0,0,14), &sweep_opts, bf);


outcome is not ok and find_err_mess() returns "Attempt to sweep a non-manifold face"
 
The face is attached as SAT file.
 
The problem happens because of the rightmost polygon touching the border's box. If you move the polgon a little to the left, the sweep will work fine.
 
Can anyone suggest a fix for this ?

jfk
Contributor
jfk
Posts: 9

Re: Sweep problem

[ Edited ]
Hi,
 
You can try to apply api_unstitch_nonmani() before the sweeping. You will get 4 non-manifold bodies. Then you apply api_separate_body() on the sheet body. Doing this You get one body for each lump. On each of those lumps you can use your sweep function. And then you combine all the resultings body to get your final 3d body.
 
I don't know if it will work in your specific case but you can try.


Message Edited by jfk on 09-13-2007 01:27 PM

Message Edited by jfk on 09-13-2007 01:38 PM
Spatial Moderator
Stacey
Posts: 76

Re: Sweep problem

Hello,
 
 
***********************************************************************************
You can try to apply api_unstitch_nonmani() before the sweeping. You will get 4 non-manifold bodies
***********************************************************************************
 
In reading this reply about api_unstitch_nonmani(), I realized this interpretation resulted from an error in the documentation regarding the output of this function.  The documentation states:
 
"Role: This API decomposes the input body into four bodies, consisting of the input body's manifold lumps, sheets, lamina, and wires. The input body is destroyed. "
 
Actually, what should be said in the documentation is that the input BODY is decomposed into the number of bodies required to create manifold output.  (In the example case, only one BODY is necessary and created.)  The four body types listed in the documentation are four categories that would potentially have to be broken out of a multi-dimensional body to make the manifold pieces. 
 
It should be noted that when the api_unstitch_nonmani() function is called in cases like this where there is a vertex sharing four or more edges, a duplicate vertex will be created.  Duplicate vertices result in check errors and can cause problems in some functions. 
Contributor
Moaz
Posts: 5

Re: Sweep problem

I did :
 
 
int numLumps;

BODY** Lumps=0;

BODY *lumps=0,*sheet=0,*lamina=0,*wires=0;

outcome rc = api_unstitch_nonmani(face,lumps,sheet,lamina,wires);

rc = api_separate_body(sheet,numLumps,Lumps);

 

But the result of the separate function is only one lump.

jfk
Contributor
jfk
Posts: 9

Re: Sweep problem

Did you try the sweeping on this lump?