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

📄 qbrep_constr.h

📁 算断裂的
💻 H
字号:
// ------------------------------------------------------------------// qbrep_constr.h//// This file contains the definition of the class Brep_Under_Construction, and its// nested classes.  This is a brep that is being built on the fly.// Matlab version.// ------------------------------------------------------------------// Author: Stephen A. Vavasis// Copyright (c) 1999 by Cornell University.  All rights reserved.// // See the accompanying file 'Copyright' for authorship information,// the terms of the license governing this software, and disclaimers// concerning this software.// ------------------------------------------------------------------// This file is part of the QMG software.  // Version 2.0 of QMG, release date September 3, 1999.// ------------------------------------------------------------------#ifndef QBREP_CONSTR_H#define QBREP_CONSTR_H#include "qbrep.h"// ------------------------------------------------------------------// Class QMG::Brep_Under_Construction// A Brep_Under_Construction is a C++ wrapper around the internal C data // structure to represent geometries.  This class is for constructing// breps; it allows the caller to insert faces, patches, etc.class QMG::Brep_Under_Construction : public QMG::Brep {private:    mxArray* control_points_a_;public:  // Constructor takes the two dimensional parameters  Brep_Under_Construction(int intrinsic_dim, int embedded_dim);    //-----------------------------------------------------------------  // class QMG::Brep_Under_Construction::Propval_inserter  // Creates a data structure for inserting brep prop vals.  // Usage:   // Propval_inserter pvi(g);  //  pvi.insert_prop_val(prop, val); etc  class Propval_inserter;  friend class Propval_inserter;  class Propval_inserter {  private:    Brep_Under_Construction& brep_;    // no copying, no assignment    Propval_inserter(const Propval_inserter& o) : brep_(o.brep_) { }    void operator=(const Propval_inserter&) { }    int maxsize_;  public:    explicit Propval_inserter(Brep_Under_Construction& brep);     int insert_propval(const string& prop, const string& val);     ~Propval_inserter() { }  };  //-----------------------------------------------------------------  // class QMG::Brep_Under_Construction::Control_point_inserter  // Creates a data structure for inserting control points.  // Usage:   // Control_point_inserter cpi(g);  //  cpi.insert_control_point(coord1); cpi.insert_control_point(coord2) etc  class Control_point_inserter;  friend class Control_point_inserter;  class Control_point_inserter {  private:    Brep_Under_Construction& brep_;    int maxsize_;    // no copying, no assignment    Control_point_inserter(const Control_point_inserter& o) : brep_(o.brep_) { }    void operator=(const Control_point_inserter&) { }  public:    explicit Control_point_inserter(Brep_Under_Construction& brep);     int insert_control_point(const vector<Real>& coord);     ~Control_point_inserter() { }  };  class Top_face_inserter;  friend class Top_face_inserter;  class Top_face_bound_inserter;  friend class Top_face_bound_inserter;  class Top_face_ib_inserter;  friend class Top_face_ib_inserter;  class Top_face_patch_inserter;  friend class Top_face_patch_inserter;  class Top_face_propval_inserter;  friend class Top_face_propval_inserter;  //-----------------------------------------------------------------  // class QMG::Brep_Under_Construction::Top_face_inserter  // Creates a structure for inserting topological faces (entities).  // Usage:  // Top_face_inserter tfi(g, dim);  //   tfi.insert_face(facename1); tfi.insert_face(facename2); ...  class Top_face_inserter {  private:    Brep_Under_Construction& brep_;    int maxsize_;    int dim_;    // no assignment    void operator=(const Top_face_inserter&) { }  public:    Top_face_inserter(Brep_Under_Construction& brep, int dim);    Face_Spec insert_top_face(const string& name);    ~Top_face_inserter() { }  };  //-----------------------------------------------------------------  // class QMG::Brep_Under_Construction::Top_face_bound_inserter  // Creates a structure for inserting bounding faces (entities).  // into a topological face  // Usage:  // Top_face_bound_inserter tfbi(g, fspec);  //   tfbi.insert_boundary(subfspec1, ori1); tfbi.insert_boundary(subfspec2,ori2);  // where the orientation is either 0 (positive). 1 (negative), 2 (not specified)  class Top_face_bound_inserter {  private:    Brep_Under_Construction& brep_;    mxArray* childlist1_;    vector<Face_Rec1>& childlist_;    int maxsize_;    Brep::Face_Spec fspec_;    // no copying, no assignment    Top_face_bound_inserter(const Top_face_bound_inserter& o) : brep_(o.brep_), childlist_(o.childlist_) { }    void operator=(const Top_face_bound_inserter&) { }  public:    Top_face_bound_inserter(Brep_Under_Construction& brep, const Brep::Face_Spec& fspec);    void insert_boundary(const Brep::Face_Spec& subfspec, int orientation);    ~Top_face_bound_inserter() { }  };  //-----------------------------------------------------------------  // class QMG::Brep_Under_Construction::Top_face_ib_inserter  // Creates a structure for inserting internal boundary faces (entities).  // into a topological face.  Internal boundaries are 2 or more dimensions  // lower than the face itself.  (For internal boundaries of dimension 1  // less, e.g. cracks, insert the subface twice as a bounding face.)  // Usage:  // Top_face_ib_inserter tfii(g, fspec);  //   tfii.insert_ib(subfspec1); tfii.insert_ib(subfspec2);  // where the orientation is either 0 (positive). 1 (negative), 2 (not specified)  class Top_face_ib_inserter {  private:    Brep_Under_Construction& brep_;    mxArray* childlist1_;    mxArray* iblist1_;    vector<Face_Rec1>& childlist_;    vector<Face_Spec>& iblist_;    int maxsize1_;    int maxsize2_;    Brep::Face_Spec fspec_;    //no copying, no assignment    Top_face_ib_inserter(const Top_face_ib_inserter& o):       brep_(o.brep_), childlist_(o.childlist_), iblist_(o.iblist_) { }    void operator=(const Top_face_ib_inserter&) { }  public:    Top_face_ib_inserter(Brep_Under_Construction& brep, const Brep::Face_Spec& fspec);    void insert_ib(const Brep::Face_Spec& subfspec);    ~Top_face_ib_inserter() { }  };  //-----------------------------------------------------------------  // class QMG::Brep_Under_Construction::Top_face_patch_inserter  // Creates a structure for inserting patches (curves, cntrl pts) into.  // into a topological faces.  I  // Usage:  // Top_face_patch_inserter tfpi(g, fspec);  //   tfpi.insert_patch(degree1, degree2, ptype, control_pts);  class Top_face_patch_inserter {  private:    Brep_Under_Construction& brep_;    Face_Spec fspec_;    mxArray* patchlist_;    int maxsize_;    //no copying, no assignment    Top_face_patch_inserter(const Top_face_patch_inserter& o): brep_(o.brep_) { }    void operator=(const Top_face_patch_inserter&) { }  public:    Top_face_patch_inserter(Brep_Under_Construction& brep, const Brep::Face_Spec& fspec);    void insert_patch(int degree1,       int degree2,      PatchType ptype,      const vector<Brep::ControlPointIndex>&  control_points);    ~Top_face_patch_inserter() { }  };  //-----------------------------------------------------------------  // class QMG::Brep_Under_Construction::Top_face_propval_inserter  // Creates a structure for inserting property-value pairs into.  // into a topological faces.  I  // Usage:  // Top_face_propval_inserter tfpvi(g, fspec);  //   tfpvi.insert_propval(prop,val);  class Top_face_propval_inserter {  private:    Brep_Under_Construction& brep_;    mxArray* pvlist_;    int cursize_;    int maxsize_;    //no copying, no assignment    Top_face_propval_inserter(const Top_face_propval_inserter& o): brep_(o.brep_) { }    void operator=(const Top_face_propval_inserter&) { }  public:    Top_face_propval_inserter(Brep_Under_Construction& brep, const Brep::Face_Spec& fspec);    void insert_propval(const string& prop, const string& val);     ~Top_face_propval_inserter();  };    static Brep_Under_Construction read_from_istream(istream& istr,     bool code_already_read,    int& line_count); // see brepstream.cpp  // Copying and destruction works kind of like an auto_ptr.  // Copying transfers the data.  // Release returns the data as a C pointer.    mxArray* release();  // Destructive copy & destructive copy using standard  // helper class.private:  class Brep_Under_Construction_Returnval {  private:    friend class Brep_Under_Construction;    Brep_Under_Construction& bref_;    Brep_Under_Construction_Returnval(Brep_Under_Construction& s, int) :      bref_(s) { }  };public:  Brep_Under_Construction(Brep_Under_Construction& other);  Brep_Under_Construction(const Brep_Under_Construction_Returnval& sucr);  operator Brep_Under_Construction_Returnval() {    return Brep_Under_Construction_Returnval(*this, 0);  }  virtual ~Brep_Under_Construction();};#endif

⌨️ 快捷键说明

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