OCC.Core.GCE2d module¶
GCE2d module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_gce2d.html
-
class
GCE2d_MakeArcOfCircle
(*args)¶ Bases:
OCC.Core.GCE2d.GCE2d_Root
- Makes an arc of circle (TrimmedCurve from Geom2d) from a circle between two parameters Alpha1 and Alpha2. The two parameters are angles. The parameters are in radians.
- param Circ
- type Circ
gp_Circ2d
- param Alpha1
- type Alpha1
float
- param Alpha2
- type Alpha2
float
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None* Makes an arc of circle (TrimmedCurve from Geom2d) from a circle between point <P> and the parameter Alpha. Alpha is given in radians.
- param Circ
- type Circ
gp_Circ2d
- param P
- type P
gp_Pnt2d
- param Alpha
- type Alpha
float
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None* Makes an arc of circle (TrimmedCurve from Geom2d) from a circle between two points P1 and P2.
- param Circ
- type Circ
gp_Circ2d
- param P1
- type P1
gp_Pnt2d
- param P2
- type P2
gp_Pnt2d
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None* Makes an arc of circle (TrimmedCurve from Geom2d) from three points P1,P2,P3 between two points P1 and P3, and passing through the point P2.
- param P1
- type P1
gp_Pnt2d
- param P2
- type P2
gp_Pnt2d
- param P3
- type P3
gp_Pnt2d
- rtype
None* Makes an arc of circle (TrimmedCurve from Geom2d) from two points P1,P2 and the tangente to the solution at the point P1.
- param P1
- type P1
gp_Pnt2d
- param V
- type V
gp_Vec2d
- param P2
- type P2
gp_Pnt2d
- rtype
None
-
Value
()¶ - Returns the constructed arc of circle. Exceptions StdFail_NotDone if no arc of circle is constructed.
- rtype
opencascade::handle<Geom2d_TrimmedCurve>
-
property
thisown
¶ The membership flag
-
class
GCE2d_MakeArcOfEllipse
(*args)¶ Bases:
OCC.Core.GCE2d.GCE2d_Root
- Make an arc of Ellipse (TrimmedCurve from Geom2d) from a Ellipse between two parameters Alpha1 and Alpha2.
- param Elips
- type Elips
gp_Elips2d
- param Alpha1
- type Alpha1
float
- param Alpha2
- type Alpha2
float
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None* Make an arc of Ellipse (TrimmedCurve from Geom2d) from a Ellipse between point <P> and the parameter Alpha.
- param Elips
- type Elips
gp_Elips2d
- param P
- type P
gp_Pnt2d
- param Alpha
- type Alpha
float
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None* Make an arc of Ellipse (TrimmedCurve from Geom2d) from a Ellipse between two points P1 and P2. Please, note: The orientation of the arc is: - the trigonometric sense if Sense is not defined or is true (default value), or - the opposite sense if Sense is false. - Alpha1, Alpha2 and Alpha are angle values, given in radians. - IsDone always returns true.
- param Elips
- type Elips
gp_Elips2d
- param P1
- type P1
gp_Pnt2d
- param P2
- type P2
gp_Pnt2d
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None
-
Value
()¶ - Returns the constructed arc of ellipse.
- rtype
opencascade::handle<Geom2d_TrimmedCurve>
-
property
thisown
¶ The membership flag
-
class
GCE2d_MakeArcOfHyperbola
(*args)¶ Bases:
OCC.Core.GCE2d.GCE2d_Root
- Makes an arc of Hyperbola (TrimmedCurve from Geom2d) from a Hyperbola between two parameters Alpha1 and Alpha2.
- param Hypr
- type Hypr
gp_Hypr2d
- param Alpha1
- type Alpha1
float
- param Alpha2
- type Alpha2
float
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None* Makes an arc of Hyperbola (TrimmedCurve from Geom2d) from a Hyperbola between point <P> and the parameter Alpha.
- param Hypr
- type Hypr
gp_Hypr2d
- param P
- type P
gp_Pnt2d
- param Alpha
- type Alpha
float
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None* Makes an arc of Hyperbola (TrimmedCurve from Geom2d) from a Hyperbola between two points P1 and P2. Note: the orientation of the arc of hyperbola is: - the trigonometric sense if Sense is not defined or is true (default value), or - the opposite sense if Sense is false. - IsDone always returns true.
- param Hypr
- type Hypr
gp_Hypr2d
- param P1
- type P1
gp_Pnt2d
- param P2
- type P2
gp_Pnt2d
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None
-
Value
()¶ - Returns the constructed arc of hyperbola.
- rtype
opencascade::handle<Geom2d_TrimmedCurve>
-
property
thisown
¶ The membership flag
-
class
GCE2d_MakeArcOfParabola
(*args)¶ Bases:
OCC.Core.GCE2d.GCE2d_Root
- Make an arc of Parabola (TrimmedCurve from Geom2d) from a Parabola between two parameters Alpha1 and Alpha2.
- param Parab
- type Parab
gp_Parab2d
- param Alpha1
- type Alpha1
float
- param Alpha2
- type Alpha2
float
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None* Make an arc of Parabola (TrimmedCurve from Geom2d) from a Parabola between point <P> and the parameter Alpha.
- param Parab
- type Parab
gp_Parab2d
- param P
- type P
gp_Pnt2d
- param Alpha
- type Alpha
float
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None* Make an arc of Parabola (TrimmedCurve from Geom2d) from a Parabola between two points P1 and P2. Please, note: the orientation of the arc of parabola is: - the trigonometric sense if Sense is not defined or is true (default value), or - the opposite sense if Sense is false. - IsDone always returns true.
- param Parab
- type Parab
gp_Parab2d
- param P1
- type P1
gp_Pnt2d
- param P2
- type P2
gp_Pnt2d
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None
-
Value
()¶ - Returns the constructed arc of parabola.
- rtype
opencascade::handle<Geom2d_TrimmedCurve>
-
property
thisown
¶ The membership flag
-
class
GCE2d_MakeCircle
(*args)¶ Bases:
OCC.Core.GCE2d.GCE2d_Root
- creates a circle from a non persistent one.
- param C
- type C
gp_Circ2d
- rtype
None* A is the ‘XAxis’ of the circle which defines the origin of parametrization. It is not forbidden to create a circle with Radius = 0.0 The status is ‘NegativeRadius’ if Radius < 0.
- param A
- type A
gp_Ax2d
- param Radius
- type Radius
float
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None* A is the local coordinate system of the circle which defines the origin of parametrization. It is not forbidden to create a circle with Radius = 0.0 The status is ‘NegativeRadius’ if Radius < 0.
- param A
- type A
gp_Ax22d
- param Radius
- type Radius
float
- rtype
None* Make a Circle from Geom2d <TheCirc> parallel to another Circ <Circ> with a distance <Dist>. If Dist is greater than zero the result is enclosing the circle <Circ>, else the result is enclosed by the circle <Circ>.
- param Circ
- type Circ
gp_Circ2d
- param Dist
- type Dist
float
- rtype
None* Make a Circle from Geom2d <TheCirc> parallel to another Circ <Circ> and passing through a Pnt <Point>.
- param Circ
- type Circ
gp_Circ2d
- param Point
- type Point
gp_Pnt2d
- rtype
None* Make a Circ from gp <TheCirc> passing through 3 Pnt2d <P1>,<P2>,<P3>.
- param P1
- type P1
gp_Pnt2d
- param P2
- type P2
gp_Pnt2d
- param P3
- type P3
gp_Pnt2d
- rtype
None* Make a Circ from geom2d <TheCirc> by its center an radius.
- param P
- type P
gp_Pnt2d
- param Radius
- type Radius
float
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None* Makes a Circle from geom2d <TheCirc> with its center <Center> and a point giving the radius. If Sense is true the local coordinate system of the solution is direct and non direct in the other case. Warning The MakeCircle class does not prevent the construction of a circle with a null radius. If an error occurs (that is, when IsDone returns false), the Status function returns: - gce_NegativeRadius if Radius is less than 0.0, or - gce_IntersectionError if points P1, P2 and P3 are collinear and the three are not coincident.
- param Center
- type Center
gp_Pnt2d
- param Point
- type Point
gp_Pnt2d
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None
-
Value
()¶ - Returns the constructed circle. Exceptions StdFail_NotDone if no circle is constructed.
- rtype
opencascade::handle<Geom2d_Circle>
-
property
thisown
¶ The membership flag
-
class
GCE2d_MakeEllipse
(*args)¶ Bases:
OCC.Core.GCE2d.GCE2d_Root
- Creates an ellipse from a non persistent one from package gp
- param E
- type E
gp_Elips2d
- rtype
None* MajorAxis is the local coordinate system of the ellipse. It is the ‘XAxis’. The minor axis is the YAxis of the ellipse. Sense give the sense of parametrization of the Ellipse. It is not forbidden to create an ellipse with MajorRadius = MinorRadius. The status is ‘InvertRadius’ if MajorRadius < MinorRadius or ‘NegativeRadius’ if MinorRadius < 0.
- param MajorAxis
- type MajorAxis
gp_Ax2d
- param MajorRadius
- type MajorRadius
float
- param MinorRadius
- type MinorRadius
float
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None* Axis is the local coordinate system of the ellipse. It is not forbidden to create an ellipse with MajorRadius = MinorRadius. The status is ‘InvertRadius’ if MajorRadius < MinorRadius or ‘NegativeRadius’ if MinorRadius < 0.
- param Axis
- type Axis
gp_Ax22d
- param MajorRadius
- type MajorRadius
float
- param MinorRadius
- type MinorRadius
float
- rtype
None* Make an Ellipse centered on the point Center, where - the major axis of the ellipse is defined by Center and S1, - its major radius is the distance between Center and S1, and - its minor radius is the distance between S2 and the major axis. The implicit orientation of the ellipse is: - the sense defined by Axis or E, - the sense defined by points Center, S1 and S2, - the trigonometric sense if Sense is not given or is true, or - the opposite sense if Sense is false.
- param S1
- type S1
gp_Pnt2d
- param S2
- type S2
gp_Pnt2d
- param Center
- type Center
gp_Pnt2d
- rtype
None
-
Value
()¶ - Returns the constructed ellipse. Exceptions StdFail_NotDone if no ellipse is constructed.
- rtype
opencascade::handle<Geom2d_Ellipse>
-
property
thisown
¶ The membership flag
-
class
GCE2d_MakeHyperbola
(*args)¶ Bases:
OCC.Core.GCE2d.GCE2d_Root
- Creates an Hyperbola from a non persistent one from package gp
- param H
- type H
gp_Hypr2d
- rtype
None* MajorAxis is the ‘XAxis’ of the hyperbola. The major radius of the hyperbola is on this ‘XAxis’ and the minor radius is on the ‘YAxis’ of the hyperbola. The status is ‘NegativeRadius’ if MajorRadius < 0.0 or if MinorRadius < 0.0
- param MajorAxis
- type MajorAxis
gp_Ax2d
- param MajorRadius
- type MajorRadius
float
- param MinorRadius
- type MinorRadius
float
- param Sense
- type Sense
bool
- rtype
None* Axis is the local coordinate system of the hyperbola. The major radius of the hyperbola is on this ‘XAxis’ and the minor radius is on the ‘YAxis’ of the hyperbola. The status is ‘NegativeRadius’ if MajorRadius < 0.0 or if MinorRadius < 0.0
- param Axis
- type Axis
gp_Ax22d
- param MajorRadius
- type MajorRadius
float
- param MinorRadius
- type MinorRadius
float
- rtype
None* Creates a hyperbol centered on the origin of the coordinate system Axis, with major and minor radii MajorRadius and MinorRadius, where the major axis is the ‘X Axis’ of Axis (Axis is the local coordinate system of the hyperbola). The implicit orientation of the ellipse is: - the sense defined by Axis or H, - the sense defined by points Center, S1 and S2, - the trigonometric sense if Sense is not given or is true, or - the opposite sense if Sense is false. Warning If an error occurs (that is, when IsDone returns false), the Status function returns: - gce_NegativeRadius if MajorRadius or MinorRadius is less than 0.0, or - gce_InvertAxis if the major radius defined by Center and S1 is less than the minor radius defined by Center, S1 and S2.Make an Hyperbola with its center and two apexes.
- param S1
- type S1
gp_Pnt2d
- param S2
- type S2
gp_Pnt2d
- param Center
- type Center
gp_Pnt2d
- rtype
None
-
Value
()¶ - Returns the constructed hyperbola. Exceptions: StdFail_NotDone if no hyperbola is constructed.
- rtype
opencascade::handle<Geom2d_Hyperbola>
-
property
thisown
¶ The membership flag
-
class
GCE2d_MakeLine
(*args)¶ Bases:
OCC.Core.GCE2d.GCE2d_Root
- Creates a line located in 2D space with the axis placement A. The Location of A is the origin of the line.
- param A
- type A
gp_Ax2d
- rtype
None* Creates a line from a non persistent line from package gp.
- param L
- type L
gp_Lin2d
- rtype
None* P is the origin and V is the direction of the line.
- param P
- type P
gp_Pnt2d
- param V
- type V
gp_Dir2d
- rtype
None* Make a Line from Geom2d <TheLin> parallel to another Lin <Lin> and passing through a Pnt <Point>.
- param Lin
- type Lin
gp_Lin2d
- param Point
- type Point
gp_Pnt2d
- rtype
None* Make a Line from Geom2d <TheLin> parallel to another Lin <Lin> at a distance <Dist>.
- param Lin
- type Lin
gp_Lin2d
- param Dist
- type Dist
float
- rtype
None* Make a Line from Geom2d <TheLin> passing through 2 Pnt <P1>,<P2>. It returns false if <p1> and <P2> are confused. Warning If points P1 and P2 coincident (that is, when IsDone returns false), the Status function returns gce_ConfusedPoints.
- param P1
- type P1
gp_Pnt2d
- param P2
- type P2
gp_Pnt2d
- rtype
None
-
Value
()¶ - Returns the constructed line. Exceptions StdFail_NotDone if no line is constructed.
- rtype
opencascade::handle<Geom2d_Line>
-
property
thisown
¶ The membership flag
-
class
GCE2d_MakeMirror
(*args)¶ Bases:
object
- Parameters
Point –
- type Point
gp_Pnt2d
- rtype
None:param Axis:
- type Axis
gp_Ax2d
- rtype
None:param Line:
- type Line
gp_Lin2d
- rtype
None* Make a symetry transformation af axis defined by <Point> and <Direc>.
- param Point
- type Point
gp_Pnt2d
- param Direc
- type Direc
gp_Dir2d
- rtype
None
-
Value
()¶ - Returns the constructed transformation.
- rtype
opencascade::handle<Geom2d_Transformation>
-
property
thisown
¶ The membership flag
-
class
GCE2d_MakeParabola
(*args)¶ Bases:
OCC.Core.GCE2d.GCE2d_Root
- Creates a parabola from a non persistent one.
- param Prb
- type Prb
gp_Parab2d
- rtype
None* Creates a parabola with its local coordinate system and it’s focal length ‘Focal’. The ‘Location’ point of ‘Axis’ is the vertex of the parabola Status is ‘NegativeFocusLength’ if Focal < 0.0
- param Axis
- type Axis
gp_Ax22d
- param Focal
- type Focal
float
- rtype
None* Creates a parabola with its ‘MirrorAxis’ and it’s focal length ‘Focal’. MirrorAxis is the axis of symmetry of the curve, it is the ‘XAxis’. The ‘YAxis’ is parallel to the directrix of the parabola. The ‘Location’ point of ‘MirrorAxis’ is the vertex of the parabola Status is ‘NegativeFocusLength’ if Focal < 0.0
- param MirrorAxis
- type MirrorAxis
gp_Ax2d
- param Focal
- type Focal
float
- param Sense
- type Sense
bool
- rtype
None* D is the directrix of the parabola and F the focus point. The symmetry axis ‘XAxis’ of the parabola is normal to the directrix and pass through the focus point F, but its ‘Location’ point is the vertex of the parabola. The ‘YAxis’ of the parabola is parallel to D and its ‘Location’ point is the vertex of the parabola.
- param D
- type D
gp_Ax2d
- param F
- type F
gp_Pnt2d
- param Sense
default value is Standard_True
- type Sense
bool
- rtype
None* Make a parabola with focal point S1 and center O The branch of the parabola returned will have <S1> as focal point The implicit orientation of the parabola is: - the same one as the parabola Prb, - the sense defined by the coordinate system Axis or the directrix D, - the trigonometric sense if Sense is not given or is true, or - the opposite sense if Sense is false. Warning The MakeParabola class does not prevent the construction of a parabola with a null focal distance. If an error occurs (that is, when IsDone returns false), the Status function returns: - gce_NullFocusLength if Focal is less than 0.0, or - gce_NullAxis if points S1 and O are coincident.
- param S1
- type S1
gp_Pnt2d
- param O
- type O
gp_Pnt2d
- rtype
None
-
Value
()¶ - Returns the constructed parabola. Exceptions StdFail_NotDone if no parabola is constructed.
- rtype
opencascade::handle<Geom2d_Parabola>
-
property
thisown
¶ The membership flag
-
class
GCE2d_MakeRotation
(*args)¶ Bases:
object
- Constructs a rotation through angle Angle about the center Point.
- param Point
- type Point
gp_Pnt2d
- param Angle
- type Angle
float
- rtype
None
-
Value
()¶ - Returns the constructed transformation.
- rtype
opencascade::handle<Geom2d_Transformation>
-
property
thisown
¶ The membership flag
-
class
GCE2d_MakeScale
(*args)¶ Bases:
object
- Constructs a scaling transformation with - Point as the center of the transformation, and - Scale as the scale factor.
- param Point
- type Point
gp_Pnt2d
- param Scale
- type Scale
float
- rtype
None
-
Value
()¶ - Returns the constructed transformation.
- rtype
opencascade::handle<Geom2d_Transformation>
-
property
thisown
¶ The membership flag
-
class
GCE2d_MakeSegment
(*args)¶ Bases:
OCC.Core.GCE2d.GCE2d_Root
- Make a segment of Line from the 2 points <P1> and <P2>. Status is ‘ConfusedPoints’ if <P1> and <P2> are confused.
- param P1
- type P1
gp_Pnt2d
- param P2
- type P2
gp_Pnt2d
- rtype
None* Make a segment of Line from the point <P1> with the direction <P> and ended by the projection of <P2> on the line <P1,V>. Status is ‘ConfusedPoints’ if <P1> and <P2> are confused.
- param P1
- type P1
gp_Pnt2d
- param V
- type V
gp_Dir2d
- param P2
- type P2
gp_Pnt2d
- rtype
None* Make a segment of Line from the line <Line> between the two parameters U1 and U2. Status is ‘SameParamters’ if <U1> is equal <U2>.
- param Line
- type Line
gp_Lin2d
- param U1
- type U1
float
- param U2
- type U2
float
- rtype
None* Make a segment of Line from the line <Line> between the point <Point> and the parameter Ulast. It returns NullObject if <U1> is equal <U2>.
- param Line
- type Line
gp_Lin2d
- param Point
- type Point
gp_Pnt2d
- param Ulast
- type Ulast
float
- rtype
None* Make a segment of Line from the line <Line> between the two points <P1> and <P2>. It returns NullObject if <P1> and <P2> are confused. Warning If the points which limit the segment are coincident for given points or for the projection of given points on the line which supports the line segment (that is, when IsDone returns false), the Status function returns gce_ConfusedPoints. This warning only concerns the first two constructors.
- param Line
- type Line
gp_Lin2d
- param P1
- type P1
gp_Pnt2d
- param P2
- type P2
gp_Pnt2d
- rtype
None
-
Value
()¶ - Returns the constructed line segment. Exceptions StdFail_NotDone if no line segment is constructed.
- rtype
opencascade::handle<Geom2d_TrimmedCurve>
-
property
thisown
¶ The membership flag
-
class
GCE2d_MakeTranslation
(*args)¶ Bases:
object
- Constructs a translation along the vector Vect.
- param Vect
- type Vect
gp_Vec2d
- rtype
None* Constructs a translation along the vector (Point1,Point2) defined from the point Point1 to the point Point2.
- param Point1
- type Point1
gp_Pnt2d
- param Point2
- type Point2
gp_Pnt2d
- rtype
None
-
Value
()¶ - Returns the constructed transformation.
- rtype
opencascade::handle<Geom2d_Transformation>
-
property
thisown
¶ The membership flag
-
class
GCE2d_Root
¶ Bases:
object
-
IsDone
()¶ - Returns true if the construction is successful.
- rtype
bool
-
Status
()¶ - Returns the status of the construction - gce_Done, if the construction is successful, or - another value of the gce_ErrorType enumeration indicating why the construction failed.
- rtype
gce_ErrorType
-
property
thisown
¶ The membership flag
-