Geometric Modeler

Topology

How to Create a Circle Sweep with One Guide and a Tangency Surface

Circle Sweep Subtype: One Guide and Tangency Surface
Use Case

Abstract

The CATFrFTopologicalSweep operator enables you to create sweeps. This use case explains how to create a circle sweep with one guide and a tangency surface.  


What You Will Learn With This Use Case

In this use case, you learn how to use the CATTopSweepWireSkinCircle operator to create circle sweeps with one guide and a tangency surface. A radius law is to be specified.

CATTopSweepWireSkinCircle is a CATTopMultiResult operator. To scan the results, you must use the BeginningResult() and NextResult() methods provided by the CATTopMultiResult operator.

[Top]

The CAAAdtCircleSweepTangSurRadius Use Case

CAAAdtCircleSweepTangSurRadius is a use case of the CAAAdvancedTopologicalOperators.edu framework that illustrates the  CAAAdvancedTopologicalOperators framework capabilities.

The circle sweep which is created by this use case looks something like this. The tangency surface is not displayed.


[Top]

What Does CAAAdtCircleSweepTangSurRadius Do ?

The use case:

Note
This article only focuses on the operations related to the CATTopMultiResult  and CATTopSweepWireSkinCircle operators. Refer to "Overview of the Topological Operators" [1] for more information on the operations which are not detailed in the article.

[Top]

How to Launch CAAAdtCircleSweepTangSurRadius

To launch CAAAdtCircleSweepTangSurRadius, you will need to set up the build time environment, then compile CAAAdtCircleSweepTangSurRadius .m, set up the run time environment, and then execute the use case [2].

If you simply type CAAAdtCircleSweepTangSurRadius with no argument, the use case executes, but doesn't save the result in an NCGM file. If you want to save this result, provide the full pathname of the NCGM file to create. For example:

With Windows CAAAdtCircleSweepTangSurRadius e:\sweep.NCGM

With UNIX CAAAdtCircleSweepTangSurRadius /u/sweep.NCGM

This NCGM file can be displayed using the CAAGemBrowser use case.

 

[Top]

Where to Find the CAAAdtCircleSweepTangSurRadius Code

The CAAAdtCircleSweepTangSurRadius use case is made of a main named CAAAdtCircleSweepTangSurRadius.cpp located in the CAAAdtCircleSweepTangSurRadius.m module of the CAATopologicalOperators.edu framework:

Windows InstallRootDirectory\CAAAdvancedTopologicalOperators.edu\CAAAdtCircleSweepTangSurRadius .m\
Unix InstallRootDirectory/CAAAdvancedTopologicalOperators.edu/CAAAdtCircleSweepTangSurRadius .m/

where InstallRootDirectory is the directory where the CAA CD-ROM is installed.

[Top]

Step-by-Step

The use case is divided into the following main steps:

[Top]

Creating the guide and the tangency surface

The curve to be used as the guide is a CATSpline that is simply created from the geometry factory. See [3] for information on how to create a spline. The tangency surface is created by extruding a spline (CATTopPrism operator).

Creating a CATTopSweepWireSkinCircle operator instance

The CATTopSweepWireSkinCircle operator is created by the CATCreateTopSweepWireSkinCircleVariable global function (arg 3: tangency surface, arg 4: the guide, arg 5: the spine, arg 6: the radius law).

CATLaw * radiusLaw = ((CATLaw*)(piGeomFactory -> CreateConstantLaw(0.0, 1.0, 10.0)));
    
// (b) - Create the CATTopSweepWireSkinCircle operator
//
CATTopMultiResult * pWireSkinCircleOpe =
        CATCreateTopSweepWireSkinCircleVariable (piGeomFactory, &topdata, 
        pPBody, pWireBody2,
        pWireBody2, radiusLaw);
...

    [Top]

Retrieving a given result

CATTopSweepWireSkinCircle is a CATTopMultiResult operator.  For all the operators deriving from CATTopMultiResult, you access the results by using the BeginningResult(), NextResult() and GetResult() methods provided by the operators.

// (d) - Retrieve the second body
//
pWireSkinCircleOpe->BeginningResult();
int nbBodies = pWireSkinCircleOpe->GetNumberOfResults();
for (int iBody = 1 ; iBody <= nbBodies ; iBody ++)
  {
    pWireSkinCircleOpe->NextResult();
    if (iBody == 2)
        {
            CATBody * pCurBody = pWireSkinCircleOpe->GetResult();
        }
    }  
...

    [Top]


In Short

This use case is an example of how to create a circle sweep with one guide and a tangency surface by using the CATTopSweepWireSkinCircle operator.

[Top]


References

[1] Overview of the Topological Operators
[2] Building and Launching a CAA V5 Use Case
[3] Basic Topological Operators
[Top]

History

Version: 1 [Aug 2002] Document created
[Top]

Copyright © 2002, Dassault Systèmes. All rights reserved.