DiscussionsIssue archiveOther usage issues

Archived discussion

Boolean for the attached two solids?

Other usage issuesWed, 01/25/2012 - 15:4211 replies

Browse this forum
QuestionAuthor

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,
Author

Discussion

11 archived replies

Posts are displayed in their archived order.

01Author

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

02Commenter-1

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

03Author

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.

04Commenter-2

Dear Author,
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

05Author

Thanks Commenter-2 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.

06Commenter-3

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.

07Commenter-2

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

08Author

Dear Commenter-2,

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,
Author

09Commenter-2

Dear Author,
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

10Author

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

Thanks

11Commenter-4

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