2013/4/12 Vin Yovanovich <fracta...@hotmail.com>

> For the case from opencasade
>
> GC_MakeArcOfCircle (const gp_Circ &Circ, const gp_Pnt &P1, const gp_Pnt &P2,
> const Standard_Boolean Sense)
>
>
> I cannot figure out what to use for the last argument.
>
> In pythonOCC:  GC_MakeArcOfCircle(circ3d,pnt2,pnt3, ?)
>
>
>   Whatever I use, I get a wrong type error.
>
> File "d:\Python26\lib\site-packages\OCC\GC.py", line 272, in __init__
>     _GC.GC_MakeArcOfCircle_swiginit(self,_GC.new_GC_MakeArcOfCircle(*args))
> TypeError: in method 'new_GC_MakeArcOfCircle', argument 4 of type
> 'Standard_Boolean'
>
> Thanks for your help in advance.
>

Hi Vin,

It's not clear to me what exactly is this 'Sense' parameter. Looking at the
C++ constructor code, I see:

//=======================================================================
//function : GC_MakeArcOfCircle
//purpose  :
//=======================================================================
GC_MakeArcOfCircle::GC_MakeArcOfCircle(const gp_Circ& Circ   ,
       const gp_Pnt&  P1     ,
       const gp_Pnt&  P2     ,
       const Standard_Boolean  Sense  )
{
  Standard_Real Alpha1 = ElCLib::Parameter(Circ,P1);
  Standard_Real Alpha2 = ElCLib::Parameter(Circ,P2);
  Handle(Geom_Circle) C = new Geom_Circle(Circ);
  TheArc= new Geom_TrimmedCurve(C,Alpha1,Alpha2,Sense);
  TheError = gce_Done;
}


The Geom_TrimmedCurve Sense parameter is explained below (see
Geom_TrimmedCurve.hxx):

Standard_EXPORT   Geom_TrimmedCurve(const Handle(Geom_Curve)& C,const
Standard_Real U1,const Standard_Real U2,const Standard_Boolean Sense =
Standard_True);
//! Constructs a trimmed curve from the basis curve C <br>
//! which is limited between parameter values U1 and U2. <br>
//! Note: - U1 can be greater or less than U2; in both cases, <br>
//!   the returned curve is oriented from U1 to U2. <br>
//! - If the basis curve C is periodic, there is an <br>
//!   ambiguity because two parts are available. In this <br>
//!   case, the trimmed curve has the same orientation <br>
//!   as the basis curve if Sense is true (default value) <br>
//!   or the opposite orientation if Sense is false. <br>

HTH,

Thomas
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to