siren2 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.travis.yml +5 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE +21 -0
  6. data/README.md +36 -0
  7. data/Rakefile +18 -0
  8. data/bin/console +14 -0
  9. data/bin/setup +8 -0
  10. data/ext/siren2/extconf.rb +66 -0
  11. data/ext/siren2/inc/bndbox.h +51 -0
  12. data/ext/siren2/inc/bo.h +20 -0
  13. data/ext/siren2/inc/brep.h +17 -0
  14. data/ext/siren2/inc/common.h +98 -0
  15. data/ext/siren2/inc/curve.h +65 -0
  16. data/ext/siren2/inc/curve/bscurve.h +22 -0
  17. data/ext/siren2/inc/curve/bzcurve.h +17 -0
  18. data/ext/siren2/inc/curve/circle.h +29 -0
  19. data/ext/siren2/inc/curve/ellipse.h +15 -0
  20. data/ext/siren2/inc/curve/hyperbola.h +15 -0
  21. data/ext/siren2/inc/curve/line.h +17 -0
  22. data/ext/siren2/inc/curve/offsetcurve.h +15 -0
  23. data/ext/siren2/inc/curve/parabola.h +15 -0
  24. data/ext/siren2/inc/filler.h +26 -0
  25. data/ext/siren2/inc/heal.h +19 -0
  26. data/ext/siren2/inc/io/iges.h +19 -0
  27. data/ext/siren2/inc/io/step.h +18 -0
  28. data/ext/siren2/inc/io/stl.h +13 -0
  29. data/ext/siren2/inc/offset.h +35 -0
  30. data/ext/siren2/inc/shape.h +140 -0
  31. data/ext/siren2/inc/shape/chunk.h +26 -0
  32. data/ext/siren2/inc/shape/compound.h +22 -0
  33. data/ext/siren2/inc/shape/edge.h +50 -0
  34. data/ext/siren2/inc/shape/face.h +67 -0
  35. data/ext/siren2/inc/shape/shell.h +21 -0
  36. data/ext/siren2/inc/shape/solid.h +41 -0
  37. data/ext/siren2/inc/shape/vertex.h +23 -0
  38. data/ext/siren2/inc/shape/wire.h +31 -0
  39. data/ext/siren2/inc/siren.h +39 -0
  40. data/ext/siren2/inc/surface/dummy +0 -0
  41. data/ext/siren2/inc/topalgo.h +52 -0
  42. data/ext/siren2/inc/trans.h +48 -0
  43. data/ext/siren2/inc/vec.h +65 -0
  44. data/ext/siren2/src/bndbox.cpp +343 -0
  45. data/ext/siren2/src/bo.cpp +66 -0
  46. data/ext/siren2/src/brep.cpp +69 -0
  47. data/ext/siren2/src/common.cpp +18 -0
  48. data/ext/siren2/src/curve.cpp +75 -0
  49. data/ext/siren2/src/curve/bscurve.cpp +118 -0
  50. data/ext/siren2/src/curve/bzcurve.cpp +55 -0
  51. data/ext/siren2/src/curve/circle.cpp +146 -0
  52. data/ext/siren2/src/curve/ellipse.cpp +17 -0
  53. data/ext/siren2/src/curve/hyperbola.cpp +17 -0
  54. data/ext/siren2/src/curve/line.cpp +24 -0
  55. data/ext/siren2/src/curve/offsetcurve.cpp +17 -0
  56. data/ext/siren2/src/curve/parabola.cpp +17 -0
  57. data/ext/siren2/src/filler.cpp +191 -0
  58. data/ext/siren2/src/heal.cpp +92 -0
  59. data/ext/siren2/src/io/iges.cpp +85 -0
  60. data/ext/siren2/src/io/step.cpp +47 -0
  61. data/ext/siren2/src/io/stl.cpp +22 -0
  62. data/ext/siren2/src/offset.cpp +256 -0
  63. data/ext/siren2/src/shape.cpp +617 -0
  64. data/ext/siren2/src/shape/chunk.cpp +65 -0
  65. data/ext/siren2/src/shape/compound.cpp +96 -0
  66. data/ext/siren2/src/shape/edge.cpp +254 -0
  67. data/ext/siren2/src/shape/face.cpp +366 -0
  68. data/ext/siren2/src/shape/shell.cpp +41 -0
  69. data/ext/siren2/src/shape/solid.cpp +256 -0
  70. data/ext/siren2/src/shape/vertex.cpp +68 -0
  71. data/ext/siren2/src/shape/wire.cpp +100 -0
  72. data/ext/siren2/src/siren.cpp +80 -0
  73. data/ext/siren2/src/surface/dummy +0 -0
  74. data/ext/siren2/src/topalgo.cpp +246 -0
  75. data/ext/siren2/src/trans.cpp +330 -0
  76. data/ext/siren2/src/vec.cpp +454 -0
  77. data/lib/io/dxf.rb +68 -0
  78. data/lib/io/plot.rb +38 -0
  79. data/lib/io/ply.rb +57 -0
  80. data/lib/io/stl.rb +35 -0
  81. data/lib/io/svg.rb +44 -0
  82. data/lib/kernel/array.rb +133 -0
  83. data/lib/kernel/float.rb +15 -0
  84. data/lib/shape.rb +157 -0
  85. data/lib/shape/compound.rb +11 -0
  86. data/lib/shape/edge.rb +15 -0
  87. data/lib/shape/face.rb +7 -0
  88. data/lib/shape/shell.rb +21 -0
  89. data/lib/shape/solid.rb +10 -0
  90. data/lib/shape/vertex.rb +7 -0
  91. data/lib/shape/wire.rb +14 -0
  92. data/lib/shapes.rb +52 -0
  93. data/lib/siren.rb +166 -0
  94. data/lib/siren2/version.rb +3 -0
  95. data/lib/vec.rb +81 -0
  96. data/siren2.gemspec +28 -0
  97. metadata +195 -0
@@ -0,0 +1,22 @@
1
+ #ifndef _SHAPE_COMPOUND_H_
2
+ #define _SHAPE_COMPOUND_H_
3
+
4
+ #include "siren.h"
5
+
6
+ #include <TopoDS.hxx>
7
+ #include <TopoDS_Compound.hxx>
8
+ #include <BRep_Builder.hxx>
9
+
10
+ extern VALUE sr_cCompound;
11
+
12
+ static rb_data_type_t siren_compound_type = { "Compound", siren_shape_final };
13
+ bool siren_compound_install();
14
+ TopoDS_Compound siren_compound_get(VALUE self);
15
+ bool siren_compound_p(const VALUE&);
16
+ void siren_compound_check(const VALUE&);
17
+ VALUE siren_compound_new( const TopoDS_Shape* src);
18
+ VALUE siren_compound_init(int, VALUE*, VALUE);
19
+ VALUE siren_compound_push(int, VALUE*, VALUE);
20
+ VALUE siren_compound_delete(int, VALUE*, VALUE);
21
+
22
+ #endif
@@ -0,0 +1,50 @@
1
+ #ifndef _SHAPE_EDGE_H_
2
+ #define _SHAPE_EDGE_H_
3
+
4
+ #include "siren.h"
5
+ #include "curve.h"
6
+ #include "shape.h"
7
+
8
+ #include <TopoDS.hxx>
9
+ #include <TopoDS_Edge.hxx>
10
+ #include <TopoDS_Wire.hxx>
11
+
12
+ #include <TopExp_Explorer.hxx>
13
+ #include <BRepAdaptor_Curve.hxx>
14
+
15
+ // to_pts
16
+ #include <BRepAdaptor_Curve.hxx>
17
+ #include <GCPnts_UniformDeflection.hxx>
18
+
19
+ // param
20
+ #include <ShapeAnalysis_Curve.hxx>
21
+ #include <BRepAdaptor_Curve.hxx>
22
+
23
+ #include <BRepExtrema_ExtCC.hxx>
24
+
25
+ extern VALUE sr_cEdge;
26
+
27
+ static rb_data_type_t siren_edge_type = { "Edge", siren_shape_final };
28
+ bool siren_edge_install();
29
+ TopoDS_Edge siren_edge_get(VALUE self);
30
+ bool siren_edge_p(const VALUE&);
31
+ void siren_edge_check(const VALUE&);
32
+ VALUE siren_edge_new( const TopoDS_Shape* src);
33
+
34
+ VALUE siren_edge_init(int, VALUE*, VALUE);
35
+ VALUE siren_edge_sp(int, VALUE*, VALUE);
36
+ VALUE siren_edge_tp(int, VALUE*, VALUE);
37
+ VALUE siren_edge_to_pts(int, VALUE*, VALUE);
38
+ VALUE siren_edge_param(int, VALUE*, VALUE);
39
+ VALUE siren_edge_to_xyz(int, VALUE*, VALUE);
40
+ VALUE siren_edge_curvature(int, VALUE*, VALUE);
41
+ VALUE siren_edge_tangent(int, VALUE*, VALUE);
42
+
43
+ VALUE siren_edge_terms(int, VALUE*, VALUE);
44
+ VALUE siren_edge_curve(int, VALUE*, VALUE);
45
+
46
+ VALUE siren_edge_split(int, VALUE*, VALUE);
47
+ VALUE siren_edge_trim(int, VALUE*, VALUE);
48
+ VALUE siren_edge_extrema(int, VALUE*, VALUE);
49
+
50
+ #endif
@@ -0,0 +1,67 @@
1
+ #ifndef _SHAPE_FACE_H_
2
+ #define _SHAPE_FACE_H_
3
+
4
+ #include "siren.h"
5
+ #include "shape.h"
6
+ #include "vec.h"
7
+
8
+ #include <gp_Ax3.hxx>
9
+ #include <gp_Pln.hxx>
10
+
11
+ #include <TopoDS.hxx>
12
+ #include <TopoDS_Wire.hxx>
13
+ #include <TopoDS_Face.hxx>
14
+
15
+ #include <BRepTools.hxx>
16
+ #include <GeomLProp_SLProps.hxx>
17
+
18
+ #include <BRepBuilderAPI_MakeFace.hxx>
19
+ #include <BRepBuilderAPI_MakePolygon.hxx>
20
+
21
+ #include <Geom_BezierSurface.hxx>
22
+ #include <TColgp_Array2OfPnt.hxx>
23
+ #include <TColStd_Array2OfReal.hxx>
24
+
25
+ #include <Geom_BSplineSurface.hxx>
26
+ #include <ShapeFix_Shape.hxx>
27
+
28
+ // to_bezier
29
+ #include <TopoDS_Compound.hxx>
30
+ #include <BRep_Tool.hxx>
31
+ #include <Geom_Surface.hxx>
32
+ #include <Geom_BSplineSurface.hxx>
33
+ #include <Geom_BezierSurface.hxx>
34
+ #include <GeomConvert_BSplineSurfaceToBezierSurface.hxx>
35
+ #include <TColGeom_Array2OfBezierSurface.hxx>
36
+
37
+ // split
38
+ #include <BRepFeat_SplitShape.hxx>
39
+
40
+ // triangle
41
+ #include <BRepMesh_IncrementalMesh.hxx>
42
+ #include <Poly_Triangulation.hxx>
43
+ #include <Poly_Triangle.hxx>
44
+ #include <Poly_Array1OfTriangle.hxx>
45
+
46
+ extern VALUE sr_cFace;
47
+
48
+ static rb_data_type_t siren_face_type = { "Face", siren_shape_final };
49
+ bool siren_face_install();
50
+ TopoDS_Face siren_face_get(VALUE self);
51
+ bool siren_face_p(const VALUE&);
52
+ void siren_face_check(const VALUE&);
53
+ VALUE siren_face_new( const TopoDS_Shape* src);
54
+
55
+ VALUE siren_face_plane(int, VALUE*, VALUE);
56
+ VALUE siren_face_face(int, VALUE*, VALUE);
57
+ VALUE siren_face_infplane(int, VALUE*, VALUE);
58
+ VALUE siren_face_polygon(int, VALUE*, VALUE);
59
+ VALUE siren_face_bzsurf(int, VALUE*, VALUE);
60
+ VALUE siren_face_bssurf(int, VALUE*, VALUE);
61
+
62
+ VALUE siren_face_normal(int, VALUE*, VALUE);
63
+ VALUE siren_face_to_bezier(int, VALUE*, VALUE);
64
+ VALUE siren_face_split(int, VALUE*, VALUE);
65
+ VALUE siren_face_triangle(int, VALUE*, VALUE);
66
+
67
+ #endif
@@ -0,0 +1,21 @@
1
+ #ifndef _SHAPE_SHELL_H_
2
+ #define _SHAPE_SHELL_H_
3
+
4
+ #include "siren.h"
5
+
6
+ #include <TopoDS.hxx>
7
+ #include <TopoDS_Shell.hxx>
8
+ #include <BRepBuilderAPI_Sewing.hxx>
9
+
10
+ extern VALUE sr_cShell;
11
+
12
+ static rb_data_type_t siren_shell_type = { "Shell", siren_shape_final };
13
+ bool siren_shell_install();
14
+ TopoDS_Shell siren_shell_get(VALUE self);
15
+ bool siren_shell_p(const VALUE&);
16
+ void siren_shell_check(const VALUE&);
17
+ VALUE siren_shell_new( const TopoDS_Shape* src);
18
+
19
+ VALUE siren_shell_make(int, VALUE*, VALUE);
20
+
21
+ #endif
@@ -0,0 +1,41 @@
1
+ #ifndef _SHAPE_SOLID_H_
2
+ #define _SHAPE_SOLID_H_
3
+
4
+ #include "siren.h"
5
+
6
+ #include <TopoDS.hxx>
7
+ #include <TopoDS_Solid.hxx>
8
+
9
+ #include <BRepPrimAPI_MakeBox.hxx>
10
+ #include <BRepPrimAPI_MakeSphere.hxx>
11
+ #include <BRepPrimAPI_MakeCylinder.hxx>
12
+ #include <BRepPrimAPI_MakeCone.hxx>
13
+ #include <BRepPrimAPI_MakeTorus.hxx>
14
+ #include <BRepPrimAPI_MakeHalfSpace.hxx>
15
+ #include <BRepPrimAPI_MakeWedge.hxx>
16
+
17
+ extern VALUE sr_cSolid;
18
+
19
+ static rb_data_type_t siren_solid_type = { "Solid", siren_shape_final };
20
+ bool siren_solid_install();
21
+ TopoDS_Solid siren_solid_get(VALUE self);
22
+ bool siren_solid_p(const VALUE&);
23
+ void siren_solid_check(const VALUE&);
24
+ VALUE siren_solid_new( const TopoDS_Shape* src);
25
+
26
+ VALUE siren_solid_init(int, VALUE*, VALUE);
27
+
28
+ VALUE siren_solid_box (int, VALUE*, VALUE);
29
+ VALUE siren_solid_box2p (int, VALUE*, VALUE);
30
+ VALUE siren_solid_boxax (int, VALUE*, VALUE);
31
+ VALUE siren_solid_sphere (int, VALUE*, VALUE);
32
+ VALUE siren_solid_cylinder (int, VALUE*, VALUE);
33
+ VALUE siren_solid_cone (int, VALUE*, VALUE);
34
+ VALUE siren_solid_torus (int, VALUE*, VALUE);
35
+ VALUE siren_solid_halfspace (int, VALUE*, VALUE);
36
+ VALUE siren_solid_prism (int, VALUE*, VALUE);
37
+ VALUE siren_solid_revol (int, VALUE*, VALUE);
38
+ VALUE siren_solid_revolution (int, VALUE*, VALUE);
39
+ VALUE siren_solid_wedge (int, VALUE*, VALUE);
40
+
41
+ #endif
@@ -0,0 +1,23 @@
1
+ #ifndef _SHAPE_VERTEX_H_
2
+ #define _SHAPE_VERTEX_H_
3
+
4
+ #include "siren.h"
5
+
6
+ #include <TopoDS.hxx>
7
+ #include <TopoDS_Vertex.hxx>
8
+ #include <BRepBuilderAPI_MakeVertex.hxx>
9
+
10
+ extern VALUE sr_cVertex;
11
+
12
+ static rb_data_type_t siren_vertex_type = { "Vertex", siren_shape_final };
13
+ bool siren_vertex_install();
14
+ TopoDS_Vertex siren_vertex_get(VALUE self);
15
+ bool siren_vertex_p(const VALUE&);
16
+ void siren_vertex_check(const VALUE&);
17
+ VALUE siren_vertex_new( const TopoDS_Shape* src);
18
+
19
+ VALUE siren_vertex_init(int, VALUE*, VALUE);
20
+ VALUE siren_vertex_xyz(int, VALUE*, VALUE);
21
+ VALUE siren_vertex_to_v(int, VALUE*, VALUE);
22
+
23
+ #endif
@@ -0,0 +1,31 @@
1
+ #ifndef _SHAPE_WIRE_H_
2
+ #define _SHAPE_WIRE_H_
3
+
4
+ #include "siren.h"
5
+ #include "shape.h"
6
+ #include "topalgo.h"
7
+ #include "vec.h"
8
+
9
+ #include <TopoDS.hxx>
10
+ #include <TopoDS_Wire.hxx>
11
+ #include <TopoDS_Edge.hxx>
12
+
13
+ // #include <ShapeFix_Wire.hxx>
14
+ // #include <ShapeExtend_WireData.hxx>
15
+ #include <BRepBuilderAPI_MakeWire.hxx>
16
+ #include <ShapeFix_ShapeTolerance.hxx>
17
+ #include <BRepTools_WireExplorer.hxx>
18
+
19
+ extern VALUE sr_cWire;
20
+
21
+ static rb_data_type_t siren_wire_type = { "Wire", siren_shape_final };
22
+ bool siren_wire_install();
23
+ TopoDS_Wire siren_wire_get(VALUE self);
24
+ bool siren_wire_p(const VALUE&);
25
+ void siren_wire_check(const VALUE&);
26
+ VALUE siren_wire_new( const TopoDS_Shape* src);
27
+
28
+ VALUE siren_wire_make(int, VALUE*, VALUE);
29
+ VALUE siren_wire_ordered_edges(int, VALUE*, VALUE);
30
+
31
+ #endif
@@ -0,0 +1,39 @@
1
+ #ifndef _SR_H_
2
+ #define _SR_H_
3
+
4
+ // Configuration
5
+ #define SR_ENABLE_GPROP
6
+ #define SR_ENABLE_BO
7
+ #define SR_ENABLE_OFFSET
8
+ //#define SR_ENABLE_SHHEALING
9
+ #define SR_ENABLE_STL
10
+ #define SR_ENABLE_IGES
11
+ #define SR_ENABLE_STEP
12
+ //#define SR_ENABLE_CHUNK
13
+
14
+ // C++ standard library headers
15
+ #include <iostream>
16
+ #include <stdlib.h>
17
+
18
+ // placement new
19
+ #include <new>
20
+
21
+ // Ruby headers
22
+ #include "ruby.h"
23
+
24
+ // OpenCASCADE headers
25
+ #include <Standard.hxx>
26
+ #include <Standard_TypeDef.hxx>
27
+ #include <Standard_Macro.hxx>
28
+ #include <TopoDS.hxx>
29
+ #include <TopoDS_Shape.hxx>
30
+ #include <TopoDS_Compound.hxx>
31
+ #include <gp_Pnt.hxx>
32
+
33
+ using namespace opencascade;
34
+
35
+ extern VALUE sr_mSiren;
36
+
37
+ #include "common.h"
38
+
39
+ #endif
File without changes
@@ -0,0 +1,52 @@
1
+ #ifndef _topalgo_H_
2
+ #define _topalgo_H_
3
+
4
+ #include "siren.h"
5
+ #include "vec.h"
6
+ #include "shape.h"
7
+
8
+ #include <BRepBuilderAPI.hxx>
9
+ #include <BRepBuilderAPI_MakeEdge.hxx>
10
+ #include <BRepBuilderAPI_MakeWire.hxx>
11
+ #include <BRepBuilderAPI_MakeSolid.hxx>
12
+
13
+ #include <GeomAPI_Interpolate.hxx> // curve
14
+ #include <TColgp_Array1OfVec.hxx>
15
+ #include <TColgp_HArray1OfPnt.hxx>
16
+ #include <TColStd_HArray1OfBoolean.hxx>
17
+
18
+ #include <TopExp_Explorer.hxx>
19
+
20
+ // copy
21
+ #include <BRepBuilderAPI_Copy.hxx>
22
+
23
+ // NURBS curve
24
+ #include <TColStd_Array1OfReal.hxx>
25
+ #include <TColStd_Array1OfInteger.hxx>
26
+ #include <Geom_BSplineCurve.hxx>
27
+
28
+ #include <GProp_GProps.hxx>
29
+ #include <BRepGProp.hxx>
30
+
31
+ #include <gp_Circ.hxx>
32
+ #include <GC_MakeArcOfCircle.hxx>
33
+ #include <GC_MakeCircle.hxx>
34
+
35
+ bool siren_topalgo_install();
36
+
37
+ VALUE siren_topalgo_copy(int, VALUE*, VALUE);
38
+
39
+ VALUE siren_topalgo_line (int, VALUE*, VALUE);
40
+ VALUE siren_topalgo_infline (int, VALUE*, VALUE);
41
+ VALUE siren_topalgo_polyline (int, VALUE*, VALUE);
42
+ VALUE siren_topalgo_interpolate(int, VALUE*, VALUE);
43
+ VALUE siren_topalgo_arc (int, VALUE*, VALUE);
44
+ VALUE siren_topalgo_arc3p (int, VALUE*, VALUE);
45
+ VALUE siren_topalgo_circle (int, VALUE*, VALUE);
46
+ VALUE siren_topalgo_circle3p (int, VALUE*, VALUE);
47
+
48
+ VALUE siren_topalgo_volume(int, VALUE*, VALUE);
49
+ VALUE siren_topalgo_cog(int, VALUE*, VALUE);
50
+ VALUE siren_topalgo_area(int, VALUE*, VALUE);
51
+
52
+ #endif
@@ -0,0 +1,48 @@
1
+ #ifndef _TRANS_H_
2
+ #define _TRANS_H_
3
+
4
+ #include "common.h"
5
+ #include "siren.h"
6
+ #include "vec.h"
7
+
8
+ #include <gp_Ax1.hxx>
9
+ #include <gp_Ax2.hxx>
10
+ #include <gp_Ax3.hxx>
11
+ #include <gp_Trsf.hxx>
12
+
13
+ extern VALUE sr_cTrans;
14
+
15
+ bool siren_trans_install();
16
+ void siren_trans_final( void* p);
17
+ static rb_data_type_t siren_trans_type = { "Trans", siren_trans_final };
18
+ gp_Trsf* siren_trans_get( VALUE obj);
19
+ struct RClass* siren_trans_rclass();
20
+ VALUE siren_trans_new( const gp_Trsf& src);
21
+
22
+ VALUE siren_trans_init(int, VALUE*, VALUE);
23
+ VALUE siren_trans_to_s(int, VALUE*, VALUE);
24
+ VALUE siren_trans_to_a(int, VALUE*, VALUE);
25
+ VALUE siren_trans_matrix(int, VALUE*, VALUE);
26
+ VALUE siren_trans_set_matrix(int, VALUE*, VALUE);
27
+ VALUE siren_trans_multiply(int, VALUE*, VALUE);
28
+ VALUE siren_trans_multiply_bang(int, VALUE*, VALUE);
29
+ VALUE siren_trans_power(int, VALUE*, VALUE);
30
+ VALUE siren_trans_power_bang(int, VALUE*, VALUE);
31
+ VALUE siren_trans_invert(int, VALUE*, VALUE);
32
+ VALUE siren_trans_invert_bang(int, VALUE*, VALUE);
33
+ VALUE siren_trans_is_negative(int, VALUE*, VALUE);
34
+ VALUE siren_trans_translate_bang(int, VALUE*, VALUE);
35
+ VALUE siren_trans_translatef(int, VALUE*, VALUE);
36
+ VALUE siren_trans_set_translatef(int, VALUE*, VALUE);
37
+ VALUE siren_trans_mirror(int, VALUE*, VALUE);
38
+ VALUE siren_trans_mirror_bang(int, VALUE*, VALUE);
39
+ VALUE siren_trans_rotate_bang(int, VALUE*, VALUE);
40
+ //VALUE siren_trans_rotatef(int, VALUE*, VALUE);
41
+ //VALUE siren_trans_set_rotatef(int, VALUE*, VALUE);
42
+ VALUE siren_trans_scale_bang(int, VALUE*, VALUE);
43
+ VALUE siren_trans_scalef(int, VALUE*, VALUE);
44
+ VALUE siren_trans_set_scalef(int, VALUE*, VALUE);
45
+ VALUE siren_trans_transform_bang(int, VALUE*, VALUE);
46
+ VALUE siren_trans_move_point(int, VALUE*, VALUE);
47
+
48
+ #endif
@@ -0,0 +1,65 @@
1
+ #ifndef _VEC_H_
2
+ #define _VEC_H_
3
+
4
+ #include "siren.h"
5
+
6
+ extern VALUE sr_cVec;
7
+
8
+ bool siren_vec_install();
9
+ void siren_vec_final(void* p);
10
+ static rb_data_type_t siren_vec_type = { "Siren::Vec", siren_vec_final };
11
+ gp_Vec* siren_vec_get(VALUE obj);
12
+ struct RClass* siren_vec_rclass();
13
+ VALUE siren_vec_new(double x, double y, double z);
14
+ VALUE siren_vec_new(const gp_Vec& vec);
15
+
16
+ VALUE siren_vec_init(int, VALUE*, VALUE);
17
+ VALUE siren_vec_x(int, VALUE*, VALUE);
18
+ VALUE siren_vec_x_set(int, VALUE*, VALUE);
19
+ VALUE siren_vec_y(int, VALUE*, VALUE);
20
+ VALUE siren_vec_y_set(int, VALUE*, VALUE);
21
+ VALUE siren_vec_z(int, VALUE*, VALUE);
22
+ VALUE siren_vec_z_set(int, VALUE*, VALUE);
23
+
24
+ VALUE siren_vec_is_equal(int, VALUE*, VALUE);
25
+ VALUE siren_vec_is_normal(int, VALUE*, VALUE);
26
+ VALUE siren_vec_is_reverse(int, VALUE*, VALUE);
27
+ VALUE siren_vec_is_parallel(int, VALUE*, VALUE);
28
+ VALUE siren_vec_angle(int, VALUE*, VALUE);
29
+ VALUE siren_vec_angleref(int, VALUE*, VALUE);
30
+ VALUE siren_vec_magnitude(int, VALUE*, VALUE);
31
+ VALUE siren_vec_square_mag(int, VALUE*, VALUE);
32
+ VALUE siren_vec_cross(int, VALUE*, VALUE);
33
+ VALUE siren_vec_cross_bang(int, VALUE*, VALUE);
34
+ VALUE siren_vec_cross_mag(int, VALUE*, VALUE);
35
+ VALUE siren_vec_cross_square_mag(int, VALUE*, VALUE);
36
+ VALUE siren_vec_cross_cross(int, VALUE*, VALUE);
37
+ VALUE siren_vec_cross_cross_bang(int, VALUE*, VALUE);
38
+ VALUE siren_vec_dot(int, VALUE*, VALUE);
39
+ VALUE siren_vec_dot_cross(int, VALUE*, VALUE);
40
+ VALUE siren_vec_normal(int, VALUE*, VALUE);
41
+ VALUE siren_vec_normal_bang(int, VALUE*, VALUE);
42
+ VALUE siren_vec_reverse(int, VALUE*, VALUE);
43
+ VALUE siren_vec_reverse_bang(int, VALUE*, VALUE);
44
+
45
+ // VALUE siren_vec_coord(int, VALUE*, VALUE);
46
+ // VALUE siren_vec_coord_set(int, VALUE*, VALUE);
47
+
48
+ VALUE siren_vec_mirror(int argc, VALUE* argv, VALUE self);
49
+ VALUE siren_vec_mirror_bang(int, VALUE*, VALUE);
50
+ VALUE siren_vec_rotate(int, VALUE*, VALUE);
51
+ VALUE siren_vec_rotate_bang(int, VALUE*, VALUE);
52
+ VALUE siren_vec_scale(int, VALUE*, VALUE);
53
+ VALUE siren_vec_scale_bang(int, VALUE*, VALUE);
54
+ VALUE siren_vec_transform(int, VALUE*, VALUE);
55
+ VALUE siren_vec_transform_bang(int, VALUE*, VALUE);
56
+
57
+ VALUE siren_vec_negative(int, VALUE*, VALUE);
58
+
59
+ VALUE siren_vec_eq(int, VALUE*, VALUE);
60
+ VALUE siren_vec_plus(int, VALUE*, VALUE);
61
+ VALUE siren_vec_minus(int, VALUE*, VALUE);
62
+ VALUE siren_vec_multiply_scalar(int, VALUE*, VALUE);
63
+ VALUE siren_vec_devide_scalar(int, VALUE*, VALUE);
64
+
65
+ #endif