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 - prism the profile

    Body - prism the profile

    To compute the main body of the bottle, you need to create a solid shape.

    The simplest way is to use the previously created profile and to sweep it along a direction: the Prism functionality of Open CASCADE Technology is the most appropriate. It accepts a shape and a direction as input and generates a new shape according to the following rules:

    Shape

    Generates

    Vertex

    Edge

    Edge

    Face

    Wire

    Shell

    Face

    Solid

    Shell

    Compound of Solid




     



    Your current profile is a wire. Refering to the Shape/Generates table, you need to compute a face out of its wire to generate a solid.

    To create a face, you use the BRepBuilderAPI_MakeFace class. As previously explained, a face is a part of a surface bounded by a closed wire. Generally, BRepBuilderAPI_MakeFace computes a face out of a surface and one or more wires.

    When the wire lies on a plane, the surface is automatically computed.


    TopoDS_Face myFaceProfile = BRepBuilderAPI_MakeFace(myWireProfile);


    The BRepPrimAPI package provides all the classes to create topological primitive constructions: boxes, cones, cylinders, spheres, etc. Among them is the BRepPrimAPI_MakePrism class. As specified above, this class is defined by:

    - the basis shape to sweep
    - a vector for a finite prism or a direction for finite and infinite prisms

    You want the solid to be finite, swept along the Z axis and to be myHeight height. The vector, defined with the gp_Vec class on its X, Y and Z coordinates is:


    gp_Vec aPrismVec(0 , 0 , myHeight);


    All data necessary to create the main body of your bottle is now available. Just apply the BRepPrimAPI_MakePrism class to compute the solid:


    TopoDS_Shape myBody = BRepPrimAPI_MakePrism(myFaceProfile , aPrismVec);

    next step
    previous step


     
     

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