pythonCascade Sample Problems
Geometry: Parabola
P =
gp_Pnt2d(2,3)
D =
gp_Dir2d(4,5)
A =
gp_Ax22d(P,D,1)
Para =
gp_Parab2d(A,6)
# P is the
vertex point
# P and D
give the axis of symmetry
# 6 is the
focal length of the parabola
self.DisplayPoint(P,"P",1,0.5,0,3)
aDirection =
ISession_Direction(P,D,200)
self.myISessionContext.Display(aDirection,1)
aParabola = GCE2d_MakeParabola(Para)
gParabola =
aParabola.Value()
aTrimmedCurve
= Geom2d_TrimmedCurve(gParabola,-100,100,1);
self.DisplayCurve(aTrimmedCurve,4,1)
print "
The entity A of type gp_Ax22d is not displayable \n "
print " The entity D of type gp_Dir2d is displayed as a vector \n ( mean with a length != 1 ) \n "