⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rs_filterdxf1.cpp

📁 qcad2.05可用于windows和linux的源码
💻 CPP
📖 第 1 页 / 共 4 页
字号:
            }                */                // Dimension Text Height:                //                else if( dxfLine=="$DIMTXT" ) {                    if(dxfCode=getBufLine()) {                        if( dxfCode.toInt()==40 ) {                            if( dxfLine=getBufLine() ) {                                graphic->addVariable("$DIMTXT", dxfLine, 40);                                //graphic->setDimensionTextHeight( dxfLine.toDouble() );                            }                        }                    }                }                // Dimension exactness:                //                else if( dxfLine=="$DIMRND" ) {                    if(dxfCode=getBufLine()) {                        if( dxfCode.toInt()==40 ) {                            if( dxfLine=getBufLine() ) {                                graphic->addVariable("$DIMRND", dxfLine, 40);                                //if( dxfLine.toDouble()>0.000001 ) {                                //graphic->setDimensionExactness( dxfLine.toDouble() );                            }                            //}                        }                    }                }                // Dimension over length:                //                else if( dxfLine=="$DIMEXE" ) {                    if(dxfCode=getBufLine()) {                        if( dxfCode.toInt()==40 ) {                            if( dxfLine=getBufLine() ) {                                graphic->addVariable("$DIMEXE", dxfLine, 40);                                //graphic->setDimensionOverLength( dxfLine.toDouble() );                            }                        }                    }                }                // Dimension under length:                //                else if( dxfLine=="$DIMEXO" ) {                    if(dxfCode=getBufLine()) {                        if( dxfCode.toInt()==40 ) {                            if( dxfLine=getBufLine() ) {                                graphic->addVariable("$DIMEXO", dxfLine, 40);                                //graphic->setDimensionUnderLength( dxfLine.toDouble() );                            }                        }                    }                }                // Angle dimension format:                //                else if( dxfLine=="$DIMAUNIT" ) {                    if(dxfCode=getBufLine()) {                        if( dxfCode.toInt()==70 ) {                            if( dxfLine=getBufLine() ) {                                graphic->addVariable("$DIMAUNIT", dxfLine, 70);                                /*                                            switch( dxfLine.toInt() ) {                                              case 0: graphic->setAngleDimensionFormat( DecimalDegrees ); break;                                              case 1: graphic->setAngleDimensionFormat( DegreesMinutesSeconds ); break;                                              case 2: graphic->setAngleDimensionFormat( Gradians ); break;                                              case 3: graphic->setAngleDimensionFormat( Radians ); break;                                              case 4: graphic->setAngleDimensionFormat( Surveyor ); break;                                              default: break;                                            }                                */                            }                        }                    }                }                // Angle dimension exactness:                //                else if( dxfLine=="$DIMADEC" ) {                    if(dxfCode=getBufLine()) {                        if( dxfCode.toInt()==70 ) {                            if( dxfLine=getBufLine() ) {                                graphic->addVariable("$DIMADEC", dxfLine, 70);                                //graphic->setAngleDimensionExactness( RS_Math::pow(0.1, dxfLine.toInt()) );                            }                        }                    }                }                // Grid x/y:                //                else if( dxfLine=="$GRIDUNIT" ) {                    if(dxfCode=getBufLine()) {                        if( dxfCode.toInt()==10 ) {                            if (dxfLine=getBufLine()) {                                double x = atof(dxfLine);                                if (dxfLine=getBufLine()) {                                    double y = atof(dxfLine);                                    graphic->addVariable("$GRIDUNIT", RS_Vector(x,y), 10);                                }                            }                        }                    }                }                /*                            double gx=dxfLine.toDouble();                            if (gx<0.0001) gx=0.0001;                            graphic->setMinGridX(gx);                            graphic->setGridFormat( Fractional );                            for( double q=0.00000001; q<=100000.0; q*=10.0 ) {                              if( mtCompFloat(gx, q, q/1000.0) ) {                                graphic->setGridFormat( Decimal );                                break;                              }                            }                          }                        }                      }                      if(dxfCode=getBufLine()) {                        if( dxfCode.toInt()==20 ) {                          if( dxfLine=getBufLine() ) {                            double gy=dxfLine.toDouble();                            if (gy<0.0001) gy=0.0001;                            graphic->setMinGridY(gy);                          }                        }                      }                */                // Page limits min x/y:                //                /*else if( dxfLine=="$PLIMMIN" ) {                  if(dxfCode=getBufLine()) {                    if( dxfCode.toInt()==10 ) {                      if( dxfLine=getBufLine() ) {                        graphic->setPageOriginX( dxfLine.toDouble() );                      }                    }                  }                  if(dxfCode=getBufLine()) {                    if( dxfCode.toInt()==20 ) {                      if( dxfLine=getBufLine() ) {                        graphic->setPageOriginY( dxfLine.toDouble() );                      }                    }                  }            }                */                // Page limits min x/y:                //                /*                      else if( dxfLine=="$PLIMMAX" ) {                        if(dxfCode=getBufLine()) {                          if( dxfCode.toInt()==10 ) {                            if( dxfLine=getBufLine() ) {                              graphic->setPageSizeX( dxfLine.toDouble() - graphic->getPageOriginX() );                            }                          }                        }                        if(dxfCode=getBufLine()) {                          if( dxfCode.toInt()==20 ) {                            if( dxfLine=getBufLine() ) {                              graphic->setPageSizeY( dxfLine.toDouble() - graphic->getPageOriginY() );                            }                          }                        }                      }                */                // Paper space scale:                //                /*                      else if( dxfLine=="$PSVPSCALE" ) {                        if(dxfCode=getBufLine()) {                          if( dxfCode.toInt()==40 ) {                            if( dxfLine=getBufLine() ) {                              graphic->setPaperSpace( dxfLine.toDouble() );                            }                          }                        }                      }                */            }            // Entity            //            else if(dxfLine &&                    dxfLine[0]>='A' && dxfLine[0]<='Z') {                if(dxfLine=="EOF") {                    // End of file reached                    //                }                // ------                // Layer:                // ------                else if(dxfLine=="LAYER") {                    currentLayer=0;                    do {                        dxfCode=getBufLine();                        if(dxfCode)                            code=dxfCode.toInt();                        if(dxfCode && code!=0) {                            dxfLine=getBufLine();                            if(dxfLine) {                                switch(code) {                                case  2:  // Layer name									if (dxfLine=="(null)" || dxfLine=="default") {										dxfLine = "0";									}                                    graphic->addLayer(new RS_Layer(dxfLine));                                    graphic->activateLayer(dxfLine);                                    currentLayer = graphic->getActiveLayer();                                    lastLayer=dxfLine;                                    break;                                case 70:  // Visibility                                    /*                                    if(dxfLine.toInt()&5) {                                      if(currentLayerNum>=0 && currentLayerNum<DEF_MAXLAYERS) {                                        graphic->layer[currentLayerNum].DelFlag(Y_VISIBLE);                                      }                                }                                    */                                    break;                                case  6:  // style

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -