For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Boolean for the attached two solids?

Sharad Verma's picture
Forums: 

Hi,

Please help me out about this issue. I am performing boolean operation with the attached solids. However BRepAlgoAPI_Common is returning IsDone(), still the resultant shape is NULL. And also there is no error with the attached step files.

If somebody can help me, then please tell me, where i am doing wrong?

Both the solids are in the Solids.zip file.

Regards,
Sharad Verma

Attachments: 
Sharad Verma's picture

Please help me out, why this is happening with these two solids.

Cauchy Ding's picture

Two faces of the two solids can't get intersection. My OCC is 6.5.1 64 & Win7.

Attachments: 
Sharad Verma's picture

Thanks Ding,

That's exactly happening with me. I am using the same version you are using. Can you please explain, why OCC is unable to produce the intersection between these solids.

Forum supervisor's picture

Dear Sharad,
I got intersection of two solids (see the attached picture).
Draw reproducer:
pload ALL
stepread Solid1.step s1
# s1_1
stepread Solid2.step s2
# # s2_1
bop s1_1 s2_1
bopsection r
checkshape r
## Valid shape
Regards

Attachments: 
Sharad Verma's picture

Thanks Forum Supervisor for fast reply.

I am using OCC 6.5.1. Below is the code snippet used for the common between these solids.

##########################################
STEPControl_Reader Reader1;
Reader1.ReadFile("Solid1.step");
Reader1.TransferRoots();

STEPControl_Reader Reader2;
Reader2.ReadFile("Solid2.step");
Reader2.TransferRoots();

BRepAlgoAPI_Common common(Reader1.OneShape() , Reader2.OneShape());

if(common.IsDone())
{
STEPControl_Controller::Init();
STEPControl_Writer aWriter;
aWriter.Transfer(m_OCCTGeom, STEPControl_AsIs);
aWriter.Write("Common.step");
}

##################################################################

I have attached the Common.step file for your reference. As you can see, there is no common geometry in Common.step file.

What wrong i am doing? If you can, please guide me in this issue.

Attachments: 
Qr Qr's picture

Try tracing the supervisor's script in Draw via 'getsource' command (e.g. getsource bopsection) to see the code behind it. Then you will be able to reproduce the correct logic.

Forum supervisor's picture

The same for your case.
The problem is not reproduced.
See the attached picture.
Regards

Attachments: 
Sharad Verma's picture

Dear forum supervisor,

I am not able to get anything with the Union of the two attached solids, Can you please help me out, why this is happening?

I am using BRepAlgoAPI_Fuse to get the resultant solid.

With Best Regards,
Sharad Verma

Forum supervisor's picture

Dear Sharad,
I just want to remind you that training and e-learning courses are at your disposal - http://www.opencascade.org/support/training/. We don't provide technical consulting on the Forum.
If you will decide that you can benefit from our services just contact us via the Contact Form http://www.opencascade.org/about/contacts/.
We will try to propose you the service best suited for your needs.
Regards

Sharad Verma's picture

If you need the BRep of the SOlids, please find the attached zip BRepSolids.zip.

Thanks

Attachments: 
PG's picture

bopfuse creates a valid shape, but the 'vprops' shows
all values as ZERO.

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.