gp_Pnt2d P2(5.5,1);
gp_Pnt2d P3(-2,2);
- Handle(Geom2d_TrimmedCurve) C =
+ Handle(Geom2d_Curve) C =
GCE2d_MakeArcOfCircle (P1,P2,P3).Value();
Standard_Real FirstParameter = C->FirstParameter();
AddSeparator(aDoc,Message);
//--------------------------------------------------------------
- DisplayCurve(aDoc,Handle(Geom2d_Curve)::DownCast(C));
+ DisplayCurve(aDoc,C);
Handle(ISession_Direction) aDirection = new ISession_Direction(P,V);
aDoc->GetISessionContext()->Display(aDirection, Standard_False);
gp_Pnt N,Q,P(1,2,3);
Standard_Real distance, radius = 5;
- Handle(Geom_Circle) C = new Geom_Circle(gp::XOY(),radius);
+ Handle(Geom_Curve) C = new Geom_Circle(gp::XOY(),radius);
GeomAPI_ProjectPointOnCurve PPC (P,C);
N = PPC.NearestPoint();
Standard_Integer NbResults = PPC.NbPoints();
aString += Message2;
DisplayPoint(aDoc,N,aString.ToCString(),false,0.5,0,-0.5);
- DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(C),Quantity_NOC_YELLOW,false);
+ DisplayCurve(aDoc,C,Quantity_NOC_YELLOW,false);
if(NbResults>0)
{
DisplaySurface(aDoc,aSurface);
- Handle(Geom_Ellipse) anEllips = GC_MakeEllipse(EL).Value();
- DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(anEllips),Quantity_NOC_YELLOW,false);
+ Handle(Geom_Curve) anEllips = GC_MakeEllipse(EL).Value();
+ DisplayCurve(aDoc,anEllips,Quantity_NOC_YELLOW,false);
TCollection_AsciiString aString;
Message += aC2DEntityTypeName; Message += " \n";
DisplayCurve(aDoc,circ2d,4,false);
- DisplayCurve(aDoc,Handle(Geom_Curve)::DownCast(C3D),Quantity_NOC_YELLOW,false);
+ DisplayCurve(aDoc,C3D,Quantity_NOC_YELLOW,false);
DisplayCurve(aDoc,C2D,5,false);
Handle(ISession_Direction) aC3DCircleXAxisDirection = new ISession_Direction(C3DCircleXAxis.Location(),C3DCircleXAxis.Direction(),5.2);
array1.SetValue(4,gp_Pnt (-5,4,-7));
array1.SetValue(5,gp_Pnt (-3,5,-12));
- Handle(Geom_BSplineCurve) SPL1 =
+ Handle(Geom_Curve) SPL1 =
GeomAPI_PointsToBSpline(array1).Curve();
GeomFill_Pipe aPipe(SPL1,1);
GC_MakeSegment(gp_Pnt(1,1,1),gp_Pnt(5,5,5));
Handle(Geom_TrimmedCurve) TC2 =
GC_MakeSegment(gp_Pnt(1,1,0),gp_Pnt(4,5,6));
- GeomFill_Pipe aPipe3(Handle(Geom_Curve)::DownCast(SPL1),TC1,TC2);
+ GeomFill_Pipe aPipe3(SPL1,TC1,TC2);
aPipe3.Perform();
Handle(Geom_Surface) aSurface3 = aPipe3.Surface();
Standard_CString aSurfaceEntityTypeName3="Not Computed";
GeomFill_BSplineCurves aGeomFill1(SPL1,SPL2,Type);
Handle(Geom_BSplineSurface) aGeomSurface = aGeomFill1.Surface();
- Handle(Geom_BSplineSurface) aTranslatedGeomSurface =
- Handle(Geom_BSplineSurface)::DownCast(aGeomSurface->Copy());
+ Handle(Geom_BoundedSurface) aTranslatedGeomSurface =
+ Handle(Geom_BoundedSurface)::DownCast(aGeomSurface->Copy());
Standard_Real extension = 3;
Standard_Integer continuity = 2;
GeomFill_BSplineCurves aGeomFill1(SPL1,SPL2,Type); \n\
Handle(Geom_BSplineSurface) aGeomSurface = aGeomFill1.Surface(); \n\
\n\
-Handle(Geom_BSplineSurface) aTranslatedGeomSurface = \n\
- Handle(Geom_BSplineSurface)::DownCast(aGeomSurface->Copy()); \n\
+Handle(Geom_BoundedSurface) aTranslatedGeomSurface = \n\
+ Handle(Geom_BoundedSurface)::DownCast(aGeomSurface->Copy()); \n\
\n\
Standard_Real extension = 3; \n\
Standard_Integer continuity = 2; \n\
//////////////////////////////////////////////////////////////////////
-ISession_Curve::ISession_Curve(Handle(Geom_Curve)& aCurve)
+ISession_Curve::ISession_Curve(const Handle(Geom_Curve)& aCurve)
:AIS_InteractiveObject(),myCurve(aCurve)
{
class ISession_Curve : public AIS_InteractiveObject
{
public:
- ISession_Curve(Handle(Geom_Curve)& aCurve);
+ ISession_Curve(const Handle(Geom_Curve)& aCurve);
virtual ~ISession_Curve();
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
-ISession_Surface::ISession_Surface(Handle(Geom_Surface)& aSurface)
+ISession_Surface::ISession_Surface(const Handle(Geom_Surface)& aSurface)
:AIS_InteractiveObject(),mySurface(aSurface)
{
}
{
public:
ISession_Surface();
- ISession_Surface(Handle(Geom_Surface)& aSurface);
+ ISession_Surface(const Handle(Geom_Surface)& aSurface);
virtual ~ISession_Surface();
DEFINE_STANDARD_RTTIEXT(ISession_Surface,AIS_InteractiveObject)
Sleep(1000);
// Get the TOcafFunction_CutDriver using its Standard_GUID in the TFunction_DriverTable
- Handle(TOcafFunction_CutDriver) myCutDriver;
+ Handle(TFunction_Driver) myCutDriver;
if (TFunction_DriverTable::Get()->FindDriver(myDriverID, myCutDriver))
myCutDriver->Init(LabObject);
TSC.ModifyBox(m_x, m_y, m_z, m_w, m_l, m_h, Name); \n\
\n\
// Getting the TOcafFunction_CutDriver used to create the cut\n\
-Handle(TOcafFunction_CutDriver) myCutDriver; \n\
+Handle(TFunction_Driver) myCutDriver; \n\
TFunction_DriverTable::Get()->FindDriver(myDriverID, myCutDriver); \n\
\n\
// Recompute the cut if it must be (if an attribute was modified)\n\
// Initialize and execute the box driver (look at the "Execute()" code)
Handle(TFunction_Logbook) log = TFunction_Logbook::Set(L);
- Handle(TOcafFunction_BoxDriver) myBoxDriver;
+ Handle(TFunction_Driver) myBoxDriver;
// Find the TOcafFunction_BoxDriver in the TFunction_DriverTable using its GUID
if(!TFunction_DriverTable::Get()->FindDriver(TOcafFunction_BoxDriver::GetID(), myBoxDriver)) return L;
// Initialize and execute the cylinder driver (look at the "Execute()" code)
Handle(TFunction_Logbook) log = TFunction_Logbook::Set(L);
- Handle(TOcafFunction_CylDriver) myCylDriver;
+ Handle(TFunction_Driver) myCylDriver;
// Find the TOcafFunction_CylDriver in the TFunction_DriverTable using its GUID
if(!TFunction_DriverTable::Get()->FindDriver(TOcafFunction_CylDriver::GetID(), myCylDriver)) return L;
// Get the TFunction_FunctionDriver GUID used with the TFunction_Function
Standard_GUID myDriverID=TFF->GetDriverGUID();
- Handle(TOcafFunction_BoxDriver) myBoxDriver;
+ Handle(TFunction_Driver) myBoxDriver;
// Find the TOcafFunction_BoxDriver in the TFunction_DriverTable using its GUID
TFunction_DriverTable::Get()->FindDriver(myDriverID, myBoxDriver);
// Execute the cut if it must be (if an attribute changes)
// Get the TFunction_FunctionDriver GUID used with the TFunction_Function
Standard_GUID myDriverID=TFF->GetDriverGUID();
- Handle(TOcafFunction_CylDriver) myCylDriver;
+ Handle(TFunction_Driver) myCylDriver;
// Find the TOcafFunction_CylDriver in the TFunction_DriverTable using its GUID
TFunction_DriverTable::Get()->FindDriver(myDriverID, myCylDriver);
// Execute the cut if it must be (if an attribute changes)
// Initialize and execute the cut driver (look at the "Execute()" code)
Handle(TFunction_Logbook) log = TFunction_Logbook::Set(L);
- Handle(TOcafFunction_CutDriver) myCutDriver;
+ Handle(TFunction_Driver) myCutDriver;
// Find the TOcafFunction_CutDriver in the TFunction_DriverTable using its GUID
if(!TFunction_DriverTable::Get()->FindDriver(TOcafFunction_CutDriver::GetID(), myCutDriver)) return L;
if (WAIT_A_LITTLE) return;
- Handle(Geom_BSplineCurve) aBSpline = GeomConvert::CurveToBSplineCurve(theCurve);
+ Handle(Geom_Curve) aBSpline = GeomConvert::CurveToBSplineCurve(theCurve);
- drawCurve (Handle(Geom_Curve)::DownCast(aBSpline), BSplineColor);
+ drawCurve (aBSpline, BSplineColor);
}
aPoles(3) = gp_Pnt(350, 150, 0); aWeights(3) =120;
aPoles(4) = gp_Pnt(500, 500, 0); aWeights(4) = 1;
- Handle(Geom_BezierCurve) aBezierCurve = new Geom_BezierCurve(aPoles, aWeights);
- drawCurve(Handle(Geom_Curve)::DownCast(aBezierCurve));
+ Handle(Geom_Curve) aBezierCurve = new Geom_BezierCurve(aPoles, aWeights);
+ drawCurve(aBezierCurve);
// creating a surface of revolution of the bezier curve around Y axis
gp_Ax1 anAx(gp_Pnt(0,0,0), gp_Dir(0,1,0));
if(bisector == -1) return;
if(bisector > theNumberOfBisectors) return;
- Handle(Geom2d_Curve) thebisector = Handle(Geom2d_Curve)::DownCast(GeomBis(bisector).Value());
+ Handle(Geom2d_Curve) thebisector = GeomBis(bisector).Value();
MAT2d_DrawCurve(thebisector,3);
myVerticesIt.Initialize(myVertices);
if ( MoreLoop() ) cout<<"--- PaveSet : Prepare"<<endl;
for (; MoreLoop(); NextLoop() ) {
- const Handle(TopOpeBRepBuild_Pave)& PV =
- *((Handle(TopOpeBRepBuild_Pave)*)&(Loop()));
+ Handle(TopOpeBRepBuild_Pave) PV =
+ Handle(TopOpeBRepBuild_Pave)::DownCast(Loop());
const TopoDS_Vertex& v = TopoDS::Vertex(PV->Vertex());
Standard_Real p = PV->Parameter();
Standard_Boolean b = PV->IsShape();