2 * Project Info: http://jcae.sourceforge.net
4 * This program is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License as published by the Free
6 * Software Foundation; either version 2.1 of the License, or (at your option)
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18 * (C) Copyright 2007, by EADS France
21 %{ #include <ShapeFix_Wireframe.hxx> %}
22 %{ #include <ShapeFix_Root.hxx> %}
23 %{ #include <ShapeBuild_ReShape.hxx> %}
29 %rename(setPrecision) SetPrecision;
30 %rename(getPrecision) Precision;
31 %rename(setContext) SetContext;
32 void SetPrecision(const Standard_Real preci) ;
33 Standard_Real Precision() const;
34 void SetContext(const ShapeBuild_ReShape * context) ;
39 ShapeBuild_ReShape * getContext()
42 //Standard_Transient * p = self->Context();
43 Standard_Transient * p = self->This();
44 return dynamic_cast<ShapeBuild_ReShape *>(p);
48 class ShapeFix_Wireframe: public ShapeFix_Root
52 ShapeFix_Wireframe(const TopoDS_Shape& shape);
53 %rename(fixWireGaps) FixWireGaps;
54 %rename(fixSmallEdges) FixSmallEdges;
55 %rename(setLimitAngle) SetLimitAngle;
56 %rename(getLimitAngle) LimitAngle;
58 %javamethodmodifiers FixWireGaps() "
60 * Fixes gaps between ends of curves of adjacent edges (both 3d and pcurves)
61 * in wires. If precision is 0.0, uses Precision::Confusion().
64 Standard_Boolean FixWireGaps();
66 %javamethodmodifiers FixSmallEdges() "
68 * Fixes small edges in shape by merging adjacent edges.
69 * If precision is 0.0, uses Precision::Confusion().
72 Standard_Boolean FixSmallEdges() ;
74 %javamethodmodifiers SetLimitAngle(const Standard_Real theLimitAngle) "
76 * If two edges makes an angle greater this angle, these two edges
80 void SetLimitAngle(const Standard_Real theLimitAngle) ;
81 Standard_Real LimitAngle() const;
82 TopoDS_Shape Shape() ;
85 %extend ShapeFix_Wireframe
87 void setDropSmallEdges(bool b)
89 self->ModeDropSmallEdges()=b;
91 bool getDropSmallEdges()
93 return self->ModeDropSmallEdges()!=0;