Skip to content

Commit

Permalink
added shape-fix-wire support
Browse files Browse the repository at this point in the history
  • Loading branch information
awolven committed Aug 26, 2021
1 parent d660c8d commit d0232d6
Show file tree
Hide file tree
Showing 14 changed files with 5,429 additions and 276 deletions.
Binary file modified lib/windows/debug/oc.dll
Binary file not shown.
Binary file modified lib/windows/debug/oc.pdb
Binary file not shown.
2 changes: 2 additions & 0 deletions oc.asd
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@
(:file "src/cpnts/geom-adaptor-curve")
(:file "src/cpnts/cpnts-uniform-deflection")

(:file "src/shape-fix/shape-fix-wire")

(:file "src/xscontrol/xscontrol-reader")

(:file "src/bnd/bnd-box")
Expand Down
64 changes: 47 additions & 17 deletions src/brep-mesh/brep-mesh-incremental-mesh.lisp
Original file line number Diff line number Diff line change
@@ -1,27 +1,57 @@
(in-package :oc)

(defmethod initialize-instance :after ((obj brep-mesh-incremental-mesh) &rest initargs
&key S D (Relative nil Relative-present-p) Ang &allow-other-keys)
&key theShape theLinDeflection
(isRelative nil isRelative-present-p)
theAngDeflection (isInParallel nil isInParallel-present-p)
(adaptiveMin nil adaptiveMin-present-p)
&allow-other-keys)
(declare (ignore initargs))
(setf (ff-pointer obj)
(cond ((null S) (_wrap_new_BRepMesh_IncrementalMesh__SWIG_0))
((and (typep S 'topods-shape)
(typep D 'double-float)
(null Relative-present-p)
(null Ang))
(_wrap_new_BRepMesh_IncrementalMesh__SWIG_3 (ff-pointer S) D))
(cond ((null theShape) (_wrap_new_BRepMesh_IncrementalMesh__SWIG_0))

((and (typep S 'topods-shape)
(typep D 'double-float)
(null Ang)
Relative-present-p)
(_wrap_new_BRepMesh_IncrementalMesh__SWIG_2 (ff-pointer S) D Relative))
((and (typep theShape 'topods-shape)
(typep theLinDeflection 'double-float)
(null isRelative-present-p)
(null theAngDeflection)
(null isInParallel-present-p)
(null adaptiveMin-present-p))
(_wrap_new_BRepMesh_IncrementalMesh__SWIG_5 (ff-pointer theShape) theLinDeflection))

((and (typep S 'topods-shape)
(typep D 'double-float)
(typep Ang 'double-float)
relative-present-p)
(_wrap_new_BrepMesh_IncrementalMesh__SWIG_1 (ff-pointer S) D Relative Ang))
((and (typep theShape 'topods-shape)
(typep theLinDeflection 'double-float)
isRelative-present-p
(null theAngDeflection)
(null isInParallel-present-p)
(null adaptiveMin-present-p))
(_wrap_new_BRepMesh_IncrementalMesh__SWIG_4 (ff-pointer theShape) theLinDeflection isRelative))

((and (typep theShape 'topods-shape)
(typep theLinDeflection 'double-float)
isRelative-present-p
(typep theAngDeflection 'double-float)
(null isInParallel-present-p)
(null adaptiveMin-present-p))
(_wrap_new_BRepMesh_IncrementalMesh__SWIG_3
(ff-pointer theShape) theLinDeflection isRelative theAngDeflection))

((and (typep theShape 'topods-shape)
(typep theLinDeflection 'double-float)
isRelative-present-p
(typep theAngDeflection 'double-float)
isInParallel-present-p
(null adaptiveMin-present-p))
(_wrap_new_BRepMesh_IncrementalMesh__SWIG_2
(ff-pointer theShape) theLinDeflection isRelative theAngDeflection isInParallel))

((and (typep theShape 'topods-shape)
(typep theLinDeflection 'double-float)
isRelative-present-p
(typep theAngDeflection 'double-float)
isInParallel-present-p
adaptiveMin-present-p)
(_wrap_new_BRepMesh_IncrementalMesh__SWIG_1
(ff-pointer theShape) theLinDeflection isRelative theAngDeflection isInParallel adaptiveMin))

(t (error "Invalid arguments to initialize-instance of BRepMesh_IncrementalMesh."))))
(oc:finalize obj)
Expand Down
5 changes: 5 additions & 0 deletions src/classes.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@

;;

(defclass shape-fix-root () ())
(defclass shape-fix-wire (shape-fix-root ff-pointer-mixin) ())

;;

(defclass xscontrol-reader (ff-pointer-mixin) ())

;;
Expand Down
9 changes: 9 additions & 0 deletions src/collections/tcol.i
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ class TColgp_Array1OfPnt {
void Delete() {
self->~TColgp_Array1OfPnt();
}
void GetPoint(const Standard_Integer Index,
Standard_Real& x,
Standard_Real& y,
Standard_Real& z) {
gp_Pnt result = (self)->Value(Index);
x = result.X();
y = result.Y();
z = result.Z();
}
}
%{
#include <TColgp_Array2OfPnt.hxx>
Expand Down
3 changes: 3 additions & 0 deletions src/finalizations.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -554,3 +554,6 @@

(defmethod foreign-free-fn ((object top-tools-list-of-shape))
#'_wrap_TopTools_ListOfShape_Delete)

(defmethod foreign-free-fn ((object shape-fix-wire))
#'_wrap_ShapeFix_Wire_Delete)
7 changes: 4 additions & 3 deletions src/gc/gc-make-arc-of-circle.lisp
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
(in-package :oc)

(defmethod initialize-instance :after ((obj gc-make-arc-of-circle) &rest initargs
&key P1 P2 Circ Sense P3 &allow-other-keys)
&key P1 P2 Circ (Sense nil Sense-supplied-p)
P3 &allow-other-keys)
(declare (ignore initargs))
(assert (gp:pnt-p P1))
(assert (gp:pnt-p P2))
(setf (ff-pointer obj)
(cond ((and Circ Sense)
(cond ((and Circ Sense-supplied-p)
(assert (gp:circ-p Circ))
(assert (typep Sense 'boolean))
(_wrap_new_GC_MakeArcOfCircle__SWIG_1 Circ (ptr P1) (ptr P2) Sense))
(_wrap_new_GC_MakeArcOfCircle__SWIG_1 (ptr Circ) (ptr P1) (ptr P2) Sense))
(P3
(assert (gp:pnt-p P3))
(_wrap_new_GC_MakeArcOfCircle__SWIG_0 (ptr P1) (ptr P2) (ptr P3)))
Expand Down
10 changes: 8 additions & 2 deletions src/oc.i
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,16 @@ class BRepMesh_IncrementalMesh : public BRepMesh_DiscretRoot
{
public:
BRepMesh_IncrementalMesh();
BRepMesh_IncrementalMesh(const TopoDS_Shape& S,const Standard_Real D,
BRepMesh_IncrementalMesh(const TopoDS_Shape& theShape,
const Standard_Real theLinDeflection,
const Standard_Boolean isRelative = Standard_False,
const Standard_Real theAngDeflection = 0.5,
const Standard_Boolean isInParallel = Standard_False,
const Standard_Boolean adaptiveMin = Standard_False);
/* BRepMesh_IncrementalMesh(const TopoDS_Shape& S,const Standard_Real D,
const Standard_Boolean Relatif = Standard_False,
const Standard_Real Ang = 0.5);
*/
void Perform();
// void Update(const TopoDS_Shape& S) ;
Standard_Boolean IsModified() const;
Expand Down
Loading

0 comments on commit d0232d6

Please sign in to comment.