AnyCAD C++ API  2018
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
APIBrepTools.h
浏览该文件的文档.
1 //Public API. Powered by AnyCAD.
2 
3 #ifndef _APIBrepTools_H_
4 #define _APIBrepTools_H_
5 
6 #include "APIObjectDef.h"
7 
8 namespace AnyCAD{ namespace API
9 {
10  class TopoShape;
11  class TopoShapeGroup;
20  {
22  public:
28  TopoShape LoadFile (const Path& strFile) ;
35  bool SaveFile (const TopoShapeGroup& shapeGroup, const Path& strFileName) ;
42  bool SaveFile (const TopoShape& shape, const Path& strFileName) ;
48  TopoShape LoadBuffer (const CharBuffer& buffer) ;
54  CharBuffer SaveBuffer (const TopoShape& shape) ;
61  String ToJson (const TopoShapeGroup& meshGroup, Real precision) ;
67  TopoShape MakePoint (const Vector3& position) ;
74  TopoShape MakeLine (const Vector3& start, const Vector3& end) ;
82  TopoShape MakeCircle (const Vector3& center, double radius, const Vector3& dir) ;
91  TopoShape MakeEllipse (const Vector3& center, double majorRadius, double minorRadius, const Vector3& dir) ;
100  TopoShape MakeArc (const Vector3& start, const Vector3& end, const Vector3& center, const Vector3& dir) ;
110  TopoShape MakeArc (const Vector3& center, Real radius, Real startAngle, Real endAngle, const Vector3& dir) ;
118  TopoShape MakeArc3Pts (const Vector3& start, const Vector3& end, const Vector3& middle) ;
129  TopoShape MakeEllipseArc (const Vector3& center, Real majorRadius, Real minorRadius, Real startAngle, Real endAngle, const Vector3& dir) ;
135  TopoShape MakeSpline (const Vector3List& pts) ;
141  TopoShape MakeSpline (const TopoShapeGroup& edges) ;
150  TopoShape MakeSpiralCurve (Real radius, Real interval, Real count, const Coordinate3& coord) ;
156  TopoShape MakePolyline (const Vector3List& pts) ;
162  TopoShape MakePolygon (const Vector3List& pts) ;
169  TopoShape MakePolygon (const Vector3List& pts, Real radius) ;
178  TopoShape MakeRectangle (Real len, Real width, Real radius, const Coordinate3& coord) ;
187  TopoShape MakeFan (Real radius, Real startAngle, Real endAngle, const Coordinate3& coord) ;
195  TopoShape MakeFan (const Vector2& start, Real angle, const Coordinate3& coord) ;
201  TopoShape MakeMeshShell (const Vector3List& pts) ;
207  TopoShape MakeWire (const TopoShapeGroup& edges) ;
213  TopoShape MakeWire (const TopoShape& edge) ;
220  TopoShape MakeWire (const TopoShape& edge1, const TopoShape& edge2) ;
226  TopoShape MakeFace (const TopoShape& wire) ;
233  TopoShape AddHole (const TopoShape& face, const TopoShape& hole) ;
244  TopoShape MakePlaneFace (const Vector3& origion, const Vector3& dir, Real minU, Real maxU, Real minV, Real maxV) ;
252  TopoShape MakeSurfaceFromPoints (const Vector3List& arrPoints, int m, int n) ;
258  TopoShape FillFace (const Vector3List& polygon) ;
264  TopoShape MakeShell (const TopoShapeGroup& faces) ;
270  TopoShape MakeSolid (const TopoShapeGroup& faceShells) ;
276  TopoShape MakeCompound (const TopoShapeGroup& shapes) ;
283  TopoShape MakeCompound (const TopoShape& shape1, const TopoShape& shape2) ;
290  TopoShape MakeSphere (const Vector3& center, double radius) ;
298  TopoShape MakeBox (const Vector3& start, const Vector3& dir, const Vector3& size) ;
307  TopoShape MakeBox (const Vector3& start, const Vector3& end, double width, double height) ;
317  TopoShape MakeCylinder (const Vector3& center, const Vector3& dir, double radius, double height, double degree) ;
328  TopoShape MakeCone (const Vector3& center, const Vector3& dir, double radius, double height, double radiusTop, double degree) ;
338  TopoShape MakeTube (const Vector3& center, const Vector3& dir, double radius, double thickness, double len) ;
345  TopoShape MakeHalfSpace (const TopoShape& face, const Vector3& refPoint) ;
352  TopoShape BooleanAdd (const TopoShape& pShapeA, const TopoShape& pShapeB) ;
359  TopoShape BooleanCut (const TopoShape& pShapeA, const TopoShape& pShapeB) ;
366  TopoShape BooleanCommon (const TopoShape& pShapeA, const TopoShape& pShapeB) ;
373  TopoShape MakeSplit (const TopoShape& pShape, const TopoShape& splitter) ;
380  TopoShape MakeSplit (const TopoShape& pShape, const TopoShapeGroup& splitters) ;
388  TopoShape BodySection (const TopoShape& pBody, const Vector3& pos, const Vector3& dir) ;
395  TopoShape SurfaceSection (const TopoShape& pSurfA, const TopoShape& pSurfB) ;
403  TopoShape Extrude (const TopoShape& pShape, double height, const Vector3& dir) ;
412  TopoShape Revol (const TopoShape& pShape, const Vector3& position, const Vector3& dir, double degree) ;
419  TopoShape Fillet (const TopoShape& pShape, double radius) ;
427  TopoShape MakeFillet (const TopoShape& shape, const IntList& edgeIdx, const FloatList& radius) ;
435  TopoShape Chamfer (const TopoShape& pShape, double dis1, double dis2) ;
444  TopoShape MakeChamfer (const TopoShape& shape, const IntList& edgeIdx, const FloatList& dis1, const FloatList& dis2) ;
451  TopoShape MakeLoft (const TopoShapeGroup& shapes, bool bSolid) ;
459  TopoShape MakeLoft (const TopoShape& wire1, const TopoShape& wire2, bool bSolid) ;
467  TopoShape Sweep (const TopoShape& section, const TopoShape& path, bool bSolid) ;
475  TopoShape MakePipe (const TopoShape& section, const TopoShape& path, int mode) ;
483  TopoShape MakePipe (const TopoShapeGroup& sections, const TopoShape& path, int mode) ;
491  TopoShape MakeThicken (const TopoShape& shell, Real offset, int jointType) ;
500  TopoShape MakeOffsetWire (const TopoShape& shape, Real offset, int jointType, bool openning) ;
508  TopoShape MakeOffsetShape (const TopoShape& shape, Real offset, int jointType) ;
517  TopoShape ProjectOnPlane (const TopoShape& shape, const Vector3& planePosition, const Vector3& planeDir, const Vector3& projDir) ;
524  TopoShape ProjectOnSurface (const TopoShape& curve, const TopoShape& surface) ;
532  TopoShape MakeMirror (const TopoShape& pShape, const Vector3& startPt, const Vector3& endPt) ;
539  TopoShape Translate (const TopoShape& pShape, const Vector3& vec) ;
547  TopoShape Scale (const TopoShape& pShape, const Vector3& center, double scale) ;
555  TopoShape Rotation (const TopoShape& pShape, const Vector3& dir, double degree) ;
564  TopoShape Rotation (const TopoShape& pShape, const Vector3& axisPos, const Vector3& axisDir, double degree) ;
571  TopoShape Transform (const TopoShape& pShape, const Matrix4& trf) ;
578  TopoShape Transform (const TopoShape& pShape, const Coordinate3& coord) ;
589  TopoShape MakeRoad (const Vector3& start, const Vector3& end, double width, double height, double heightMiddle, bool bSolid) ;
597  TopoShape MakeDish (Real radius, Real height, const Vector3& position) ;
603  static TopoShape ConnectEdges (const TopoShapeGroup& edges) ;
604  };//BrepTools;
605 }}//API
606 
607 #endif //_APIBrepTools_H_
#define AnyPlatformAPI_API
Definition: AnyPlatformAPI.h:8
Matrix4.
Definition: APIMath.h:248
std::string String
Definition: APIString.h:10
Coordinate.
Definition: APIMath.h:416
Point or vector.
Definition: APIMath.h:16
Point of vector list.
Definition: APIMath.h:131
std::vector< char > CharBuffer
Definition: APIString.h:14
拓扑对象
Definition: APITopoShape.h:18
TODO:
Definition: APIPath.h:16
#define DECLARE_APIOBJECT(className)
Definition: APIObjectDef.h:10
Point or vector.
Definition: APIMath.h:37
std::vector< float > FloatList
Definition: APIString.h:15
拓扑对象组
Definition: APITopoShapeGroup.h:18
造型工具集
Definition: APIBrepTools.h:19
std::vector< int > IntList
Definition: APIString.h:16
double Real
Definition: APIMath.h:7