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 / Profile - defining the geometry

    Profile - defining the geometry

    With the help of the previously defined points, you can compute a part of the bottle's profile geometry.

    As shown in the figure below, it will consist of two segments and one arc.


     



    To create such entities, you need a specific data structure which implements 3D geometric objects. This can be found in the Open CASCADE Technology Geom package.

    An Open CASCADE Technology package is defined as a group of classes which have the same behavior or belong to the same structure. Open CASCADE Technology classes have names that start with the name of the package they belong to. For example, Geom_Line and Geom_Circle classes belong to the Geom package. The Geom package implements 3D geometric objects compliant with STEP: elementary curves and surfaces are provided as well as more complex ones (such as Bezier and BSpline).

    However, the Geom package provides only the data structure of the geometric entities. You can instantiate directly classes belonging to Geom, but it is easier to compute elementary curves and surfaces by using the GC package. This is because the GC provides two algorithm classes which are exactly what is required for our profile:

    Class GC_MakeSegment to create a segment. One of its constructors allows you to define a segment out of two points P1 and P2.

    Class GC_MakeArcOfCircle to create an arc of a circle. A very useful constructor specifies that an arc can be built from two points P1 and P3 and going through P2.

    Both of these classes return a Geom_TrimmedCurve manipulated by a handle. This entity represents a base curve which is limited between two of its parameter values. For example, a circle C is parameterized between 0 and 2PI. If you need to create a quarter of a circle, you create a Geom_TrimmedCurve on C limited between 0 and PI/2.


    Handle(Geom_TrimmedCurve) aArcOfCircle = GC_MakeArcOfCircle(aPnt2,aPnt3 ,aPnt4);
    Handle(Geom_TrimmedCurve) aSegment1 = GC_MakeSegment(aPnt1 , aPnt2);
    Handle(Geom_TrimmedCurve) aSegment2 = GC_MakeSegment(aPnt4 , aPnt5);


    All GC classes provide a casting method to obtain the result automatically with a function-like call. You may use these classes more safely by using the IsDone and Value methods. For example:


    GC_MakeSegment mkSeg (aPnt1 , aPnt2);
    Handle(Geom_TrimmedCurve) aSegment1;
    if(mkSeg.IsDone()){
    aSegment1 = mkSeg.Value();
    ...
    }

    next step
    previous step

     
     

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