Geometric Modeler |
Topology |
Creating FilletsHow to create constant and variable radius fillets |
Use Case |
AbstractThis use case explains how to create constant fillets, variable fillets and fillets with rolling edges. |
This use case is intended to help you use fillets in geometric modeler applications.
[Top]
CAATopAllFillets is a use case of the CAATopologicalOperators.edu framework that illustrates TopologicalOperators framework capabilities.
[Top]
CAATopAllFillets creates two solid cuboids, performs a boolean union of the cubes, then creates fillets on the resulting solid.
The CAATopConstantFillets function which is defined in the CAATopConstantFillets.cpp folder creates a constant fillet along the edges common to both cubes. | |
The CAATopRollingEdges function which is defined in the CAATopRollingEdges.cpp folder creates a fillet along the common edges and specifies rolling edges. | |
The CAATopVariableFillets function which is defined in the CAATopVariableFillets.cpp folder creates a variable radius fillet on one edge of the solid. |
[Top]
To launch CAATopAllFillets, you will need to set up the build time environment, then compile CAATopAllFillets.m along with its prerequisites, set up the run time environment, and then execute the use case [1].
If you simply type CAATopAllFillets 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 CAATopAllFillets
e:\Fillets.NCGM
With UNIX CAATopAllFillets
/u/Fillets.NCGM
This NCGM file can be displayed using the CAAGemBrowser use case.
[Top]
The CAATopAllFillets use case is made of a main named CAATopAllFillets.cpp located in the CAATopAllFillets.m module of the CAATopologicalOperators.edu framework:
Windows | InstallRootDirectory\CAATopologicalOperators.edu\CAATopAllFillets.m\ |
Unix | InstallRootDirectory/CAATopologicalOperators.edu/CAATopAllFillets.m/ |
where InstallRootDirectory
is the directory where the CAA CD-ROM
is installed.
[Top]
There are six steps in CAATopAllFillets.cpp:
[Top]
The geometry factory (CATGeoFactory) creates and manages all the
CATICGMObject. This creation is done by the global function ::CATCreateCGMContainer
.
Notice that the factory can be defined by reading a NCGM file that was
previously stored. In that case, the global function ::CATLoadCGMContainer
must be used.
CATGeoFactory* piGeomFactory = ::CATCreateCGMContainer() ; if (NULL==piGeomFactory) return (1); |
[Top]
See [2] which illustrates how to create a solid cuboid.
[Top]
See also [2].
[Top]
To create a constant radius fillet, you must:
double * ratio= NULL; CATDynFilletRadius * pRadius = new CATDynFilletRadius(3., // radius value NULL, ratio, NULL); |
The arguments two, three and four of the constructor are only to be specified when the fillet to be created is of variable radius. The cells to be filleted with a constant radius are specified in the CATDynEdgeFilletRibbon constructor.
CATLISTP(CATDynFilletRadius) listRadius; listRadius.Append(pRadius); CATDynEdgeFilletRibbon * pRibbon = new CATDynEdgeFilletRibbon(listEdges, listRadius); |
pRibbon ->SetSegmentationMode(CATDynTrim); |
CATDynFillet * pFilletOp1 = CATCreateDynFillet(iFactory,iTopData,iBody); |
pFilletOp1 ->Append(pRibbon); |
[Top]
To create a variable radius fillet, you must:
CATDynEdgeFilletRibbon * pRibbon = new CATDynEdgeFilletRibbon(listEdges, listRadius, CATBody::CATEdgePropagAuto, listRollingEdges, // the rolling edges CATDynRolling); |
[Top]
To create a variable radius fillet, you must:
double * ratio0= new double(0.0); CATDynFilletRadius * pRadius0 = new CATDynFilletRadius(4., // radius value listCells[2], ratio0, NULL); // "free" tangency at this extremity ... double * ratio1= new double(0.25); CATDynFilletRadius * pRadius1 = new CATDynFilletRadius(0.2, // radius value listCells[2], ratio1, NULL); // "free" tangency for this location |
The second and third arguments of the constructor must be specified when the fillet to be created is of variable radius.
CATLISTP(CATDynFilletRadius) listRadius; listRadius.Append(pRadius0); listRadius.Append(pRadius1); listRadius.Append(pRadius2); listRadius.Append(pRadius3); // Create the CATDynEdgeFilletRibbon // CATDynEdgeFilletRibbon * pRibbon = new CATDynEdgeFilletRibbon(NULL, listRadius); |
pRibbon ->SetSegmentationMode(CATDynTrim); |
CATDynFillet * pFilletOp1 = CATCreateDynFillet(iFactory,iTopData,iBody); |
pFilletOp1 ->Append(pRibbon); |
[Top]
To save the model in a file, the ::CATSaveCGMContainer
global
function is used. Notice that in the use case, the save is conditioned by an
input parameter representing the file inside which the model must be saved.
The use case ends with the closure of the geometry factory, done by the ::CATCloseCGMContainer
global function.
if(1==toStore) { #ifdef _WINDOWS_SOURCE ofstream filetowrite(pfileName, ios::binary ) ; #else ofstream filetowrite(pfileName,ios::out,filebuf::openprot) ; #endif ::CATSaveCGMContainer(piGeomFactory,filetowrite); filetowrite.close(); } // // Closes the container // ::CATCloseCGMContainer(piGeomFactory); |
[Top]
To create fillets, you must specify a list of radii as well as a list of edges to be filleted. For a constant radius, the list of radii contains a single item that you can apply to one or more edges. When creating a variable fillet, you must specify the list of radii. The edge to be filleted is then specified in the radius definition.
[Top]
[1] | Building and Launching a CAA V5 Use Case |
[2] | Overview of the Topological Operators |
[Top] |
Version: 1 [March 2002] | Document created |
[Top] |
Copyright © 2000, Dassault Systèmes. All rights reserved.