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


My first application
  • Profile - defining support points
  • Profile - defining the geometry
  • Profile - defining the topology
  • Profile - completing the profile
  • Body - prism the profile
  • Body - applying fillets
  • Body - adding the neck
  • Body - creating a hollowed solid
  • Threading - creating surfaces
  • Threading - defining 2D curves
  • Threading - building edges and wires
  • Threading - creation and building the resulting compound


  • 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 / Getting started / My first application / Body - applying fillets

    Body - applying fillets

    The edges of the bottle's body are very sharp. To replace them by rounded faces, you use the Fillet functionality of Open CASCADE Technology.

    Depending on their location, fillets can be very complex - for example, they can follow linear or specific evolution laws between vertices of an edge - but for our purposes, you will simply specify that fillets must be:

    - applied on all edges of the shape
    - have a radius of myThickness / 12


     



    To apply fillets on the edges of a shape, you use the BRepFilletAPI_MakeFillet class. This class is normally used as follows:

    - Specify the shape to be filleted in the BRepFilletAPI_MakeFillet constructor.
    - Add the fillet descriptions (an edge and a radius) using the Add method (you can add as many edges as you need).
    - Ask for the resulting filleted shape with the Shape method.


    BRepFilletAPI_MakeFillet mkFillet(myBody);


    To add the fillet description, you need to know the edges belonging to your shape. The best solution is to explore your solid to retrieve its edges. This kind of functionality is provided with the TopExp_Explorer class which explores the data structure described in a TopoDS_Shape and extracts the sub-shapes you specifically need. Generally, this explorer is created by providing the following information:

    - the shape to explore
    - the type of sub-shapes to be found. This information is given with the TopAbs_ShapeEnum enumeration.


    TopExp_Explorer aEdgeExplorer(myBody , TopAbs_EDGE);


    An explorer is usually applied in a loop by using its three main methods:

    - More - to know if there are more sub-shapes to explore.
    - Current - to know which is the currently explored sub-shape.
    - Next - to move onto the next sub-shape to explore (used only if the More method returns true).


    while(aEdgeExplorer.More()){
    TopoDS_Edge aEdge = TopoDS::Edge(aEdgeExplorer.Current());
    //Add edge to fillet algorithm
    ...
    aEdgeExplorer.Next();
    }


    In the explorer loop, you have found all the edges contained in the bottle. Each one must then be added in the BRepFilletAPI_MakeFillet instance with the Add method. Do not forget to specify the radius of the fillet along with it.


    mkFillet.Add(myThickness / 12. , aEdge);


    Once this is done, you perform the last step of the procedure by asking for the filleted shape.


    myBody = mkFillet.Shape();

    next step
    previous step


     
     

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