You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# include "nmCalculationGeoWell.h"
# include <QStringList>
nmCalculationGeoWell : : nmCalculationGeoWell ( const QVector < nmCalculationGeoDataWell > & wellList ) : m_vWellList ( wellList )
{
}
QString nmCalculationGeoWell : : generateWellGeoCodes ( int index )
{
QStringList circleLines ;
// 单独的 Sphere 的文件内容
for ( int i = 0 ; i < m_vWellList . size ( ) ; i + + ) {
const nmCalculationGeoDataWell & well = m_vWellList [ i ] ;
circleLines . append ( QString ( " Sphere(%1) = {%2, %3, 0, %4}; " )
. arg ( i + 1 ) // 编号
. arg ( well . center ( ) . x ( ) ) // x坐标
. arg ( well . center ( ) . y ( ) ) // y坐标
. arg ( well . radius ( ) ) ) ; // 圆的半径
}
// 添加布尔差异的定义
// qDebug()<<m_circles.size()<<"!!!!!!";
for ( int i = 0 ; i < m_vWellList . size ( ) ; + + i ) {
//这里是抠图部分, 注意surface是平面, 这里我们只存在一个底面, 因此surface不变
circleLines . append ( QString ( " BooleanDifference{ Surface{%1}; Delete; }{ Volume{%2}; Delete; } " )
. arg ( 1 ) // Surface{1},这里可以根据多边形的数量进行调整
. arg ( i + 1 ) ) ; // Volume{1},递增数字
}
//圆周分段:自定义的圆周网格个数,确保达到密集化效果
for ( int i = 0 ; i < m_vWellList . size ( ) ; i + + ) {
const nmCalculationGeoDataWell & well = m_vWellList [ i ] ;
circleLines . append ( QString ( " Transfinite Curve {%1} = %2; " )
. arg ( index + i + 1 )
. arg ( well . roundPointCount ( ) ) ) ;
}
return circleLines . join ( " \n " ) ;
}