Hello everyone,
I want to add a three-dimensional cylinder perpendicular to the Z axis.The code about prepareGeometry is as follows:
//void prepareGeometry(SuperGeometry3D<T>& superGeometry, IndicatorF3D<T>& indicator,
UnitConverter<T,DESCRIPTOR> const& converter)
{
OstreamManager clout(std::cout,”prepareGeometry”);
clout << “Prepare Geometry …” << std::endl;
superGeometry.rename(0,2,indicator);
superGeometry.rename(2,1,0,0,1);
superGeometry.clean();
superGeometry.innerClean();
superGeometry.checkForErrors();
superGeometry.print();
std::vector<T> PhyMax = superGeometry.getStatistics().getMaxPhysR(2);
std::vector<T> PhyMin = superGeometry.getStatistics().getMinPhysR(2);
clout << “Dimension of the channel in meters: x = ” << PhyMax[0] – PhyMin[0];
clout << ” ; y = ” << PhyMax[1] – PhyMin[1];
clout << ” ; z = ” << PhyMax[2] – PhyMin[2] << std::endl;
Vector<T,3> center1 = {0,2,1};
Vector<T,3> center2 = {lx,2,1};
IndicatorCylinder3D<T> cylinder(center1,center2,1);
superGeometry.rename( 2,5,cylinder );
superGeometry.clean();
superGeometry.checkForErrors();
superGeometry.print();//
clout << “Prepare Geometry … OK” << std::endl;
The above code can’t draw a cylinder. I want to ask what are the problems with the code?