Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Usage issues / BRepAlgoAPI_Cut failed to cut a cylinder from another

BRepAlgoAPI_Cut failed to cut a cylinder from another

BRepAlgoAPI_Cut failed to cut a cylinder from another
kylin 2013/01/17 10:29
hi, I've been working with Open cascade for some time, mostly used with its geometry boolean apis.
Recently I've found a problem when cylinder generated by following codes will not be cutted correctly with BRepAlgoAPI_Cut

"
     TopoDS_Shape cylinderSmall = BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(-0.1212,0.98989,-0.213313),gp_Dir(1,0,1)),10,800);
     TopoDS_Shape cylinderBig = BRepPrimAPI_MakeCylinder(gp_Ax2(gp_Pnt(-0.1212,0.98989,-0.213313),gp_Dir(1,0,1)),100,100);
     //TopoDS_Shape ret = BRepAlgo_Cut(cylinderBig,cylinderSmall);
     TopoDS_Shape ret = BRepAlgoAPI_Cut(cylinderBig,cylinderSmall);
     return ret;
"
but the strange thing is BRepAlgo_Cut can work in this case.
I've tried to debug for a long time, but got no clue. Can you fix this or tell me how to work on it?
You have to be logged in to download the attached file
Forum supervisor 2013/01/18 14:35
Dear kylin,
The case also is not reproducible in OCCT654 environment.
See below the script and attached result.
Draw[]> pload ALL
Draw[]> plane pln1 -0.1212 0.98989 -0.213313 1 0 1
Draw[]> pcyl cy1 pln1 10 800
Draw[]> pcyl cy2 pln1 100 100
Draw[]> fit
Draw[]> bop cy2 cy1
Draw[]> bopcut Result
Draw[]> fit
Draw[]> checkshape Result
## This shape seems to be valid
Draw[]> vdisplay Result
Draw[]> save Result Result24295.brep
Regards

You have to be logged in to download the attached file
kylin 2013/01/19 12:12
Dear supervisor
I'm sorry, the code I've posted is not the code where error happened.
The error code is below. It was supposed that a hole should exist in the bigger cylinder, but there's none.(There's only a tiny difference of the parameters in the two codes.)

Draw[]> pload ALL
Draw[]> plane pln1 -0.1212 0.98989 -0.213313 1 0 1
Draw[]> plane pln2 -0.1212 0.98989 -0.213313 0.71111111 0 0.71111112
Draw[]> pcyl cy1 pln1 10 800
Draw[]> pcyl cy2 pln2 100 100
Draw[]> fit
Draw[]> bop cy2 cy1
Draw[]> bopcut Result
Draw[]> fit
Draw[]> checkshape Result
Draw[]> vdisplay Result

you can see, there's no hole in the cylinder but a small piece of circle in the bottom of the cylinder. This is the error I was talking about.
Thank you for your patience and your guide of the usage of the script tool.
Hope this would help.

Also there's a question, what should I do if I want to change the Precise value during the runtime?

Regards
kylin 2013/01/19 12:16
The wrong result is attached. Thank you for your attention.
You have to be logged in to download the attached file
Forum supervisor 2013/01/21 12:19
Dear kylin,
I would like to inform you that the posted problem (after your correction) has been checked and reproduced. The result contains Not Closed Shell.
I suggest you to register the issue in Mantis Bugtracker which is available via the Collaborative portal - http://dev.opencascade.org/index.php?q=home/get_involved.
If the problem is critical for you, you may contact us via the Contact Form http://www.opencascade.org/about/contacts/.
Regards
kylin 2013/01/26 11:54
Dear supervisor
Thank you for your guidance, I'll go further until this be done.
Regards
 
 
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map