Changes for 0020673 - Implementation of "Auto-correct edges orientation".

This commit is contained in:
skl 2010-03-19 08:18:09 +00:00
parent f52f3839b7
commit 04da005e39
3 changed files with 18 additions and 9 deletions

View File

@ -37,7 +37,7 @@ rather complex cases.
\n <b>TUI Command:</b> <em>geompy.MakeFilling(Edges, MinDegree, MaxDegree, Tol2D, Tol3D, NbIter)</em>
\n <b>Arguments:</b> Name + 1 List of edges + 7 Parameters
(Min. degree, Max. degree, Number of iterations, 2D tolerance, 3D
tolerance, Number of iterations, Use orientation, Approximation).
tolerance, Number of iterations, Method, Approximation).
\image html filling.png

View File

@ -1508,9 +1508,12 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling
GEOM::TPythonDump pd (aFunction);
pd << aFilling << " = geompy.MakeFilling("
<< theShape << ", " << theMinDeg << ", " << theMaxDeg << ", "
<< theTol2D << ", " << theTol3D << ", " << theNbIter;
<< theTol2D << ", " << theTol3D << ", " << theNbIter << ", ";
if( theMethod==1 ) pd << "GEOM.FOM_UseOri";
else if( theMethod==2 ) pd << "GEOM.FOM_AutoCorrect";
else pd << "GEOM.FOM_Default";
if(isApprox)
pd << ", " << isApprox;
pd << ", " << isApprox ;
pd << ")";
SetErrorCode(OK);

View File

@ -1322,7 +1322,14 @@ class geompyDC(GEOM._objref_GEOM_Gen):
# @param theTol2D a 2d tolerance to be reached
# @param theTol3D a 3d tolerance to be reached
# @param theNbIter a number of iteration of approximation algorithm
# @param isUseOri flag for take into account orientation of edges
# @param theMethod Kind of method to perform filling operation:
# 0 - Default - standard behaviour
# 1 - Use edges orientation - orientation of edges are
# used: if edge is reversed curve from this edge
# is reversed before using in filling algorithm.
# 2 - Auto-correct orientation - change orientation
# of curves using minimization of sum of distances
# between ends points of edges.
# @param isApprox if True, BSpline curves are generated in the process
# of surface construction. By default it is False, that means
# the surface is created using Besier curves. The usage of
@ -1332,13 +1339,12 @@ class geompyDC(GEOM._objref_GEOM_Gen):
#
# @ref tui_creation_filling "Example"
def MakeFilling(self, theShape, theMinDeg, theMaxDeg, theTol2D,
theTol3D, theNbIter, isUseOri=0, isApprox=0):
theTol3D, theNbIter, theMethod=GEOM.FOM_Default, isApprox=0):
# Example: see GEOM_TestAll.py
theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg,
theTol2D, theTol3D, theNbIter)
theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg,
theTol2D, theTol3D, theNbIter,
isUseOri, isApprox)
theMethod, isApprox)
RaiseIfFailed("MakeFilling", self.PrimOp)
anObj.SetParameters(Parameters)
return anObj