Skip to content

NemAll_Python_Geometry

Exposed classes and functions from NemAll_Python_Geometry

AddToMinMax overloaded

AddToMinMax(minMax: MinMax2D, point: Point2D)

Calculate 2D-Min- and Max Point of an 2D point

Calculates the MinMax2D volume by the Point2D given in parameter point.

Parameters:

  • minMax (MinMax2D) –

    where to ad min max box

  • point (Point2D) –

    Point2D to be added

AddToMinMax(minMax: MinMax2D, point: Point3D)

Calculate 2D-Min- and Max Point of an 3D point

Calculates the MinMax2D volume by the Point3D given in parameter point.

Parameters:

  • minMax (MinMax2D) –

    where to ad min max box

  • point (Point3D) –

    Point3D to be added

AddToMinMax(minMax: MinMax3D, point: Point3D)

Calculate 3D-Min- and Max Point of an 3D point

Calculates the MinMax3D volume by the Point3D given in parameter point.

Parameters:

  • minMax (MinMax3D) –

    where to ad min max box

  • point (Point3D) –

    Point3D to be added

AddToMinMax(minMax: MinMax3D, point: Point2D)

Calculate 3D-Min- and Max Point of an 2D point

Calculates the MinMax3D volume by the Point2D given in parameter point.

Parameters:

  • minMax (MinMax3D) –

    where to ad min max box

  • point (Point2D) –

    Point2D to be added

CalcAngle overloaded

CalcAngle(l1: Line2D) -> tuple

compute angle of 2D line and x axis

Parameters:

Returns:

  • tuple

    result angle (normalized 2pi),

  • tuple

    NO_ERR, INVALID_LINE (lines is degenerated)

CalcAngle(point1: Point2D, point2: Point2D) -> Angle

compute angle of 2D points

Parameters:

Returns:

  • Angle

    result angle (normalized 2pi)

CalcArea overloaded

CalcArea(p1: Point2D, p2: Point2D, p3: Point2D) -> tuple

compute area of a triangle

Parameters:

Returns:

  • tuple

    area result area,

  • tuple

    POSITIVE_ORIENTATION, NEGATIVE_ORIENTATION

CalcArea(polygon: Polygon2D) -> tuple

Get the area of a 2D Polygon NEGATIVE_ORIENTATION for a CW orientated polygon, INVALID_POLYGON on error

If an instance denotes an incorrect polygon (e.g. not enough points), the method will return INVALID_POLYGON. us, one can distinguish between a collapsed polygon with area = 0.0 and a wrong shape. The polygon must not be self-intersecting. In case of self intersection the area result is currently defined and the return value indicates no error. interface: age

Parameters:

  • polygon (Polygon2D) –

    The polygon those area is requested

Returns:

  • tuple

    The area of the polygon,

  • tuple

    The eServiceResult of the operation, POSITIVE_ORIENTATION for a CCW orientated polygon,

  • tuple

    NEGATIVE_ORIENTATION for a CW orientated polygon, INVALID_POLYGON on error

CalcArea(polygon: Polygon3D) -> tuple

Get the area of a Polygon3D

Parameters:

Returns:

  • tuple

    area of the polygon,

  • tuple

    eServiceResult of the operation, POSITIVE_ORIENTATION or INVALID_POLYGON on error

CalcArea(polygonalArea: PolygonalArea3D) -> tuple

Get the area of a PolygonalArea

or INVALID_POLYGON on error e: berechnePolygonFlaeche

Returns:

  • tuple

    The area of the PolygonalArea,

  • tuple

    The eServiceResult of the operation, POSITIVE_ORIENTATION

  • tuple

    or INVALID_POLYGON on error

  • tuple

    Old interface: berechnePolygonFlaeche


CalcArea(
    areaGeo: ClosedArea2D,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
) -> tuple

Get the area of a 2D path bounded closed area NEGATIVE_ORIENTATION for a CW orientated area boundary, INVALID_POLYGON on error

Parameters:

  • areaGeo (ClosedArea2D) –

    The path bounded closed area those area is requested

  • arcSegmentation (int) –

    Number of segments the arc will be divided

  • useArcSegmentation (int) –

    type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)

  • armLength (float) –

    maximum length of a segment for polygonized arc

  • riseValue (float) –

    is the maximum distance from the actual arc and the polyline

Returns:

  • tuple

    The area of the given geometry,

  • tuple

    The eServiceResult of the operation, POSITIVE_ORIENTATION for a CCW orientated area boundary,

  • tuple

    NEGATIVE_ORIENTATION for a CW orientated area boundary, INVALID_POLYGON on error

CalcArea(
    areaGeo: ClosedAreaComposite2D,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
) -> tuple

Get the area of a 2D path bounded closed area composite NEGATIVE_ORIENTATION for a CW orientated area boundary, INVALID_POLYGON on error

Parameters:

  • areaGeo (ClosedAreaComposite2D) –

    The path bounded closed area composite those area is requested

  • arcSegmentation (int) –

    Number of segments the arc will be divided

  • useArcSegmentation (int) –

    type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)

  • armLength (float) –

    maximum length of a segment for polygonized arc

  • riseValue (float) –

    is the maximum distance from the actual arc and the polyline

Returns:

  • tuple

    The area of the given geometry,

  • tuple

    The eServiceResult of the operation, POSITIVE_ORIENTATION for a CCW orientated area boundary,

  • tuple

    NEGATIVE_ORIENTATION for a CW orientated area boundary, INVALID_POLYGON on error

CalcLength overloaded

CalcLength(el: Line2D) -> float

calculate length of a 2D line.

Parameters:

Returns:

  • float

    double result.

CalcLength(vec: Vector2D) -> float

calculate length of a 2D vector.

Parameters:

Returns:

  • float

    double result.

CalcLength(polyline: Polyline2D) -> float

Calculate the Length of a 2D Polyline.

Parameters:

Returns:

  • float

    Length of the given polyline.

CalcLength(polygon: Polygon2D) -> float

Calculate the Length of a 2D Polygon.

Result is length from all components, doesn't matter if it's solid or hole.

Parameters:

Returns:

  • float

    Length of the given polygon.

CalcLength(polygon: Polygon3D) -> float

Calculate the Length of a 3D Polygon.

Result is length from all components, doesn't matter if it's solid or hole.

Parameters:

Returns:

  • float

    Length of the given polygon.

CalcLength(arc: Arc2D) -> float

Calculate the Length of a 2D arc.

Parameters:

Returns:

  • float

    Length of the given arc.

CalcLength(clothoid: Clothoid2D) -> float

Calculate the Length of a 2D clothoid.

Parameters:

Returns:

  • float

    Length of the given clothoid.

CalcLength(spline: Spline2D) -> float

Calculate the Length of a 2D spline.

Parameters:

Returns:

  • float

    Length of the given spline.

CalcLength(path: Path2D) -> float

Calculate the Length of a Path 2D.

Parameters:

Returns:

  • float

    Length of the given Path2D

CalcLength(line: Line3D) -> float

calculate length of a 3D line.

Parameters:

Returns:

  • float

    double result.

CalcLength(vec: Vector3D) -> float

calculate length of a 3D vector.

Parameters:

Returns:

  • float

    double result.

CalcLength(polyline: Polyline3D) -> float

calculate length of a 3D polyline.

Parameters:

Returns:

  • float

    double result.

CalcLength(arc: Arc3D) -> float

calculate length of a 3D Arc.

Parameters:

  • arc (Arc3D) –

    3D arc.

Returns:

  • float

    double result.

CalcLength(path: Path3D) -> float

calculate length of a 3D path.

Parameters:

Returns:

  • float

    double result.

CalcLength(poly: Polyhedron3D) -> float

calculate length of a polyhedron of edge type.

Parameters:

Returns:

  • float

    double result.

CalcLength(spline: Spline3D) -> float

Calculate the Length of a 3D spline.

Parameters:

Returns:

  • float

    Length of the given spline.

CalcLength(spline: Spline3D) -> float

Calculate the Length of a 3D spline.

Parameters:

Returns:

  • float

    Length of the given spline.

CalcLength(spline: BSpline3D) -> float

Calculate the Length of a 3D bspline.

Parameters:

Returns:

  • float

    Length of the given spline.

CalcMass overloaded

CalcMass(elem: Polyhedron3D) -> tuple

Calculate mass values

Parameters:

Returns:

calculated volume,
calculated surface,
calculated gravity point
CalcMass(elem: Cuboid3D) -> tuple

Calculate mass values

Parameters:

Returns:

calculated volume,
calculated surface,
calculated gravity point
CalcMass(elem: Cylinder3D) -> tuple

Calculate mass values

Parameters:

Returns:

calculated volume,
calculated surface,
calculated gravity point
CalcMass(elem: Ellipsoid3D) -> tuple

Calculate mass values

Parameters:

Returns:

calculated volume,
calculated surface,
calculated gravity point
CalcMass(elem: Cone3D) -> tuple

Calculate mass values

Parameters:

Returns:

calculated volume,
calculated surface,
calculated gravity point
CalcMass(elem: ClippedSweptSolid3D) -> tuple

Calculate mass values

Parameters:

Returns:

calculated volume,
calculated surface,
calculated gravity point
CalcMass(elem: ExtrudedAreaSolid3D) -> tuple

Calculate mass values

Parameters:

Returns:

calculated volume,
calculated surface,
calculated gravity point
CalcMass(elem: BRep3D) -> tuple

Calculate mass values

Parameters:

Returns:

calculated volume,
calculated surface,
calculated gravity point

CalcMinMax overloaded

CalcMinMax(point: Point2D) -> tuple[MinMax2D, eServiceResult]

Calculate Min- and Max Point of an element.

Calculates the MinMax2D box by the Point2D given in parameter point

Parameters:

  • point (Point2D) –

    Point2D to be calculated

Returns:

CalcMinMax(line: Line2D) -> tuple[MinMax2D, eServiceResult]

Calculate Min- and Max Point of an element.

Calculates the MinMax2D box by the Line2D given in parameter line.

Parameters:

  • line (Line2D) –

    Line2D to be calculated

Returns:

CalcMinMax(polyline: Polyline2D) -> tuple[MinMax2D, eServiceResult]

Calculate Min- and Max Point of an element.

Calculates the MinMax2D box by the Polyline2D given in parameter polyline.

Parameters:

  • polyline (Polyline2D) –

    Polyline2D to be calculated

Returns:

CalcMinMax(polygon: Polygon2D) -> tuple[MinMax2D, eServiceResult]

Calculate Min- and Max Point of an element.

Calculates the MinMax2D box by the Polygon2D given in parameter polygon.

Parameters:

  • polygon (Polygon2D) –

    Polygon2D to be calculated

Returns:

CalcMinMax(arc: Arc2D) -> tuple[MinMax2D, eServiceResult]

Calculate Min- and Max Point of an element.

Calculates the MinMax2D box by the Arc2D given in parameter arc.

Parameters:

  • arc (Arc2D) –

    Arc2D to be calculated

Returns:

CalcMinMax(spline: Spline2D) -> tuple[MinMax2D, eServiceResult]

Calculate Min- and Max Point of an element.

Calculates the MinMax2D box by the Spline2D given in parameter spline.

Parameters:

  • spline (Spline2D) –

    Spline2D to be calculated

Returns:

CalcMinMax(spline: Spline3D) -> tuple[MinMax3D, eServiceResult]

Calculate Min- and Max Point of an element.

Calculates the MinMax3D box of the Spline3D given in parameter spline.

Parameters:

  • spline (Spline3D) –

    Spline3D to be calculated

Returns:

CalcMinMax(spline: BSpline3D) -> tuple[MinMax3D, eServiceResult]

Calculate Min- and Max Point of an element.

Calculates the MinMax3D box of the BSpline3D given in parameter spline.

Parameters:

  • spline (BSpline3D) –

    BSpline3D to be calculated

Returns:

CalcMinMax(spline: BSpline2D) -> tuple[MinMax2D, eServiceResult]

Calculate Min- and Max Point of an element.

Calculates the MinMax2D box of the BSpline2D given in parameter spline.

Parameters:

  • spline (BSpline2D) –

    BSpline2D to be calculated

Returns:

CalcMinMax(clothoid: Clothoid2D) -> tuple[MinMax2D, eServiceResult]

Calculate Min- and Max Point of an element.

Calculates the MinMax2D box by the Clothoid2D given in parameter clothoid.

Parameters:

  • clothoid (Clothoid2D) –

    Clothoid to be calculated

Returns:

CalcMinMax(path: Path2D) -> tuple[MinMax2D, eServiceResult]

Calculate Min- and Max Point of an element.

Calculates the MinMax2D box of the Path2D.

Parameters:

  • path (Path2D) –

    Path2D to be calculated

Returns:

CalcMinMax(area: ClosedArea2D) -> tuple[MinMax2D, eServiceResult]

Calculate Min- and Max Point of an element.

Calculates the MinMax2D box of the ClosedArea2D.

Parameters:

Returns:

Calculate Min- and Max Point of an element.

Calculates the MinMax2D box of the ClosedAreaComposite2D.

Parameters:

Returns:

CalcMinMax(point: Point3D) -> tuple[MinMax3D, eServiceResult]

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the Point3D given in parameter point.

Parameters:

  • point (Point3D) –

    Point3D to be calculated

Returns:

CalcMinMax(line: Line3D) -> tuple[MinMax3D, eServiceResult]

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the Line3D given in parameter line.

Parameters:

  • line (Line3D) –

    Line3D to be calculated

Returns:

CalcMinMax(polyline: Polyline3D) -> tuple[MinMax3D, eServiceResult]

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the Polyline3D given in parameter polyline.

Parameters:

  • polyline (Polyline3D) –

    Polyline3D to be calculated

Returns:

CalcMinMax(pointCloud: object) -> tuple[MinMax3D, eServiceResult]

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the PointCloud3D given in parameter point cloud.

Parameters:

  • pointCloud (object) –

    PointCloud3D to be calculated

Returns:

CalcMinMax(polygon: Polygon3D) -> tuple[MinMax3D, eServiceResult]

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the Polygon3D given in parameter polygon.

Parameters:

  • polygon (Polygon3D) –

    Polygon3D to be calculated

Returns:

CalcMinMax(arc: Arc3D) -> tuple[MinMax3D, eServiceResult]

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the Arc3D given in parameter arc.

Parameters:

  • arc (Arc3D) –

    Arc3D to be calculated

Returns:

CalcMinMax(polyhedron: Polyhedron3D) -> tuple[MinMax3D, eServiceResult]

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the Polyhedron3D given in parameter polyhedron.

Parameters:

  • polyhedron (Polyhedron3D) –

    Polyhedron3D to be calculated

Returns:

CalcMinMax(cuboid: Cuboid3D) -> tuple[MinMax3D, eServiceResult]

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the Cuboid3D given in parameter cuboid.

Parameters:

  • cuboid (Cuboid3D) –

    Cuboid3D to be calculated

Returns:

CalcMinMax(cylinder: Cylinder3D) -> tuple[MinMax3D, eServiceResult]

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the Cylinder3D given in parameter cylinder.

Parameters:

  • cylinder (Cylinder3D) –

    Cylinder3D to be calculated

Returns:

CalcMinMax(cone: Cone3D) -> tuple[MinMax3D, eServiceResult]

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the Cone3D given in parameter cylinder.

Parameters:

  • cone (Cone3D) –

    Cone3D to be calculated

Returns:

CalcMinMax(ellipsoid: Ellipsoid3D) -> tuple[MinMax3D, eServiceResult]

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the Ellipsoid3D given in parameter ellpsoid.

Parameters:

  • ellipsoid (Ellipsoid3D) –

    Ellipsoid3D to be calculated

Returns:

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the PolygonalArea3D given in parameter area.

Parameters:

Returns:

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the ExtrudedAreaSolid3D given in parameter solid.

Parameters:

Returns:

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume by the ClippedSweptSolid3D given in parameter solid.

Parameters:

Returns:

CalcMinMax(geo: Path3D) -> tuple[MinMax3D, eServiceResult]

Calculate 3D-Min- and Max Point of an element.

Calculates the MinMax3D volume for the Path3D element.

Parameters:

  • geo (Path3D) –

    Path3D to be calculated

Returns:

CalcMinMax(geo: BRep3D) -> tuple[MinMax3D, eServiceResult]

Calculate 3D minmax of the B-rep body

Parameters:

  • geo (BRep3D) –

    BRep3D geometry

Returns:

CalcProjectedMinMax

CalcProjectedMinMax(
    geo: BRep3D, matrix: Matrix3D
) -> tuple[MinMax3D, eServiceResult]

Calculate minmax of brep in given projection

Parameters:

  • geo (BRep3D) –

    BRep3D to calculate minmax for

  • matrix (Matrix3D) –

    projection minmax

Returns:

CalcSurface

CalcSurface(elem: BRep3D) -> tuple

Calculate surface of BRep3D

Parameters:

  • elem (BRep3D) –

    input BRep3D

Returns:

result surface

CalcVolume

CalcVolume(elem: BRep3D) -> tuple

Calculate volume of BRep3D

Parameters:

  • elem (BRep3D) –

    input BRep3D

Returns:

result volume

CalculateNormal

CalculateNormal(brep: BRep3D, inputPnt: Point3D) -> Vector3D

Calculate normal vector of BRep at point

Parameters:

Returns:

CalculateSplineLengthToPoint

CalculateSplineLengthToPoint(spline: Spline2D, splinePointIndex: int) -> float

Calculate spline length from spline start to defined spline point.

This function returns correct result even if the various points of the spline

have the same coordinates ( PointLocal(.....) function fails in that case ).

Parameters:

  • spline (Spline2D) –

    2D Spline

  • splinePointIndex (int) –

    Spline point index

Returns:

  • float

    Length if everything is OK. -1.0 in case of error.

Clipping

Clipping(el1: Line2D, el2: MinMax2D) -> eBoolOpResult

test 2D line and minmax box for clipping

Parameters:

Returns:

  • eBoolOpResult

    eInside (line inside the box), eOutside (line outside the box), eClip

Colliding overloaded

Colliding(polygon1: Polygon2D, polygon2: Polygon2D) -> bool

Test for collision between 2 geometry objects

Parameters:

Returns:

  • bool

    true when colliding, otherwise false.

Colliding(polygon: Polygon2D, line: Line2D) -> bool

Test for collision between 2 geometry objects

Parameters:

Returns:

  • bool

    true when colliding, otherwise false.

Colliding(minMax: MinMax2D, polygon: Polygon2D) -> bool

Test for collision between 2 geometry objects

Parameters:

Returns:

  • bool

    true when colliding, otherwise false.

Colliding(brep1: BRep3D, brep2: BRep3D) -> bool

Test for collision between 2 breps (touch is not collision)

Parameters:

  • brep1 (BRep3D) –

    1-st brep element

  • brep2 (BRep3D) –

    2-nd brep element

Returns:

  • bool

    true when colliding, otherwise false.

Convert3DRotation

Convert3DRotation(axis: Axis3D, angle: Angle) -> tuple

Convert a 3D Rotation to series of 2D operations: scale, rotation, scale, rotation.

Parameters:

  • axis (Axis3D) –

    3D axis

  • angle (Angle) –

    Angle of 3D rotation

Returns:

  • tuple

    The first scale in X axis,

  • tuple

    The first scale in Y axis,

  • tuple

    The angle of the first 2D rotation,

  • tuple

    The second scale in X axis (scale in Y axis is 1.0),

  • tuple

    The angle of the second 2D rotation

ConvertTo2D overloaded

ConvertTo2D(line3D: Line3D) -> tuple[bool, Line2D]

Converts Line3D to Line2D

Parameters:

  • line3D (Line3D) –

    Line3D to convert

Returns:

  • tuple[bool, Line2D]

    tuple(line2D is valid: true/false, Converted Line3D)

ConvertTo2D(polyline3D: Polyline3D) -> tuple[bool, Polyline2D]

Converts Polyline3D to Polyline2D

Parameters:

  • polyline3D (Polyline3D) –

    Polyline3D to convert

Returns:

  • tuple[bool, Polyline2D]

    tuple(polyline2D is valid: true/false, Converted Polyline3D)

ConvertTo2D(axis3D: Axis3D) -> tuple[bool, Axis2D]

Converts Axis3D to Axis2D

Parameters:

  • axis3D (Axis3D) –

    Axis3D to convert

Returns:

  • tuple[bool, Axis2D]

    tuple(axis2D is valid: true/false, Converted Axis3D)

ConvertTo2D(point3D: Point3D) -> tuple[bool, Point2D]

Converts Point3D to Point2D

Parameters:

  • point3D (Point3D) –

    Point3D to convert

Returns:

  • tuple[bool, Point2D]

    tuple(point3D is valid: true/false, Converted Point3D)

ConvertTo2D(polygon3D: Polygon3D) -> tuple[bool, Polygon2D]

Converts Polygon3D to Polygon2D

Parameters:

  • polygon3D (Polygon3D) –

    Polygon3D to convert

Returns:

  • tuple[bool, Polygon2D]

    tuple(polygon3D is valid: true/false, Converted Polygon3D)

ConvertTo2D(arc3D: Arc3D) -> tuple[bool, Arc2D]

Converts Arc3D to Arc2D

function converts successfully only 3D circle and 3D ellipse which are parallel to standard plane

Parameters:

  • arc3D (Arc3D) –

    Arc3D to convert

Returns:

  • tuple[bool, Arc2D]

    tuple(Arc3D is valid: true/false, Converted Arc3D)

ConvertTo2D(spline3D: Spline3D) -> tuple[bool, Spline2D]

Converts Spline3D to Spline2D

function converts successfully only 3D spline which is parallel to standard plane

Parameters:

  • spline3D (Spline3D) –

    Spline3D to convert

Returns:

  • tuple[bool, Spline2D]

    tuple(Spline3D is valid: true/false, Converted Spline3D)

ConvertTo2D(bspline3D: BSpline3D) -> tuple[bool, BSpline2D]

Converts BSpline3D to BSpline2D

function converts successfully only 3D bspline which is parallel to standard plane

Parameters:

  • bspline3D (BSpline3D) –

    BSpline3D to convert

Returns:

  • tuple[bool, BSpline2D]

    tuple(BSpline3D is valid: true/false, Converted BSpline3D)

ConvertTo2D(points3D: Point3DList) -> tuple[bool, list[Point2D]]

Converts vector of Point3D to vector of Point2D

Parameters:

Returns:

  • tuple[bool, list[Point2D]]

    tuple(if success true, Vector of converted points)

ConvertTo2D(path3D: Path3D) -> tuple[bool, Path2D]

Converts Path3D to Path2D

Parameters:

  • path3D (Path3D) –

    source path 2D

Returns:

  • tuple[bool, Path2D]

    tuple(if success true, resulting path 3D)

ConvertTo2D(geo_object: object) -> object

Converts geometry to 2D geometry

Currently works on Line3D, Polyline3D, Axis3D, Arc3D, Point3D and Polygon3D. 2D geometries are cloned without modification.

Parameters:

  • geo_object (object) –

    geometry to convert

Returns:

  • object

    nullptr if conversion is not possible, otherwise converted geometry

ConvertTo3D overloaded

ConvertTo3D(line2D: Line2D, zPlane: float = 0) -> tuple[bool, Line3D]

Converts Line2D to Line3D

Parameters:

  • line2D (Line2D) –

    Line2D to convert

  • zPlane (float, default: 0 ) –

    Z value

Returns:

  • tuple[bool, Line3D]

    tuple(line3D is valid: true/false, Converted Line3D)

ConvertTo3D(
    polyline2D: Polyline2D, zPlane: float = 0
) -> tuple[bool, Polyline3D]

Converts Polyline2D to Polyline3D

Parameters:

  • polyline2D (Polyline2D) –

    Polyline2D to convert

  • zPlane (float, default: 0 ) –

    Z value

Returns:

  • tuple[bool, Polyline3D]

    tuple(polyline3D is valid: true/false, Converted Polyline2D)

ConvertTo3D(axis2D: Axis2D, zPlane: float = 0) -> tuple[bool, Axis3D]

Converts Axis2D to Axis3D

Parameters:

  • axis2D (Axis2D) –

    Axis2D to convert

  • zPlane (float, default: 0 ) –

    Z value

Returns:

  • tuple[bool, Axis3D]

    tuple(axis3D is valid: true/false, Converted Axis3D)

ConvertTo3D(spline2D: Spline2D, zPlane: float = 0) -> tuple[bool, Spline3D]

Create an elevated 3D spline from a 2D spline

Parameters:

  • spline2D (Spline2D) –

    Spline to convert

  • zPlane (float, default: 0 ) –

    Z plane for the spline

Returns:

  • tuple[bool, Spline3D]

    tuple(spline3D is valid: true/false, Converted spline3D)

ConvertTo3D(arc2D: Arc2D, zPlane: float = 0) -> tuple[bool, Arc3D]

Converts Arc2D to Arc3D

Parameters:

  • arc2D (Arc2D) –

    Arc2D to convert

  • zPlane (float, default: 0 ) –

    Z value

Returns:

  • tuple[bool, Arc3D]

    tuple(arc3D is valid: true/false, Converted Arc2D)

ConvertTo3D(bspline2D: BSpline2D, zPlane: float = 0) -> tuple[bool, BSpline3D]

Create an elevated 3D bspline from a 2D bspline

Parameters:

  • bspline2D (BSpline2D) –

    BSpline2D to convert

  • zPlane (float, default: 0 ) –

    Z plane for the spline

Returns:

  • tuple[bool, BSpline3D]

    tuple(BSpline3D is valid: true/false, Converted BSpline3D)

ConvertTo3D(path2D: Path2D, zPlane: float = 0) -> tuple[bool, Path3D]

Convert Path2D to Path3D

Parameters:

  • path2D (Path2D) –

    Path2D to convert

  • zPlane (float, default: 0 ) –

    Z plane for the curve

Returns:

  • tuple[bool, Path3D]

    tuple(bool (true = success), converted Path3D)

ConvertTo3D(
    points2D: Point2DList, zPlane: float = 0
) -> tuple[bool, list[Point3D]]

Convert vector of 2D points to a vector of 3D points

Parameters:

  • points2D (Point2DList) –

    vector of 2D points

  • zPlane (float, default: 0 ) –

    Z coordinate to be set by conversion

Returns:

  • tuple[bool, list[Point3D]]

    tuple(true if success, vector of converted 3D points)

ConvertTo3D(polygon: Polygon2D, zPlane: float = 0) -> tuple[bool, Polygon3D]

Convert 2D polygon to a 3D polygon

Parameters:

  • polygon (Polygon2D) –

    2D polygon

  • zPlane (float, default: 0 ) –

    Z coordinate to be set by conversion

Returns:

ConvertTo3D(
    clothoid2D: Clothoid2D, zPlane: float = 0
) -> tuple[bool, BSpline3D]

Convert 2D clothoid to a 3D bspline

Parameters:

  • clothoid2D (Clothoid2D) –

    2D clothoid

  • zPlane (float, default: 0 ) –

    Z coordinate to be set by conversion

Returns:

ConvertToBSpline2D overloaded

ConvertToBSpline2D(arc3D: Arc3D) -> tuple[bool, BSpline2D]

Converts Arc3D to BSpline2D

Parameters:

  • arc3D (Arc3D) –

    Arc3D to convert

Returns:

  • tuple[bool, BSpline2D]

    tuple(bspline2D is valid: true/false, Converted BSpline2D)

ConvertToBSpline2D(spline3D: Spline3D) -> tuple[bool, BSpline2D]

Converts Spline3D to BSpline2D

Parameters:

  • spline3D (Spline3D) –

    Spline3D to convert

Returns:

  • tuple[bool, BSpline2D]

    tuple(bspline2D is valid: true/false, Converted BSpline2D)

CreateBRep3D overloaded

CreateBRep3D(polyhedron: Polyhedron3D) -> tuple

Create BRep3D by converting a polyhedron

Parameters:

Returns:

BRep3D to create
CreateBRep3D(brep: BRep3D, faceindex: int) -> tuple

Create brep from brep face

Parameters:

  • brep (BRep3D) –

    brep to copy face from

  • faceindex (int) –

    face index

Returns:

result brep

CreateFrustumOfPyramid

CreateFrustumOfPyramid(
    length: float,
    width: float,
    height: float,
    offset: float,
    bottomPlane: Plane3D,
) -> tuple

) -> tuple : Create a frustum of pyramid

Parameters:

  • length (float) –

    Length of the bottom

  • width (float) –

    Width of the bottom

  • height (float) –

    Height of the bottom

  • offset (float) –

    Offset of the top

  • bottomPlane (Plane3D) –

    Bottom plane

Returns:

CreateLoftedBRep3D

CreateLoftedBRep3D(
    outerProfiles: Curve3DList,
    innerProfiles: Curve3DList,
    closecaps: bool,
    createprofileedges: bool,
    linear: bool,
    periodic: bool,
) -> tuple

Create BRep3D by means of lofting through a set of profiles (incl. hole)

Parameters:

  • outerProfiles (Curve3DList) –

    outer profiles to loft

  • innerProfiles (Curve3DList) –

    inner profiles to loft (represents hole in outer profile)

  • closecaps (bool) –

    close brep if possible (all profiles are closed)

  • createprofileedges (bool) –

    create profile edges and more surfaces or just create one surface

  • linear (bool) –

    linear or cubic interpolation

  • periodic (bool) –

    if the start profile is also to be the end profile

Returns:

  • tuple

    tuple(error code, result BRep3D)

CreatePatchBRep3D

CreatePatchBRep3D(curves: list) -> tuple[eCreatePatchResult, BRep3DList]

Create breps as patch from given closed 3D-curves

Parameters:

  • curves (list) –

    list of 3D-curves

Returns:

CreatePlanarBRep3D overloaded

CreatePlanarBRep3D(
    icurve: (
        Arc3D | BSpline3D | Line3D | Path3D | Polyline3D | Polygon3D | Spline3D
    ),
) -> tuple

Create brep as planar surface

Parameters:

Returns:

  • tuple

    tuple(error code, - resulting BRep3D ( one planar face ))

CreatePlanarBRep3D(profiles: Curve3DList) -> tuple

Create brep as planar surface

Parameters:

  • profiles (Curve3DList) –

    border of planar surface ( must be closed )

Returns:

  • tuple

    tuple(error code, resulting BRep3D ( one planar face ))

CreatePlanarSurface

CreatePlanarSurface(geometries: list) -> tuple[ePlanarSurfaceError, BRep3DList]

create planar brep

Parameters:

  • geometries (list) –

    input geometries pointers

Returns:

CreatePolygon3D overloaded

CreatePolygon3D(polyhedron: Polyhedron3D, faceIndex: int) -> tuple

Creates a Polygon3D element from a Polyhedron face

Parameters:

  • polyhedron (Polyhedron3D) –

    Polyhedron to get face from

  • faceIndex (int) –

    Index of the face in polyhedron

Returns:

  • tuple

    eOK if successful, else eError,

  • tuple

    Created polygon

CreatePolygon3D(polygon2D: Polygon2D, plane: Plane3D) -> tuple

Creates a Polygon3D element as a projection of 2D polygon onto given plane

Parameters:

  • polygon2D (Polygon2D) –

    2D polygon

  • plane (Plane3D) –

    plane to project 2D polygon to

Returns:

  • tuple

    eOK if successful, else eError,

  • tuple

    Output 3D polygon

CreatePolygon3D(polyline: Polyline3D) -> tuple

Creates a Polygon3D from Polyline3D

Parameters:

Returns:

  • tuple

    eOK if successful, else eError,

  • tuple

    Output 3D polygon

CreatePolygon3DFromIndex

CreatePolygon3DFromIndex(arg2: Polygon3D, arg3: int, arg4: int) -> Polygon3D

Create a 3D polygon from a start and end polygon, an index and a division count

CreatePolyhedron overloaded

CreatePolyhedron(
    polyhedronType: PolyhedronType,
    verticesCount: int,
    edgeCount: int,
    faceCount: int,
    negativeOrientation: bool,
) -> tuple

Create and initialize new Polyhedron3D

Parameters:

  • polyhedronType (PolyhedronType) –

    Polyhedron type - edges, faces or volume.

  • verticesCount (int) –

    Count of expected vertices.

  • edgeCount (int) –

    Count of expected edges.

  • faceCount (int) –

    Count of expected faces.

  • negativeOrientation (bool) –

    True for negative orientation.

Returns:

  • tuple

    Error code,

  • tuple

    pointer to 3D Polyhedron which will be created

CreatePolyhedron(solid: ClippedSweptSolid3D) -> tuple

Create polyhedron from input parametric solid

Parameters:

Returns:

  • tuple

    Error code,

  • tuple

    Polyhedron3D which will be created

CreatePolyhedron(solid: ExtrudedAreaSolid3D) -> tuple

Create polyhedron from input parametric solid

Parameters:

Returns:

  • tuple

    Error code,

  • tuple

    Polyhedron3D which will be created

CreatePolyhedron(cylinder: Cylinder3D, countOfSegments: int) -> tuple

Create polyhedron from input Cylinder

Parameters:

  • cylinder (Cylinder3D) –

    Cylinder to convert

  • countOfSegments (int) –

    Count of segments

Returns:

  • tuple

    Error code,

  • tuple

    Polyhedron3D which will be created

CreatePolyhedron(igeo: object, options: ApproximationSettings) -> tuple

Create polyhedron from arbitrary solid

Parameters:

  • geoObject

    Geometry object

  • options (ApproximationSettings) –

    ApproximationSettings structure holding options for approximation

Returns:

  • tuple

    Error code,

  • tuple

    Polyhedron3D which will be created

CreatePolyhedron(brep: BRep3D, options: ApproximationSettings) -> tuple

Create polyhedron as approximation of arbitrary BRep3D

Parameters:

Returns:

  • tuple

    Error code,

  • tuple

    polyhedron to create

CreatePolyhedron(polygon: Polygon3D) -> tuple

Create polyhedron from Polygon3D

Parameters:

  • polygon (Polygon3D) –

    Reference to Polygon3D

Returns:

  • tuple

    Error code,

  • tuple

    Polyhedron3D which will be created

CreatePolyhedron(line: Line3D) -> tuple

Create polyhedron from Line3D

Parameters:

  • line (Line3D) –

    Reference to Line3D

Returns:

  • tuple

    Error code,

  • tuple

    Polyhedron3D which will be created

CreatePolyhedron(lines: Line3DList) -> tuple

Create polyhedron from vector of 3D lines

Parameters:

Returns:

  • tuple

    Error code,

  • tuple

    Polyhedron3D which will be created

CreatePolyhedron(polyline: Polyline3D) -> tuple

Create polyhedron from Polyline3D

Parameters:

  • polyline (Polyline3D) –

    Reference to Polyline3D

Returns:

  • tuple

    Error code,

  • tuple

    Polyhedron3D which will be created

CreatePolyhedron(base: Polygon3D, path: Polyline3D) -> tuple

Create translation polyhedron from base polygon and path

Parameters:

Returns:

  • tuple

    Error code,

  • tuple

    Polyhedron3D which will be created

CreatePolyhedron(base: Polygon2D, refPoint: Point2D, path: Polyline3D) -> tuple

Create translation polyhedron from base polygon and path

Parameters:

  • base (Polygon2D) –

    base polygon 2D

  • refPoint (Point2D) –

    reference point used for transformation

  • path (Polyline3D) –

    translation path

Returns:

  • tuple

    Error code,

  • tuple

    Polyhedron3D which will be created

CreatePolyhedron(
    polygon: Polygon2D, bottomPlane: Plane3D, topPlane: Plane3D
) -> tuple

Create translation polyhedron from 2D polygon, bottom and top plane

Parameters:

  • polygon (Polygon2D) –

    polygon 2D

  • bottomPlane (Plane3D) –

    the bottom plane

  • topPlane (Plane3D) –

    the top plane

Returns:

  • tuple

    error code,

  • tuple

    Polyhedron which will be created

CreatePolyhedron(
    baseOutline: Polygon2D,
    leftOffset: float,
    rightOffset: float,
    frontOffset: float,
    backOffset: float,
    bottomPlane: Plane3D,
    topPlane: Plane3D,
) -> tuple

Create conical polyhedron from 2D polygon, given offsets, bottom and top plane

Parameters:

  • baseOutline (Polygon2D) –

    base outline polygon 2D (rectangle of 4 points)

  • leftOffset (float) –

    offset from base outline on the left side

  • rightOffset (float) –

    offset from base outline on the right side

  • frontOffset (float) –

    offset from base outline on the front side

  • backOffset (float) –

    offset from base outline on the back side

  • bottomPlane (Plane3D) –

    element's bottom plane

  • topPlane (Plane3D) –

    element's top plane

Returns:

  • tuple

    Error code,

  • tuple

    polyhedron which will be created

CreatePolyhedron(startPolygon: Polygon3D, endPolygon: Polygon3D) -> tuple

Create a polyhedron from a 3D start and end polygon

Parameters:

Returns:

CreatePolyline3D overloaded

CreatePolyline3D(polyhedron: Polyhedron3D) -> tuple

Creates a Polyline3D element from a Polyhedron

Parameters:

  • polyhedron (Polyhedron3D) –

    Polyhedron to create line from

Returns:

  • tuple

    eOK if converted successful, else eError,

Created Polyline
CreatePolyline3D(polyline2D: Polyline2D) -> tuple

Create Polyline3D from Polyline2D

Parameters:

  • polyline2D (Polyline2D) –

    Reference to Polyline2D

Returns:

  • tuple

    eOK if created successful, else eError,

Reference to empty Polyline3D
CreatePolyline3D(polygon: Polygon3D) -> tuple

Creates a Polyline3D from Polygon3D

Parameters:

Returns:

  • tuple

    eOK if successful, else eError,

Output 3D polyline

CreatePolyline3DFromIndex

CreatePolyline3DFromIndex(
    startPol: Polyline3D, endPol: Polyline3D, index: int, count: int
) -> Polyline3D

Create a 3D polyline from a start and end polyline, an index and a division count Args: startPol: Start polyline endPol: End polyline index: Division index count: Division count

Returns:

  • Polyline3D

    eOK if converted successful, else eError,

Created Polyline

CreateRailSweptBRep3D overloaded

CreateRailSweptBRep3D(
    profiles: Curve3DList,
    rails: Curve3DList,
    closecaps: bool,
    uniformScaling: bool,
    railrotation: bool,
) -> tuple

Create BRep3D by rail sweeping of profiles. Rails must start/ends on profiles start/end points

Parameters:

  • profiles (Curve3DList) –

    profiles to sweep

  • rails (Curve3DList) –

    rails to control sweeping

  • closecaps (bool) –

    if true, create closed solid if possible, if false just surface(s) will be created

  • uniformScaling (bool) –

    use uniform scaling for profiles along the rails

  • railrotation (bool) –

    use rotation the shape to maintain a constant angle with the rail

Returns:

  • tuple

    tuple(error code, result BRep3D (1 swept face))

CreateRailSweptBRep3D(
    profiles: Curve3DList,
    rails: Curve3DList,
    path: (
        Arc3D | BSpline3D | Line3D | Path3D | Polyline3D | Polygon3D | Spline3D
    ),
    closecaps: bool,
    uniformScaling: bool,
    railrotation: bool,
    proportionalVertexMatch: bool,
) -> tuple

Create BRep3D by rail sweeping of profiles. Rails must start/ends on profiles start/end points

Parameters:

  • profiles (Curve3DList) –

    profiles to sweep

  • rails (Curve3DList) –

    rails to control sweeping

  • path (Arc3D | BSpline3D | Line3D | Path3D | Polyline3D | Polygon3D | Spline3D) –

    user defined path

  • closecaps (bool) –

    if true, create closed solid if possible, if false just surface(s) will be created

  • uniformScaling (bool) –

    use uniform scaling for profiles along the rails

  • railrotation (bool) –

    use rotation the shape to maintain a constant angle with the rail

  • proportionalVertexMatch (bool) –

    Flag whether to use proportional vertex matching

Returns:

  • tuple

    tuple(error code, result BRep3D (1 swept face), path for body creation)

CreateRevolvedBRep3D

CreateRevolvedBRep3D(
    profiles: Curve3DList,
    axis: Axis3D,
    rotationAngle: Angle,
    closecaps: bool,
    numprofiles: int,
) -> tuple

Create brep as revolved body.

Parameters:

  • profiles (Curve3DList) –

    list of profile curves

  • axis (Axis3D) –

    axis of rotation

  • rotationAngle (Angle) –

    angle of rotation

  • closecaps (bool) –

    if true, create closed solid if possible, if false just surface(s) will be created

  • numprofiles (int) –

    number of control profiles created along the created surfaces (division of surface parameter)

Returns:

  • tuple

    tuple(error code, created brep)

CreateSweptBRep3D overloaded

CreateSweptBRep3D(
    profile: (
        Arc3D | BSpline3D | Line3D | Path3D | Polyline3D | Polygon3D | Spline3D
    ),
    path: (
        Arc3D | BSpline3D | Line3D | Path3D | Polyline3D | Polygon3D | Spline3D
    ),
    railrotation: bool,
    rotAxis: Vector3D | None = None,
) -> tuple

Create BRep3D by means of a profile extrusion along a path

Parameters:

Returns:

  • tuple

    tuple(error code, result BRep3D)

CreateSweptBRep3D(
    profiles: Curve3DList,
    path: (
        Arc3D | BSpline3D | Line3D | Path3D | Polyline3D | Polygon3D | Spline3D
    ),
    closecaps: bool,
    railrotation: SweepRotationType,
    rotAxis: Vector3D | None = None,
    numprofiles: int = 0,
) -> tuple

Create BRep3D by means of a vector of profiles extrusion along a path

Parameters:

  • profiles (Curve3DList) –

    profiles to extrude, if closed solid will be created, otherwise a surface only

  • path (Arc3D | BSpline3D | Line3D | Path3D | Polyline3D | Polygon3D | Spline3D) –

    path to extrude along

  • closecaps (bool) –

    if true, create closed solid if possible, if false just surface(s) will be created

  • railrotation (SweepRotationType) –

    if true, rotate profile along the path

  • rotAxis (Vector3D | None, default: None ) –

    if set, profile will be rotated along this axis along the path

  • numprofiles (int, default: 0 ) –

    number of control profiles created along the created surfaces (divisionn of surface parameter)

Returns:

  • tuple

    tuple(error code, result BRep3D)

CreateSweptBRep3D(
    profiles: list,
    path_object: object,
    closecaps: bool,
    railrotation: bool,
    rotAxis: Vector3D | None = None,
    numprofiles: int = 0,
) -> tuple[eGeometryErrorCode, BRep3D]

Create BRep3D by means of a vector of profiles extrusion along a path

Parameters:

  • profiles (list) –

    profiles to extrude, if closed solid will be created, otherwise a surface only

  • path_object (object) –

    path to extrude along

  • closecaps (bool) –

    if true, create closed solid if possible, if false just surface(s) will be created

  • railrotation (bool) –

    if true, rotate profile along the path

  • rotAxis (Vector3D | None, default: None ) –

    if set, profile will be rotated along this axis along the path

  • numprofiles (int, default: 0 ) –

    number of control profiles created along the created surfaces (divisionn of surface parameter)

Returns:

CreateSweptPolyhedron3D

CreateSweptPolyhedron3D(
    profiles: Polyline3DList,
    path: Polyline3D,
    closecaps: bool,
    railrotation: bool,
    rotAxis: Vector3D,
) -> tuple

Create translation polyhedron from base polygon and path

Parameters:

  • profiles (Polyline3DList) –

    profiles to sweep

  • path (Polyline3D) –

    translation path

  • closecaps (bool) –

    create closed volume (in case of closed profiles) or open shell only

  • railrotation (bool) –

    rotate profiles along path - standard rotation = true (keep angle between profile and a path), rotation along z-axis vector = false

  • rotAxis (Vector3D) –

    if set, profile will be rotated along this axis along the path

Returns:

  • tuple

    Error code,

  • tuple

    Polyhedron3D which will be created

CutBrepWithPlane

CutBrepWithPlane(
    original: BRep3D, plane: Plane3D
) -> tuple[bool, BRep3D, BRep3D]

Cut Brep with plane - create two independent BReps

Parameters:

  • original (BRep3D) –

    original brep

  • plane (Plane3D) –

    cutting plane

Returns:

  • bool

    True if the plane cuts the brep, False otherwise. In the latter case, one of the resulting breps is the original brep, the other one is empty.

  • BRep3D

    Resulting brep on the positive side of the plane

  • BRep3D

    Resulting brep on the negative side of the plane

Examples:

cylinder_1 is a cylinder with radius 1 and height 2. Cutting it with a XY plane in Z=1.0 results in two cylinders with radius 1 and height 1:

>>> _, above_cylinder, below_cylinder = CutBrepWithPlane(cylinder_1, Plane3D(Point3D(0, 0, 1), Vector3D(0, 0, 1)))
>>> above_cylinder.IsCone()
(True, AxisPlacement3D(
   Origin(0, 0, 1)
   X Direction(1, 0, 0)
   Z Direction(0, 0, 1)), 1.0, 1.0, 0.999...)
>>> below_cylinder.IsCone()
(True, AxisPlacement3D(
   Origin(0, 0, 0)
   X Direction(1, 0, 0)
   Z Direction(0, 0, 1)), 1.0, 1.0, 1.0...)

CutPolyhedronWithPlane

CutPolyhedronWithPlane(
    original: Polyhedron3D, plane: Plane3D
) -> tuple[bool, Polyhedron3D, Polyhedron3D]

Cut polyhedron with plane - create two independent polyhedra

Parameters:

Returns:

  • bool

    True if the plane cuts the polyhedron, False otherwise. In the latter case, one of the resulting polyhedrons is the original polyhedron, the other one is empty.

  • Polyhedron3D

    Resulting polyhedron on the positive side of the plane

  • Polyhedron3D

    Resulting polyhedron on the negative side of the plane

Examples:

cube_1 is a cube with side length of 2.0. Cutting it with a XY plane in Z=1.0 results in two cubes with a volume of 4.0 and surface of 16.0 each:

>>> _, above_cube, below_cube = CutPolyhedronWithPlane(cube_1, Plane3D(Point3D(0, 0, 1), Vector3D(0, 0, 1)))
>>> CalcMass(above_cube)[1:3], CalcMass(below_cube)[1:3]
((3.99..., 15.99...), (4.0..., 16.0...))

Their centers of mass are located:

>>> CalcMass(below_cube)[3], CalcMass(above_cube)[3]
(Point3D(1, 1, 0.5), Point3D(1, 1, 1.5))

DeletePolyhedronLastFace

DeletePolyhedronLastFace(polyhedron: Polyhedron3D) -> eGeometryErrorCode

Delete the last face of given polyhedron

Parameters:

Returns:

FaceShell

FaceShell(
    inputBrep: BRep3D,
    distance: float,
    direction: int,
    faceIndices: VecSizeTList,
    useOffsetStepPierce: bool,
    useOrthoVXSplit: bool,
    punchDirection: Vector3D,
) -> tuple[eGeometryErrorCode, BRep3D]

Execute face shell

Parameters:

  • inputBrep (BRep3D) –

    inputBrep

  • distance (float) –

    distance for offset

  • direction (int) –

    offset direction 0 - in face normal direction, 1 - in both directions, 2 - opposite to face normal

  • faceIndices (VecSizeTList) –

    face indexes

  • useOffsetStepPierce (bool) –

    if to use offset step pierce

  • useOrthoVXSplit (bool) –

    if to use OrthoVXSplit option

  • punchDirection (Vector3D) –

    defined direction for shell (optional)

Returns:

FindMinDistancePoint overloaded

FindMinDistancePoint(point: Point3D, bspline: BSpline3D) -> tuple

Find minimal distance point between Point3D and BSpline3D

Parameters:

Returns:

point on bspline with minimal distance
FindMinDistancePoint(point: Point3D, brep: BRep3D) -> tuple

Find minimal distance point between Point3D and BSpline3D

Parameters:

Returns:

  • tuple

    error code,

  • tuple

    point on brep with minimal distance

GetAbsoluteTolerance

GetAbsoluteTolerance() -> float

get absolute tolerance

Returns:

  • float

    absolute tolerance

GetAllIntersections

GetAllIntersections(
    geoObject1: object, geoObject2: object, eps: float, maxSolutions: int
) -> tuple

Calculate all intersections of two geometry objects Intersection point must not be located on the elements, it can be outside

Parameters:

  • geoObject1 (object) –

    First object

  • geoObject2 (object) –

    Second object

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

GetAngleTolerance

GetAngleTolerance() -> Angle

Get angle tolerance

This tolerance is using for angle comparison. Use it with Comparison::Equal(value, value, GetAngleTolerance())

Returns:

  • Angle

    Tolerance using for angle comparison [rad]

GetClosestIntersection

GetClosestIntersection(
    geometrie1: object,
    geometrie2: object,
    inputPoint: Point3D,
    eps: float,
    bOnlyInsidePoints: bool,
) -> tuple

Function to calculate the nearest intersection between two geometries to a reference point Intersection point must not be located on the elements, it can be outside

Parameters:

  • geometrie1 (object) –

    First object

  • geometrie2 (object) –

    Second object

  • inputPoint (Point3D) –

    Reference Point / Cursor point

  • eps (float) –

    Tolerance

  • bOnlyInsidePoints (bool) –

    Return point must be on both objects

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    intersection point

GetCurvatureTolerance

GetCurvatureTolerance() -> float

Get curvature tolerance

This tolerance is using for curvature comparison. Use it with Comparison::Equal(value, value, GetCurvatureTolerance())

Returns:

  • float

    Tolerance using for curvature comparison

GetCurveLengthTolerance

GetCurveLengthTolerance() -> float

Get tolerance for curve length comparison

This tolerance is using for length of curve comparison. Use it with Comparison::Equal(value, value, GetCurveLengthTolerance())

Returns:

  • float

    Tolerance using for length of curve comparison [mm]

GetIntersectionPoints

GetIntersectionPoints(
    geoObject1: object, geoObject2: object, eps: float
) -> tuple

Function to calculate the nearest intersection between two geometries to a reference point Intersection point must not be located on the elements, it can be outside

Parameters:

  • geoObject1 (object) –

    First object

  • geoObject2 (object) –

    Second object

  • eps (float) –

    Tolerance (optional)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector of intersection points and additional information

GetRelativeTolerance

GetRelativeTolerance() -> float

get relative tolerance

Returns:

  • float

    relative tolerance

GetRotationMatrix overloaded

GetRotationMatrix(zeroPoint: Point2D, angle: Angle) -> Matrix2D

Creates 2D rotation matrix

Parameters:

  • zeroPoint (Point2D) –

    Rotation point

  • angle (Angle) –

    Rotation angle

Returns:

GetRotationMatrix(axis: Axis3D, angle: Angle) -> Matrix3D

Creates 3D rotation matrix

Parameters:

  • axis (Axis3D) –

    Rotation axis

  • angle (Angle) –

    Rotation angle

Returns:

GetRotationMatrix(line: Line3D, angle: Angle) -> Matrix3D

Creates 3D rotation matrix

Parameters:

  • line (Line3D) –

    Rotation line, extended to axis

  • angle (Angle) –

    Rotation angle

Returns:

GroundViewHiddenCalculation overloaded

GroundViewHiddenCalculation(
    brep: BRep3D,
) -> tuple[eGeometryErrorCode, list[typingAny], list[typingAny]]

Hidden calculation with ground view of BRep

Parameters:

Returns:

  • tuple[eGeometryErrorCode, list[typingAny], list[typingAny]]

    tuple(Error code, Vector of visible edges, Vector of hidden edges)

GroundViewHiddenCalculation(
    poly: Polyhedron3D,
) -> tuple[eGeometryErrorCode, list[Line3D], list[Line3D]]

Hidden calculation with ground view of polyhedron.

Parameters:

Returns:

ImprintProfileOnFaces

ImprintProfileOnFaces(
    brep: BRep3D,
    targetFaces: list[int] | VecUIntList,
    profile: (
        Arc3D | BSpline3D | Line3D | Path3D | Polyline3D | Polygon3D | Spline3D
    ),
) -> tuple

Imprint edges on brep

Parameters:

Returns:

  • tuple

    tuple(eOK if successful otherwise eError, Brep, new faces after imprint)

Intersect overloaded

Intersect(bodies1: PolyhedronTypesList, bodies2: PolyhedronTypesList) -> tuple

compute intersection of set of bodies

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    Resulting polyhedron

Intersect(el1: Plane3D, el2: Plane3D) -> tuple[bool, Axis3D]

calculate intersection between 2 3D planes

Parameters:

  • el1 (Plane3D) –

    the first plane

  • el2 (Plane3D) –

    the second plane

Returns:

  • bool

    False when not intersecting, True otherwise

  • Axis3D

    Common axis of planes

Examples:

When plane_1 is a plane in XZ plane and plane_2 is a plane in YZ plane, like:

>>> plane_1 = Plane3D(Point3D(0, 0, 0), Vector3D(0, 1, 0))
>>> plane_2 = Plane3D(Point3D(0, 0, 0), Vector3D(1, 0, 0))

The have a common axis:

>>> Intersect(plane_1, plane_2)
(True, Axis3D(
   AxisPoint(0, 0, 0)
   Vector(0, 0, -1)))
Intersect(el1: Polyhedron3D, el2: Polyhedron3D) -> tuple[bool, Polyhedron3D]

compute intersection of 2 3D polyhedron

Parameters:

Returns:

  • bool

    Resulting polyhedron

  • Polyhedron3D

    True when intersecting, False otherwise

Examples:

Two cubes cube_1 and cube_2 have both side length of 2.0. The first one is located in the origin, the second one is translated by (1.0, 1.0, 1.0). The cubes intersect in a cube with side length 1:

>>> intersecting, resulting_cube = Intersect(cube_1, cube_2)
>>> intersecting
True

The resulting cube has a volume of 1, surface area of 6 and center in (1.5, 1.5, 1.5):

>>> CalcMass(resulting_cube)
(NemAll_Python_Geometry.eGeometryErrorCode.eOK, 0.999..., 6.0, Point3D(1.5, 1.5, 1.5))
Intersect(brep1: BRep3D, brep2: BRep3D) -> tuple[eGeometryErrorCode, BRep3D]

Compute intersection of 2 breps

Parameters:

  • brep1 (BRep3D) –

    first brep

  • brep2 (BRep3D) –

    second brep

Returns:

Examples:

When cylinder_1 is a cylinder with radius 1 and height 2, and cylinder_2 is a cylinder with radius 1 and height 2, both with a central axis aligning with Z axis, they intersect in a cylinder with radius 1 and height 1:

>>> err, resulting_cylinder = Intersect(cylinder_1, cylinder_2)
>>> err
NemAll_Python_Geometry.eGeometryErrorCode.eOK
>>> _err, placement, radius, _err, height = resulting_cylinder.IsCone()
>>> placement.ZDirection
Vector3D(0, 0, 1)
>>> radius
1.0
>>> height
1.0
Intersect(
    brep: BRep3D, polyhedron: Polyhedron3D
) -> tuple[eGeometryErrorCode, BRep3D]

Compute intersection of 2 bodies

Parameters:

  • brep (BRep3D) –

    first element - BRep3D

  • polyhedron (Polyhedron3D) –

    second element - Polyhedron3D

Returns:

Examples:

When cylinder_1 har radius of 1.0 and height 2.0 with central axis aligned with Z axis, and cube_1 has side length of 2.0, the intersecting object is a quarter of the cylinder with radius of 1.0 and height of 2.0:

>>> err, resulting_geometry = Intersect(cylinder_1, cube_1)
>>> err
NemAll_Python_Geometry.eGeometryErrorCode.eOK

Resulting quarter cylinder has a volume of \(\i/2\) and a surface area of \(4 + 1.5\i\):

>>> CalcMass(resulting_geometry)
(NemAll_Python_Geometry.eGeometryErrorCode.eOK, 1.5707..., 8.712..., Point3D(0.424..., 0.424..., 1))

IntersectRayBRep

IntersectRayBRep(
    rayPoint: Point3D, rayVector: Vector3D, brep: BRep3D, bNegativPrefered: bool
) -> tuple[int, IntersectionRayBRep]

Calulate intersection between ray and brep

Parameters:

  • rayPoint (Point3D) –

    ray Point

  • rayVector (Vector3D) –

    direction vector of ray

  • brep (BRep3D) –

    BRep

  • bNegativPrefered (bool) –

    When True, the intersection is searched on the the positive side of the ray and if not found, on the negative side. When False, the search is done in the opposite order.

Returns:

  • int

    0 when no error occurs

  • IntersectionRayBRep

    Result of the calculation containing the intersection point and the normal vector

Examples:

cylinder_1 has radius of 1.0, height of 2.0 and bottom center point in the origin. Intersection with a ray can be calculated like:

>>> IntersectRayBRep(
...     Point3D(0, -3, 0),
...     Vector3D(1, 3, 1),
...     cylinder_1,
...     bNegativPrefered=False)[1]
IntersectionRayBRep(
   IntersectionPoint(0.8, -0.6, 0.8)
   NormalVector(0.799..., -0.599..., 0)
   FaceIndex(2))

IntersectRayPolyhedron

IntersectRayPolyhedron(
    rayPoint: Point3D,
    rayVector: Vector3D,
    polyhedron: Polyhedron3D,
    flag: IntersectRayPolyhedronFlag,
    selFaces: list[int] | VecIntList | None = None,
    searchDistance: float = 0.0,
    pixelSize: float = 0,
) -> tuple[int, IntersectionRayPolyhedron]

Calulate intersection between ray and polyhedron

Parameters:

  • rayPoint (Point3D) –

    ray Point

  • rayVector (Vector3D) –

    direction vector of ray

  • polyhedron (Polyhedron3D) –

    polyhedron

  • flag (IntersectRayPolyhedronFlag) –

    flag for determining the "best" intersection

  • selFaces (list[int] | VecIntList | None, default: None ) –

    optional list of faces used for intersection, if default value is used, all faces are checked

  • searchDistance (float, default: 0.0 ) –

    used for eNegativeVerticalPreferred to find vertical faces near point found on not-vertical face

  • pixelSize (float, default: 0 ) –

    in mm used for eNegativeVerticalPreferred to find vertical faces

Returns:

Examples:

cube_1 has side length of 2.0 and lower left point in the origin. Intersection with a ray pointing towards the cube can be calculated like:

>>> IntersectRayPolyhedron(
...     Point3D(1, -2, 1),
...     Vector3D(0, 1, 0),
...     cube_1,
...     IntersectRayPolyhedronFlag.ePositiveOnly)[1]
IntersectionRayBRep(
   IntersectionPoint(1, 0, 1)
   Lambda(2)
   FaceNormalVec(0, 1, 0)
   FaceIndex(3)
   RetCode(1))

When the ray is pointing away from the cube, the intersection still can be found on the negative side of the ray, when the flag is set to eNegativeIfNoPositive:

>>> IntersectRayPolyhedron(
...     Point3D(1, -2, 1),
...     Vector3D(0, -1, 0),
...     cube_1,
...     IntersectRayPolyhedronFlag.eNegativeIfNoPositive)[1]
IntersectionRayBRep(
   IntersectionPoint(1, 0, 1)
   Lambda(-2)
   FaceNormalVec(0, 1, 0)
   FaceIndex(3)
   RetCode(-1))

Intersecting overloaded

Intersecting(el1: MinMax2D, el2: MinMax2D) -> bool

test 2 2D minmaxes for intersection

Parameters:

Returns:

  • bool

    true when intersecting, otherwise false.

Intersecting(el1: Line2D, el2: Line2D, tol: float) -> bool

test 2 2D lines for intersection

Parameters:

  • el1 (Line2D) –
    1. element
  • el2 (Line2D) –
    1. element
  • tol (float) –

    tolerance

Returns:

  • bool

    true when intersecting, otherwise false.

Intersecting(el1: Polygon2D, el2: Polygon2D, tol: float) -> bool

test 2 2D polygons for intersection throw Exception in case of internal error.

Parameters:

Returns:

  • bool

    true when intersecting, otherwise false.

Intersecting(el1: BRep3D, el2: BRep3D) -> bool

test 2 breps for intersection

Parameters:

Returns:

  • bool

    bool true when intersecting

Intersecting(el1: BRep3D, el2: Polyhedron3D) -> bool

test brep and polyhedron for intersection

Parameters:

Returns:

  • bool

    bool true when intersecting

Intersecting(el1: Arc3D, el2: Polyhedron3D) -> bool

test 3D arc and polyhedron for intersection

Parameters:

Returns:

  • bool

    bool true when intersecting

Intersecting(el1: Arc3D, el2: BRep3D) -> bool

test 3D arc and brep for intersection

Parameters:

  • el1 (Arc3D) –

    arc to check

  • el2 (BRep3D) –

    brep to check

Returns:

  • bool

    bool true when intersecting

Intersecting(el1: Spline3D, el2: Polyhedron3D) -> bool

test 3D spline and polyhedron for intersection

Parameters:

Returns:

  • bool

    bool true when intersecting

Intersecting(el1: Spline3D, el2: BRep3D) -> bool

test 3D spline and brep for intersection

Parameters:

Returns:

  • bool

    bool true when intersecting

Intersecting(el1: BSpline3D, el2: Polyhedron3D) -> bool

test 3D bspline and polyhedron for intersection

Parameters:

Returns:

  • bool

    bool true when intersecting

Intersecting(el1: BSpline3D, el2: BRep3D) -> bool

test 3D bspline and brep for intersection

Parameters:

Returns:

  • bool

    bool true when intersecting

IntersectingRel overloaded

IntersectingRel(el1: MinMax2D, el2: MinMax2D) -> bool

test 2 geo 2D minmaxes for intersection using built-in relative tolerance

Parameters:

Returns:

  • bool

    true when intersecting, otherwise false.

IntersectingRel(el1: Line2D, el2: Line2D) -> bool

test 2 2D lines for intersection

Parameters:

Returns:

  • bool

    true when intersecting, otherwise false.

IntersectionCalculus overloaded

IntersectionCalculus(el1: Axis2D, el2: Axis2D) -> tuple

Calculate intersection of two 2d axes

Parameters:

Returns:

  • tuple

    true when intersecting, otherwise false.,

  • tuple

    result intersection point if possible

Examples:

For two non-paralell axes, the intersection point is calculated like:

>>> IntersectionCalculus(
...     Axis2D(Point2D(0, 2), Vector2D(1,  1)),
...     Axis2D(Point2D(0, 0), Vector2D(1, -1)))
(True, Point2D(-1, 1))
IntersectionCalculus(axis: Axis2D, line: Line2D) -> tuple

compute intersection between 2D axis and 2D line

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    Intersection point (origin when not intersecting)

Examples:

>>> IntersectionCalculus(
...     Axis2D(Point2D(0, 0), Vector2D(1, 0)),
...     Line2D(0, 1, 1, -1))
(True, Point2D(0.5, 0))

When line does not touch the axis, the result is False (unlike when using IntersectionCalculusEx), but the intersection point is still calculated:

>>> IntersectionCalculus(
...     Axis2D(Point2D(0, 0), Vector2D(1, 0)),
...     Line2D(0, 2, 1, 1))
(False, Point2D(2, 0))
IntersectionCalculus(axis2D: Axis2D, axis3D: Axis3D) -> tuple

Calculate intersection between 2D axis and 3D axis

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    Intersection point (origin when not intersecting)

Examples:

>>> IntersectionCalculus(
...     Axis2D(Point2D(0, 0),    Vector2D(1, 1)),
...     Axis3D(Point3D(0, 0, 1), Vector3D(1, 1, -1)))
(True, Point3D(1, 1, 0))
IntersectionCalculus(axis2D: Axis2D, arc2D: Arc2D, eps: float) -> tuple

Calculate intersection between 2D axis and 2D arc

Parameters:

  • axis2D (Axis2D) –

    2D Axis

  • arc2D (Arc2D) –

    2D Arc

  • eps (float) –

    precision (not considered in this case)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points (3D)

Examples:

For arc_1 being a 90° arc with a radius of 1.0, the intersection point is calculated like:

>>> axis = Axis2D(Point2D(0, 0.5), Vector2D(1, 0))
>>> IntersectionCalculus(axis, arc_1, 1e-11)
(True, [Point3D(0.866..., 0.5, 0)])

arc_4 is a 180° arc. For it, two intersection points are found:

>>> IntersectionCalculus(axis, arc_4, 1e-11)
(True, [Point3D(0.866..., 0.5, 0), Point3D(-0.866..., 0.5, 0)])

When axis is tangent to the arc, two (identical) intersection points are found:

>>> axis = Axis2D(Point2D(0, 1), Vector2D(1, 0))
>>> IntersectionCalculus(axis, arc_1, 1e-11)
(True, [Point3D(0, 1, 0), Point3D(0, 1, 0)])
IntersectionCalculus(axis2D: Axis2D, polyline: Polyline2D) -> tuple

Calculate intersection between 2D axis and 2D polyline

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points (3D)

Examples:

>>> IntersectionCalculus(
...     Axis2D(Point2D(0, 1), Vector2D(1, 0)),
...     Polyline2D([Point2D(-2, 0), Point2D(0, 2), Point2D(2, 0)]))
(True, [Point3D(-1, 1, 0), Point3D(1, 1, 0)])
IntersectionCalculus(axis2D: Axis2D, polygon: Polygon2D) -> tuple

Calculate intersection between 2D axis and 2D polygon

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points (3D)

Examples:

For square_1 with side length of 2.0 and lower left corner in the origin, and an axis crossing it, the intersection points are:

>>> axis = Axis2D(Point2D(0, 1), Vector2D(1, 0))
>>> IntersectionCalculus(axis, square_1)
(True, [Point3D(2, 1, 0), Point3D(0, 1, 0)])

For an axis tangent to the square, the intersection points are the vertices of the square:

>>> axis = Axis2D(Point2D(0, 2), Vector2D(1, 0))
>>> IntersectionCalculus(axis, square_1)
(True, [Point3D(2, 2, 0), Point3D(0, 2, 0)])
IntersectionCalculus(
    axis2D: Axis2D, spline: Spline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 2D axis and 2D spline

Parameters:

  • axis2D (Axis2D) –

    2D Axis

  • spline (Spline2D) –

    2D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points (3D)

Examples:

spline_1 is a spline with control points (0, 0), (2, 2), (3, 1) and (4, 3). The intersection points with an axis crossing it are:

>>> IntersectionCalculus(
...     Axis2D(Point2D(0, 1.5), Vector2D(1, 0)),
...     spline_1,
...     1e-11, 3)
(True, [Point3D(0.88..., 1.5, 0), Point3D(2.49..., 1.5, 0), Point3D(3.56..., 1.5, 0)])
IntersectionCalculus(
    axis2D: Axis2D, bspline: BSpline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 2D axis and 2D base spline

Parameters:

  • axis2D (Axis2D) –

    2D Axis

  • bspline (BSpline2D) –

    2D BSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points (3D)

IntersectionCalculus(axis1: Axis3D, axis2: Axis3D) -> tuple

Calculate intersection between two 3D axes

Parameters:

  • axis1 (Axis3D) –

    First 3D Axis

  • axis2 (Axis3D) –

    Second 3D Axis

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    Intersection point (origin when not intersecting)

Examples:

>>> IntersectionCalculus(
...     Axis3D(Point3D(0, 0, 0), Vector3D(1, 1,  0)),
...     Axis3D(Point3D(0, 0, 1), Vector3D(1, 1, -1)))
(True, Point3D(1, 1, 0))
IntersectionCalculus(axis: Axis3D, line: Line2D) -> tuple

Calculate intersection between 3D axis and 2D line

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    Intersection point (origin when not intersecting)

Examples:

>>> IntersectionCalculus(
...     Axis3D(Point3D(0, 0, 1), Vector3D(1, 1, -1)),
...     Line2D(0, 0, 2, 2))
(True, Point3D(1, 1, 0))
IntersectionCalculus(axis: Axis3D, arc: Arc2D, eps: float) -> tuple

Calculate intersection between 3D axis and 2D arc

Parameters:

  • axis (Axis3D) –

    3D Axis

  • arc (Arc2D) –

    2D Arc

  • eps (float) –

    precision (not considered in this case)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(axis: Axis3D, polyline: Polyline2D) -> tuple

Calculate intersection between 3D axis and 2D polyline

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(axis: Axis3D, polygon: Polygon2D) -> tuple

Calculate intersection between 3D axis and the outline of a 2D polygon

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

See also examples for 2D axis and a 2D polygon

For an axis hitting the inside of a polygon, but not the outline, the result is False:

>>> axis = Axis3D(Point3D(0, 0, 1), Vector3D(1, 1, -1))
>>> IntersectionCalculus(axis, square_1)
(False, [])
IntersectionCalculus(
    axis: Axis3D, spline: Spline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 3D axis and 2D spline

Parameters:

  • axis (Axis3D) –

    3D Axis

  • spline (Spline2D) –

    2D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(
    axis: Axis3D, spline: Spline3D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 3D axis and 3D spline

Parameters:

  • axis (Axis3D) –

    3D Axis

  • spline (Spline3D) –

    3D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(
    axis: Axis3D, spline: BSpline3D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 3D axis and 3D base spline

Parameters:

  • axis (Axis3D) –

    3D Axis

  • spline (BSpline3D) –

    3D B-Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(axis: Axis3D, plane: Plane3D, eps: float) -> tuple

Calculate intersection between 3D axis and 3D plane

Parameters:

  • axis (Axis3D) –

    3D Axis

  • plane (Plane3D) –

    3D Plane

  • eps (float) –

    Precision used when determining if the axis is parallel to the plane.

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    Intersection point (origin when not intersecting)

Examples:

>>> IntersectionCalculus(
...     Axis3D(Point3D(0, 0, 1), Vector3D(1, 1, -1)),
...     Plane3D(Point3D(0, 0, 0), Vector3D(0, 0, 1)),
...     1e-11)
(True, Point3D(1, 1, 0))
IntersectionCalculus(line: Line3D, plane: Plane3D, eps: float) -> tuple

Calculate intersection between 3D line and 3D plane

Parameters:

  • line (Line3D) –

    3D Line

  • plane (Plane3D) –

    3D Plane

  • eps (float) –

    Precision used when determining if the line is parallel to the plane.

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    Intersection point (origin when not intersecting)

Examples:

>>> IntersectionCalculus(
...     Line3D(Point3D(0, 0, 1), Point3D(1, 1, -1)),
...     Plane3D(Point3D(0, 0, 0), Vector3D(0, 0, 1)),
...     1e-11)
(True, Point3D(0.5, 0.5, 0))

For a line not hitting the plane, the result is False, but the intersection point is still calculated (as long as non-parallel):

>>> IntersectionCalculus(
...     Line3D(Point3D(0, 0, 2), Point3D(1, 1, 1)),
...     Plane3D(Point3D(0, 0, 0), Vector3D(0, 0, 1)),
...     1e-11)
(False, Point3D(2, 2, 0))
IntersectionCalculus(axis: Axis3D, arc: Arc3D, eps: float) -> tuple

Calculate intersection between 3D axis and a 3D arc

Parameters:

  • axis (Axis3D) –

    3D Axis

  • arc (Arc3D) –

    3D Arc

  • eps (float) –

    Precision (not considered in this case)

Returns:

  • tuple

    True when at least one intersection found, False otherwise

  • tuple

    List of intersection points

Examples:

For arc_3 being a 90° arc in XY plane with a radius of 1.0 and center in (0, 0, 0), the intersection point is calculated like:

>>> axis = Axis3D(Point3D(0, 0.5, 0), Vector3D(1, 0, 0))
>>> IntersectionCalculus(axis, arc_3, 1e-11)
(True, [Point3D(0.866..., 0.5, 0)])
IntersectionCalculus(line: Line3D, arc: Arc3D, eps: float) -> tuple

Calculate intersection between 3D line and 3D arc

Parameters:

  • line (Line3D) –

    3D Line

  • arc (Arc3D) –

    3D Arc

  • eps (float) –

    Precision (not considered in this case)

Returns:

  • tuple

    True when at least one intersection found, False otherwise

  • tuple

    List of intersection points

Examples:

For arc_3 being a 90° arc in XY plane with a radius of 1.0 and center in (0, 0, 0), the intersection point is calculated like:

>>> line = Line3D(Point3D(0, 0.5, 0), Point3D(1, 0.5, 0))
>>> IntersectionCalculus(line, arc_3, 1e-11)
(True, [Point3D(0.866..., 0.5, 0)])
IntersectionCalculus(el1: Line2D, el2: Line2D) -> tuple

Calculate intersection between two 2D lines

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    Intersection point

Examples:

>>> IntersectionCalculus(
...     Line2D(0, 0, 1, 1),
...     Line2D(0, 1, 1, 0))
(True, Point2D(0.5, 0.5))

For non-intersecting non-parellel lines, the result is False, but the intersection point (of line extensions) is still calculated:

>>> IntersectionCalculus(
...     Line2D(2, 2, 3, 3),
...     Line2D(0, 1, 1, 0))
(False, Point2D(0.5, 0.5))
IntersectionCalculus(line2D: Line2D, line3D: Line3D) -> tuple

Calculate intersection between 2D line and 3D line

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    Intersection point

Examples:

>>> IntersectionCalculus(
...     Line2D(Point2D(0, 0), Point2D(1, 1)),
...     Line3D(Point3D(0, 0, -1), Point3D(1, 1, 1)))
(True, Point3D(0.5, 0.5, 0))

For non-intersecting lines, whose extensions do intersect, the result is False, but the intersection point is still calculated:

>>> IntersectionCalculus(
...     Line2D(Point2D(2, 2), Point2D(3, 3)),
...     Line3D(Point3D(0, 0, -1), Point3D(1, 1, 1)))
(False, Point3D(0.5, 0.5, 0))
IntersectionCalculus(line2D: Line2D, arc2D: Arc2D, eps: float) -> tuple

Calculate intersection between 2D line and 2D arc

Parameters:

  • line2D (Line2D) –

    2D Line

  • arc2D (Arc2D) –

    2D Arc

  • eps (float) –

    precision (not considered in this case)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points (3D)

Examples:

For arc_1 being a 90° arc with a radius of 1.0, the intersection point is calculated like:

>>> IntersectionCalculus(Line2D(-1, -1, 1, 1), arc_1, 1e-11)
(True, [Point3D(0.707..., 0.707..., 0)])

For a circle, two intersection points are found:

>>> IntersectionCalculus(Line2D(-1, -1, 1, 1), circle_1, 1e-11)
(True, [Point3D(0.707..., 0.707..., 0), Point3D(-0.707..., -0.707..., 0)])
IntersectionCalculus(line2D: Line2D, polyline: Polyline2D) -> tuple

Calculate intersection between 2D line and 2D polyline

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of all intersection points (3D)

Examples:

>>> IntersectionCalculus(
...     Line2D(-2, 1, 2, 1),
...     Polyline2D([Point2D(-2, 0), Point2D(0, 2), Point2D(2, 0)]))
(True, [Point3D(-1, 1, 0), Point3D(1, 1, 0)])
IntersectionCalculus(line2D: Line2D, polygon: Polygon2D) -> tuple

Calculate intersection between 2D line and 2D polygon

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of all intersection points (3D)

Examples:

For square_1 with side length of 2.0 and lower left corner in the origin, and a line crossing it, the intersection points are:

>>> IntersectionCalculus(Line2D(-1, 1, 3, 1), square_1)
(True, [Point3D(2, 1, 0), Point3D(0, 1, 0)])

For a line tangent to the square, the intersection points are the vertices of the square:

>>> IntersectionCalculus(Line2D(-1, 2, 3, 2), square_1)
(True, [Point3D(2, 2, 0), Point3D(0, 2, 0)])
IntersectionCalculus(
    line: Line2D, bspline: BSpline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 2D line and 2D base spline

Parameters:

  • line (Line2D) –

    2D Line

  • bspline (BSpline2D) –

    2D BSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points (3D)

IntersectionCalculus(
    line2D: Line2D, spline: Spline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 2D line and 2D spline

Parameters:

  • line2D (Line2D) –

    2D Line

  • spline (Spline2D) –

    2D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points (3D)

Examples:

spline_1 has control points in (0, 0), (2, 2), (3, 1) and (4, 3). The intersection points with a line crossing the spline are:

>>> IntersectionCalculus(Line2D(-1, 1, 5, 2), spline_1, 1e-11, 3)
(True, [Point3D(0.73..., 1.28..., 0), Point3D(2.43..., 1.57..., 0), Point3D(3.66..., 1.77..., 0)])
IntersectionCalculus(line1: Line3D, line2: Line3D) -> tuple

Calculate intersection between two 3D lines

Parameters:

  • line1 (Line3D) –

    First 3D Line

  • line2 (Line3D) –

    Second 3D Line

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    Intersection point

Examples:

>>> IntersectionCalculus(
...     Line3D(Point3D(0, 0, 0), Point3D(1, 1, 1)),
...     Line3D(Point3D(0, 1, 0), Point3D(1, 0, 1)))
(True, Point3D(0.5, 0.5, 0.5))

For non-intersecting lines, whose extension do intersect, the result is False, but the intersection point (of line extensions) is still calculated:

>>> IntersectionCalculus(
...     Line3D(Point3D(0, 0, 0), Point3D(2, 2, 0)),
...     Line3D(Point3D(0, 0, 3), Point3D(1, 1, 1)))
(False, Point3D(1.5, 1.5, 0))
IntersectionCalculus(line: Line3D, arc: Arc2D, eps: float) -> tuple

Calculate intersection between 3D line and 2D arc

Parameters:

  • line (Line3D) –

    3D Line

  • arc (Arc2D) –

    2D Arc

  • eps (float) –

    precision (not considered in this case)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

For arc_1 being a 90° arc with a radius of 1.0, the intersection point is calculated like:

>>> IntersectionCalculus(
...     Line3D(Point3D(0, 0, 0), Point3D(1, 1, 0)),
...     arc_1, 1e-11)
(True, [Point3D(0.707..., 0.707..., 0)])
IntersectionCalculus(line: Line3D, polyline: Polyline2D) -> tuple

Calculate intersection between 3D line and 2D polyline

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of all intersection points

Examples:

>>> IntersectionCalculus(
...     Line3D(Point3D(-2, 1, 0), Point3D(2, 1, 0)),
...     Polyline2D([Point2D(-2, 0), Point2D(0, 2), Point2D(2, 0)]))
(True, [Point3D(-1, 1, 0), Point3D(1, 1, 0)])
IntersectionCalculus(line: Line3D, polygon: Polygon2D) -> tuple

Calculate intersection between 3D line and 2D polygon

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of all intersection points

Examples:

For square_1 with side length of 2.0 and lower left corner in the origin, and a line crossing it, the intersection points are:

>>> IntersectionCalculus(
...     Line3D(Point3D(-1, 1, 0), Point3D(3, 1, 0)),
...     square_1)
(True, [Point3D(2, 1, 0), Point3D(0, 1, 0)])

For a line tangent to the square, the intersection points are the vertices of the square:

>>> IntersectionCalculus(
...     Line3D(Point3D(-1, 2, 0), Point3D(3, 2, 0)),
...     square_1)
(True, [Point3D(2, 2, 0), Point3D(0, 2, 0)])
IntersectionCalculus(
    line: Line3D, spline: Spline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 3D line and 2D spline

Parameters:

  • line (Line3D) –

    3D Line

  • spline (Spline2D) –

    2D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

spline_1 has control points in (0, 0), (2, 2), (3, 1) and (4, 3). The intersection points with a line crossing the spline are:

>>> IntersectionCalculus(
...     Line3D(Point3D(-1, 1, 0), Point3D(5, 2, 0)), 
...     spline_1,
...     1e-11, 3)
(True, [Point3D(0.73..., 1.28..., 0), Point3D(2.43..., 1.57..., 0), Point3D(3.66..., 1.77..., 0)])
IntersectionCalculus(
    line: Line3D, spline: Spline3D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 3D line and 3D cubic spline

Parameters:

  • line (Line3D) –

    3D Line

  • spline (Spline3D) –

    3D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

spline_2 is a cubic spline with control points in (0, 0, 0), (1, 1, 1), (2, 0, 2) and (3, 1, 3). The intersection points with a line crossing the spline are:

>>> IntersectionCalculus(
...     Line3D(Point3D(0, 0.5, 0), Point3D(4, 0.5, 4)),
...     spline_2,
...     1e-11, 3)
(True, [Point3D(0.31..., 0.5..., 0.31...), Point3D(1.5..., 0.499..., 1.5...), Point3D(2.68..., 0.499..., 2.68...)])
IntersectionCalculus(
    line: Line3D, bspline: BSpline3D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 3D line and a 3D base spline

Parameters:

  • line (Line3D) –

    3D Line

  • bspline (BSpline3D) –

    3D BSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

When b_spline is a non-uniform, rational 2nd degree base spline with 3 control points in (0,0,0), (1,1,1) and (2,0,2), the intersection points with a line are:

>>> IntersectionCalculus(
...     Line3D(Point3D(0, 0.2, 0), Point3D(2, 0.2, 2)),
...     b_spline, 1e-11, 2)
(True, [Point3D(0.225..., 0.2..., 0.225...), Point3D(1.77..., 0.2..., 1.77...)])
IntersectionCalculus(arc1: Arc2D, arc2: Arc2D) -> tuple

Calculate intersection between two 2D arcs

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

circle_1 is a circle with radius 1.0 and center in the origin. The intersection points with circle_2 with radius 0.5 and center in (1, 1) are:

>>> IntersectionCalculus(circle_1, circle_2)
(True, [Point3D(0.85..., 0.52..., 0), Point3D(0.52..., 0.85..., 0)])

For two tangent circles, one intersection point is found:

>>> circle_2.Center = Point2D(1.5, 0)
>>> IntersectionCalculus(circle_1, circle_2)
(True, [Point3D(1, 0, 0)])
IntersectionCalculus(arc: Arc2D, polyline: Polyline2D, eps: float) -> tuple

Calculates the intersection between 2D arc and a 2D polyline

Parameters:

  • arc (Arc2D) –

    2D Arc

  • polyline (Polyline2D) –

    2D Polyline

  • eps (float) –

    precision

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points (3D)

Examples:

For arc_1 being a 90° arc with a radius of 1.0, the intersection point is calculated like:

>>> IntersectionCalculus(
...     arc_1,
...     Polyline2D([Point2D(0.5, 1), Point2D(0, 0), Point2D(1, 0.5)]),
...     1e-11)
(True, [Point3D(0.447..., 0.894..., 0), Point3D(0.894..., 0.447..., 0)])
IntersectionCalculus(
    arc: Arc2D, polygon: Polygon2D, intersectionPnts: float
) -> tuple

Calculate intersection points between a 2D arc and the outline of a 2D polygon

Parameters:

  • arc (Arc2D) –

    2D Arc

  • polygon (Polygon2D) –

    2D Polygon

  • intersectionPnts (float) –

    Vector which includes all resulting intersection points

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points (3D)

Examples:

circle_1 is a circle with radius 1.0 and center in the origin. The intersection points with square_1 with side length of 2.0 and lower left corner in the origin are:

>>> IntersectionCalculus(circle_1, square_1, 1e-11)
(True, [Point3D(1, 0, 0), Point3D(0, 1, 0)])
IntersectionCalculus(
    arc: Arc2D, spline: Spline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 2D arc and 2D spline

Parameters:

  • arc (Arc2D) –

    2D Arc

  • spline (Spline2D) –

    2D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

spline_1 is a spline with control points (0, 0), (2, 2), (3, 1) and (4, 3). The intersection points with a 90° arc with a radius of 1.0 are:

>>> IntersectionCalculus(arc_1, spline_1, 1e-6, 1)
(True, [Point3D(0.479..., 0.877..., 0)])
IntersectionCalculus(
    arc: Arc2D, bspline: BSpline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 2D arc and 2D base spline

Parameters:

  • arc (Arc2D) –

    2D Arc

  • bspline (BSpline2D) –

    2D BSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(
    arc: Arc3D, arc2: Arc3D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between two 3D arcs

Parameters:

  • arc (Arc3D) –

    First 3D Arc

  • arc2 (Arc3D) –

    Second 3D Arc

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(
    arc: Arc3D, spline: Spline3D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 3D arc and 3D cubic spline

Parameters:

  • arc (Arc3D) –

    3D Arc

  • spline (Spline3D) –

    3D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(
    arc: Arc3D, bspline: BSpline3D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 3D arc and 3D base spline

Parameters:

  • arc (Arc3D) –

    3D Arc

  • bspline (BSpline3D) –

    3D BSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(polyline1: Polyline2D, polyline2: Polyline2D) -> tuple

Calculate intersection between two 2D polylines

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

>>> IntersectionCalculus(
...     Polyline2D([Point2D(-2, 0), Point2D(0, 2), Point2D(2, 0)]),
...     Polyline2D([Point2D(-2, 2), Point2D(0, 0), Point2D(2, 2)]))
(True, [Point3D(-1, 1, 0), Point3D(1, 1, 0)])
IntersectionCalculus(polyline: Polyline2D, polygon: Polygon2D) -> tuple

Calculate intersection between 2D polyline and 2D polygon outline

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

For square_1 with side length of 2.0 and lower left corner in the origin, and a polyline crossing it, the intersection points are:

>>> IntersectionCalculus(
...     Polyline2D([Point2D(-1, 1), Point2D(1, 1), Point2D(2, 3)]),
...     square_1)
(True, [Point3D(0, 1, 0), Point3D(1.5, 2, 0)])
IntersectionCalculus(polygon1: Polygon2D, polygon2: Polygon2D) -> tuple

Calculate intersection points between two 2D polygon outlines

Parameters:

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

For square_1 with side length of 2.0 and lower left corner in the origin, and square_2 with side length of 2.0 and lower left corner in (1.0, 1.0), the intersection points are:

>>> IntersectionCalculus(square_1, square_2)
(True, [Point3D(2, 1, 0), Point3D(1, 2, 0)])
IntersectionCalculus(
    polyline: Polyline2D, spline: Spline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 2D polyline and 2D spline

Parameters:

  • polyline (Polyline2D) –

    First 2D polyline

  • spline (Spline2D) –

    Second 2D spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

spline_1 is a spline with control points (0, 0), (2, 2), (3, 1) and (4, 3). The intersection points with a polyline crossing the spline are:

>>> IntersectionCalculus(
...     Polyline2D([Point2D(1, 1), Point2D(3, 3), Point2D(4, 2)]),
...     spline_1,
...     1e-11, 3)
(True, [Point3D(2, 2, 0), Point3D(3.795..., 2.204..., 0)])
IntersectionCalculus(
    polyline: Polyline2D, spline: BSpline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 2D polyline and 2D base spline

Parameters:

  • polyline (Polyline2D) –

    2D Polyline

  • spline (BSpline2D) –

    2D BSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(
    polyline: Polyline3D, spline: BSpline3D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 3D polyline and a 3D base spline

Parameters:

  • polyline (Polyline3D) –

    3D Polyline

  • spline (BSpline3D) –

    3D BSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

When b_spline is a non-uniform, rational 2nd degree base spline with 3 control points in (0,0,0), (1,1,1) and (2,0,2), the intersection points with a polyline are:

>>> IntersectionCalculus(
...     Polyline3D([Point3D(0.5, 0, 0.5), Point3D(1, 1, 1), Point3D(1.5, 0, 1.5)]),
...     b_spline, 1e-11, 2)
(True, [Point3D(0.732..., 0.464..., 0.732...), Point3D(1.267..., 0.464..., 1.267...)])
IntersectionCalculus(
    polygon: Polygon2D, spline: Spline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 2D polygon outline and a 2D spline

Parameters:

  • polygon (Polygon2D) –

    First 2D polygon

  • spline (Spline2D) –

    Second 2D spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points (3D)

Examples:

For square_2 with side length of 2.0 and lower left corner in (1.0, 1.0), and a spline_1 with control points (0, 0), (2, 2), (3, 1) and (4, 3), the intersection points are:

>>> IntersectionCalculus(square_2, spline_1, 1e-11, 3)
(True, [Point3D(3, 1, 0), Point3D(1, 1.65..., 0)])
IntersectionCalculus(plane: Plane3D, line: Line3D, eps: float) -> tuple

Calculate intersection between 3D plane and a 3D line

Parameters:

  • plane (Plane3D) –

    3D plane

  • line (Line3D) –

    3D line

  • eps (float) –

    Tolerance

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List with the intersection point (empty list when not intersecting)

Examples:

>>> IntersectionCalculus(
...     Plane3D(Point3D(0, 0, 0), Vector3D(1, 1, 3)),
...     Line3D(Point3D(0, 0, 3), Point3D(1, 2, -3)),
...     1e-11)
(True, [Point3D(0.6, 1.2, -0.6)])

When a line points towards the plane, but does not intersect it, the result is False and (unlike for lines) no intersection point is calculated:

>>> IntersectionCalculus(
...     Plane3D(Point3D(0, 0, 0), Vector3D(1, 1, 3)),
...     Line3D(Point3D(0, 0, 3), Point3D(1, 2, 0)),
...     1e-11)
(False, [])
IntersectionCalculus(plane: Plane3D, line: Polyline3D, eps: float) -> tuple

Calculate intersection between 3D plane and a 3D polyline

Parameters:

  • plane (Plane3D) –

    3D plane

  • line (Polyline3D) –

    3D polyline

  • eps (float) –

    Tolerance

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

>>> IntersectionCalculus(
...     Plane3D(Point3D(0, 0, 0), Vector3D(0, 0, 1)),
...     Polyline3D([Point3D(-2, -2, 1), Point3D(0, 0, -1), Point3D(2, 2, 4)]),
...     1e-11)
(True, [Point3D(-1, -1, 0), Point3D(0.4, 0.4, 0)])
IntersectionCalculus(plane: Plane3D, arc: Arc3D, eps: float) -> tuple

Calculate intersection between 3D plane and a 3D arc

Parameters:

  • plane (Plane3D) –

    3D plane

  • arc (Arc3D) –

    3D arc

  • eps (float) –

    Tolerance

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

For arc_3 being a 90° arc in XY plane with a radius of 1.0 and center in (0, 0, 0), the intersection point is calculated like:

>>> IntersectionCalculus(
...     Plane3D(Point3D(0, 0, 0), Vector3D(2, -1, 0)),
...     arc_3, 1e-11)
(True, [Point3D(0.447..., 0.894..., 0)])
IntersectionCalculus(
    plane: Plane3D, spline: Spline3D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 3D plane and a 3D cubic spline

Parameters:

  • plane (Plane3D) –

    3D plane

  • spline (Spline3D) –

    3D spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

spline_2 is a cubic spline with control points in (0, 0, 0), (1, 1, 1), (2, 0, 2) and (3, 1, 3). The intersection points with a plane are:

>>> IntersectionCalculus(
...     Plane3D(Point3D(0, 0.2, 0), Vector3D(-1, 3, 0)),
...     spline_2,
...     1e-11, 3)
(True, [Point3D(0.151..., 0.250..., 0.151...), Point3D(1.37..., 0.659..., 1.37...)])
IntersectionCalculus(
    spline1: Spline2D, spline2: Spline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between two 2D cubic splines

Parameters:

  • spline1 (Spline2D) –

    First 2D spline

  • spline2 (Spline2D) –

    Second 2D spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

Examples:

spline_1 and spline_3 are cubic splines with control points in (0, 0), (2, 2), (3, 1) and (4, 3), and (0, 3), (1, 1), (2, 2) and (4, 1), respectively. The intersection points are:

>>> IntersectionCalculus(spline_1, spline_3, 1e-6, 3)
(True, [Point3D(0.638..., 1.14..., 0), Point3D(2, 2, 0), Point3D(2, 2, 0)])
IntersectionCalculus(
    spline1: Spline2D, spline2: Spline3D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 2D cubic spline and 3D cubic spline

Parameters:

  • spline1 (Spline2D) –

    First 2D spline

  • spline2 (Spline3D) –

    Second 3D spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(
    spline1: Spline3D, spline2: Spline3D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between two 3D cubic splines

Parameters:

  • spline1 (Spline3D) –

    3D Spline

  • spline2 (Spline3D) –

    3D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(
    spline1: Spline2D, spline2: BSpline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 2D cubic spline and 2D base spline

Parameters:

  • spline1 (Spline2D) –

    2D Spline

  • spline2 (BSpline2D) –

    2D BSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(
    spline1: Spline3D, spline2: BSpline3D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between 3D cubic spline and 3D base spline

Parameters:

  • spline1 (Spline3D) –

    3D Spline

  • spline2 (BSpline3D) –

    3D BSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(
    spline1: BSpline2D, spline2: BSpline2D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between two 2D base splines

Parameters:

  • spline1 (BSpline2D) –

    2D BSpline

  • spline2 (BSpline2D) –

    2D BSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(
    spline1: BSpline3D, spline2: BSpline3D, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between two 3D base splines

Parameters:

  • spline1 (BSpline3D) –

    3D BSpline

  • spline2 (BSpline3D) –

    3D BSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    maximum number of solutions (for reserving memory)

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculus(
    ele1: object, ele2: object, eps: float, maxSolutions: int
) -> tuple

Calculate intersection between two geometries

See other overloads for specific geometry types.

Parameters:

  • ele1 (object) –

    First element

  • ele2 (object) –

    Second element

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution

Returns:

  • tuple

    True when intersecting, False otherwise

  • tuple

    List of intersection points

IntersectionCalculusEx overloaded

IntersectionCalculusEx(axis2D: Axis2D, arc2D: Arc2D, eps: float) -> tuple

Calculate the intersection between a 2D axis and a 2D arc Intersection point must not be located on the elements, it can be outside

emarks There are known precision issues with the background function lksplk

Args:
    axis2D: 2D Axis
    arc2D:  2D Arc
    eps:    precision

Returns:
    true, if an intersection was found, otherwise false,
    Vector which includes all resulting intersection points
IntersectionCalculusEx(axis2D: Axis2D, polyline: Polyline2D) -> tuple

Calculate the intersection between a 2D axis and a 2D polyline Intersection point must not be located on the elements, it can be outside

Parameters:

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(axis2D: Axis2D, polygon: Polygon2D) -> tuple

Calculate the intersection between a 2D axis and a 2D polygon Intersection point must not be located on the elements, it can be outside

Parameters:

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    axis2D: Axis2D, clothoid2D: Clothoid2D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 2D axis and a 2D clothoid Intersection point must not be located on the elements, it can be outside

Parameters:

  • axis2D (Axis2D) –

    2D axis

  • clothoid2D (Clothoid2D) –

    2D Clothoid

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(axis: Axis3D, arc: Arc2D, eps: float) -> tuple

Calculate the intersection between a 3D axis and a 2D arc Intersection point must not be located on the elements, it can be outside

emarks There are known precision issues with the background function lksplk

Args:
    axis: 3D Axis
    arc:  2D Arc
    eps:  precision

Returns:
    true, if an intersection was found, otherwise false,
    Vector which includes all resulting intersection points
IntersectionCalculusEx(axis: Axis3D, polyline: Polyline2D) -> tuple

Calculate the intersection between a 3D axis and a 2D polyline Intersection point must not be located on the elements, it can be outside

Parameters:

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(axis: Axis3D, polygon: Polygon2D) -> tuple

Calculate the intersection between a 3D axis and a 2D polygon Intersection point must not be located on the elements, it can be outside

Parameters:

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(line1: Line2D, line2: Line2D) -> tuple

Calculate the intersection between two 2D lines. Intersection point must not be located on the elements, it can be outside

Parameters:

  • line1 (Line2D) –

    First 2D Line

  • line2 (Line2D) –

    Second 2D Line

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Resulting intersection point

IntersectionCalculusEx(line2D: Line2D, line3D: Line3D) -> tuple

Calculate the intersection between a 2D and a 3D line Intersection point must not be located on the elements, it can be outside

Parameters:

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Resulting intersection point

IntersectionCalculusEx(line2D: Line2D, arc2D: Arc2D, eps: float) -> tuple

Calculate the intersection between a 2D line and a 2D arc Intersection point must not be located on the elements, it can be outside

emarks There are known precision issues with the background function lksplk

Args:
    line2D: 2D Line
    arc2D:  2D Arc
    eps:    precision

Returns:
    true, if an intersection was found, otherwise false,
    Vector which includes all resulting intersection points
IntersectionCalculusEx(
    line2D: Line2D, clothoid2D: Clothoid2D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 2D line and a 2D clothoid Intersection point must not be located on the elements, it can be outside

Parameters:

  • line2D (Line2D) –

    2D Line

  • clothoid2D (Clothoid2D) –

    2D Clothoid

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(line2D: Line2D, polyline: Polyline2D) -> tuple

Calculate the intersection between a 2D line and a 2D polyline Intersection point must not be located on the elements, it can be outside

Parameters:

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(line2D: Line2D, polygon: Polygon2D) -> tuple

Calculate the intersection between a 2D line and a 2D polygon Intersection point must not be located on the elements, it can be outside

Parameters:

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    line2D: Line2D, spline: Spline2D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 2D line and a 2D spline Intersection point must not be located on the elements, it can be outside

Parameters:

  • line2D (Line2D) –

    2D Line

  • spline (Spline2D) –

    2D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    line2D: Line2D, spline: Spline3D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 2D line and a 3D spline Intersection point must not be located on the elements, it can be outside

ote 2D line is converted to 3D line and calculation between 3D line and 3D spline is called

Parameters:

  • line2D (Line2D) –

    2D Line

  • spline (Spline3D) –

    3D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    line2D: Line2D, bspline: BSpline2D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 2D line and a 2D bspline Intersection point must not be located on the elements, it can be outside

Parameters:

  • line2D (Line2D) –

    2D Line

  • bspline (BSpline2D) –

    2D BSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(line1: Line3D, line2: Line3D) -> tuple

Calculate the intersection between two 3D line Intersection point must not be located on the elements, it can be outside

Parameters:

  • line1 (Line3D) –

    First 3D Line

  • line2 (Line3D) –

    Second 3D Line

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Resulting intersection point

IntersectionCalculusEx(line: Line3D, arc: Arc2D, eps: float) -> tuple

Calculate the intersection between a 3D line and a 2D arc Intersection point must not be located on the elements, it can be outside

emarks There are known precision issues with the background function lksplk

Args:
    line: 3D Line
    arc:  2D Arc
    eps:  precision

Returns:
    true, if an intersection was found, otherwise false,
    Vector which includes all resulting intersection points
IntersectionCalculusEx(line: Line3D, arc: Arc3D, eps: float) -> tuple

Calculate the intersection between a 3D line and a 3D arc Intersection point must not be located on the elements, it can be outside

Parameters:

  • line (Line3D) –

    3D Line

  • arc (Arc3D) –

    3D Arc

  • eps (float) –

    precision

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    line: Line3D, clothoid: Clothoid2D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 3D line and a 2D clothoid Intersection point must not be located on the elements, it can be outside

Parameters:

  • line (Line3D) –

    3D Line

  • clothoid (Clothoid2D) –

    2D Clothoid

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solutions (Defines the maximum size of the solution vector)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(line: Line3D, polyline: Polyline2D) -> tuple

Calculate the intersection between a 3D line and a 2D polyline Intersection point must not be located on the elements, it can be outside

Parameters:

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(line: Line3D, polygon: Polygon2D) -> tuple

Calculate the intersection between a 3D line and a 2D polygon Intersection point must not be located on the elements, it can be outside

Parameters:

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    line: Line3D, spline: Spline2D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 3D line and a 2D spline Intersection point must not be located on the elements, it can be outside

Parameters:

  • line (Line3D) –

    3D Line

  • spline (Spline2D) –

    2D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    line: Line3D, spline: Spline3D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 3D line and a 3D spline Intersection point must not be located on the elements, it can be outside

Parameters:

  • line (Line3D) –

    3D Line

  • spline (Spline3D) –

    3D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    line: Line3D, spline: BSpline3D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 3D line and a 3D bspline Intersection point must not be located on the elements, it can be outside

Parameters:

  • line (Line3D) –

    3D Line

  • spline (BSpline3D) –

    3D BSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(arc1: Arc2D, arc2: Arc2D) -> tuple

Calculate the intersection between two arcs Intersection point must not be located on the elements, it can be outside

Parameters:

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    arc: Arc2D, clothoid: Clothoid2D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 2D arc and a 2D clothoid Intersection point must not be located on the elements, it can be outside

emarks There are known precision issues with the background function kurve6 which is only correct for circles

Args:
    arc:          2D Arc
    clothoid:     2D Clothoid
    eps:          Tolerance
    maxSolutions: Maximum number of solution (especially for splines and clothoids)

Returns:
    true, if an intersection was found, otherwise false,
    Vector which includes all resulting intersection points
IntersectionCalculusEx(arc: Arc2D, polyline: Polyline2D, eps: float) -> tuple

Calculate the intersection between a 2D arc and a 2D polyline Intersection point must not be located on the elements, it can be outside

emarks There are known precision issues with the background function lksplk

Args:
    arc:      2D Arc
    polyline: 2D Polyline
    eps:      precision

Returns:
    true, if an intersection was found, otherwise false,
    Vector which includes all resulting intersection points
IntersectionCalculusEx(
    arc: Arc2D, polygon: Polygon2D, intersectionPnts: float
) -> tuple

Calculate the intersection between a 2D arc and a 2D polygon Intersection point must not be located on the elements, it can be outside

emarks There are known precision issues with the background function lksplk

Args:
    arc:              2D Arc
    polygon:          2D Polygon
    intersectionPnts: Vector which includes all resulting intersection points

Returns:
    true, if an intersection was found, otherwise false,
    precision
IntersectionCalculusEx(
    arc: Arc2D, spline: Spline2D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 2D arc and a 2D spline Intersection point must not be located on the elements, it can be outside

Parameters:

  • arc (Arc2D) –

    2D Arc

  • spline (Spline2D) –

    2D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    arc: Arc2D, spline: Spline3D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 2D arc and a 3D spline Intersection point must not be located on the elements, it can be outside

ote 2D arc is converted to 3D arc and calculation between 3D arc and 3D spline is called

Parameters:

  • arc (Arc2D) –

    2D Arc

  • spline (Spline3D) –

    3D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    arc1: Arc3D, arc2: Arc3D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between two arcs Intersection point must not be located on the elements, it can be outside

Parameters:

  • arc1 (Arc3D) –

    3D Arc

  • arc2 (Arc3D) –

    3D Arc

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    arc: Arc3D, spline: Spline3D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 3D arc and a 3D spline Intersection point must not be located on the elements, it can be outside

Parameters:

  • arc (Arc3D) –

    3D Arc

  • spline (Spline3D) –

    3D Spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    arc: Arc3D, spline: BSpline3D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 3D arc and a 3D bspline Intersection point must not be located on the elements, it can be outside

Parameters:

  • arc (Arc3D) –

    3D Arc

  • spline (BSpline3D) –

    3D bSpline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    clothoid: Clothoid2D, polyline: Polyline2D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a clothoid and a polyline Intersection point must not be located on the elements, it can be outside

Parameters:

  • clothoid (Clothoid2D) –

    2D clothoid

  • polyline (Polyline2D) –

    2D polyline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    clothoid: Clothoid2D, polygon: Polygon2D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a clothoid and a 2D polygon Intersection point must not be located on the elements, it can be outside

Parameters:

  • clothoid (Clothoid2D) –

    2D clothoid

  • polygon (Polygon2D) –

    2D polygon

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(polyline1: Polyline2D, polyline2: Polyline2D) -> tuple

Calculate the intersection between two 2D polylines Intersection point must not be located on the elements, it can be outside

Parameters:

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(polygon1: Polygon2D, polygon2: Polygon2D) -> tuple

Calculate the intersection between two 2D polygons Intersection point must not be located on the elements, it can be outside

Parameters:

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    polyline: Polyline2D, spline: Spline2D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 2D polyline and a 2D spline Intersection point must not be located on the elements, it can be outside

Parameters:

  • polyline (Polyline2D) –

    First 2D polyline

  • spline (Spline2D) –

    Second 2D spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    polygon: Polygon2D, spline: Spline2D, eps: float, maxSolutions: int
) -> tuple

Calculate the intersection between a 2D polygon and a 2D spline Intersection point must not be located on the elements, it can be outside

Parameters:

  • polygon (Polygon2D) –

    First 2D polygon

  • spline (Spline2D) –

    Second 2D spline

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IntersectionCalculusEx(
    geoObject1: object,
    geoObject2: object,
    eps: float,
    maxSolutions: int,
    bOnlyInsidePoints: bool,
) -> tuple

Calculate intersections between two geometry objects Intersection points must not be located on the elements, it can be outside

Parameters:

  • geoObject1 (object) –

    First object

  • geoObject2 (object) –

    Second object

  • eps (float) –

    Tolerance

  • maxSolutions (int) –

    Maximum number of solution (especially for splines and clothoids)

  • bOnlyInsidePoints (bool) –

    Intersection points must be on both objects

Returns:

  • tuple

    true, if an intersection was found, otherwise false,

  • tuple

    Vector which includes all resulting intersection points

IsCoplanar overloaded

IsCoplanar(geoVector_object: list) -> tuple[bool, Plane3D]

Check if the 3D geometry objects are coplanar and calculate plane

Parameters:

  • geoVector_object (list) –

    vector of object geometries

Returns:

  • tuple[bool, Plane3D]

    tuple(True if objects are coplanar, false otherwise., result plane - if collinear plane is not valid)

IsCoplanar(
    igeo1_object: object, igeo2_object: object
) -> tuple[bool, Plane3D, bool]

Check if two 3D curved geometry objects are coplanar and calculate plane

Parameters:

  • igeo1_object (object) –

    first object geometry

  • igeo2_object (object) –

    second object geometry

Returns:

  • tuple[bool, Plane3D, bool]

    tuple(True if objects are coplanar, false otherwise., result plane, flag if lines are parallel)

IsCoplanar(plane: Plane3D, geo_object: object) -> bool

Find out if plane and geometry are coplanar

Parameters:

  • plane (Plane3D) –

    Plane3D

  • geo_object (object) –

    objects geometry

Returns:

  • bool

    True, if geometry is lying in the plane otherwise return false.

IsCoplanar(plane: Plane3D, point: Point3D) -> bool

Find out if point lies on plane

Parameters:

Returns:

  • bool

    True, if point lies on plane otherwise return false.

IsCoplanar(plane: Plane3D, line: Line3D) -> bool

Find out if line lies on plane

Parameters:

Returns:

  • bool

    True, if line lies on plane otherwise return false.

IsCoplanar(plane1: Plane3D, plane2: Plane3D) -> bool

Find out if planes are coplanar

Parameters:

Returns:

  • bool

    True, if planes are coplanar otherwise return false.

IsCoplanar(
    point1: Point3D, point2: Point3D, point3: Point3D, point4: Point3D
) -> bool

Find out if four points are coplanar

Parameters:

Returns:

  • bool

    True, if points are coplanar otherwise return false.

IsCoplanar(line1: Line3D, line2: Line3D) -> bool

Find out if two lines are coplanar

Parameters:

Returns:

  • bool

    True, if lines are coplanar otherwise return false.

IsCoplanar(line1: Line3D, line2: Line3D) -> tuple[bool, Plane3D]

Check if lines are coplanar and calculate plane

Parameters:

Returns:

  • tuple[bool, Plane3D]

    tuple(True, if lines are coplanar., result plane)

MakeBoolean overloaded

make boolean operation between line and polygon

Parameters:

Returns:

Examples:

square_1 have side length of 2.0 and lower left corner in the origin. To make a boolean operation, call:

>>> _err, inside_lines, outside_lines = MakeBoolean(Line2D(-1.0, 1.0, 3.0, 1.0), square_1)
>>> inside_lines
Line2D(0, 1, 2, 1)
>>> outside_lines
Line2D(-1, 1, 0, 1)
Line2D(2, 1, 3, 1)

Make boolean operations (intersection, union and subtraction) between two polygons

Parameters:

Returns:

  • eGeometryErrorCode

    Error code (eOK when boolean operation is successful)

  • Polygon2D

    Polygon resulting from intersection

  • Polygon2D

    Polygon resulting from union

  • Polygon2D

    Polygon resulting from subtraction of element 2 from element 1 (el1 - el2)

  • Polygon2D

    Polygon resulting from subtraction the other way around (el2 - el1)

Examples:

square_1 and square_2 both have side length of 2.0, but the first one has its lower left corner in the origin, and the second in (1.0, 1.0). To perform a boolean operation, call:

>>> _err, intersection, union, subtracted_1, subtracted_2 = MakeBoolean(square_1, square_2)

The result of an intersection is a square with side length of 1.0:

>>> CalcArea(intersection)[0]
1.0

The result of a union is a polygon with 8 edges and a surface area of 7.0:

>>> len(union.GetSegments()[1])
8
>>> CalcArea(union)[0]
7.0

The result of the first subtraction is a polygon with 6 edges and a surface area of 3.0:

>>> subtracted_1.Points
[Point2D(0, 0), Point2D(2, 0), Point2D(2, 1), Point2D(1, 1), Point2D(1, 2), Point2D(0, 2), Point2D(0, 0)]
>>> CalcArea(subtracted_1)[0]
3.0

The result of the second subtraction is a polygon also with 6 edges and a surface area of 3.0:

>>> subtracted_2.Points
[Point2D(2, 2), Point2D(2, 1), Point2D(3, 1), Point2D(3, 3), Point2D(1, 3), Point2D(1, 2), Point2D(2, 2)]
>>> CalcArea(subtracted_2)[0]
3.0

make boolean operation between two 3D bodies

As input arbitrary element which represents 3D is possible.

Throws exception when element is not suitable for booleans

Parameters:

Returns:

MakeIntersection overloaded

MakeIntersection(
    brep1: BRep3D, breps: BRep3DList
) -> tuple[eGeometryErrorCode, BRep3D]

Compute intersection of 2 breps

Parameters:

Returns:

MakeIntersection(brep1: BRep3D, brep2: BRep3D) -> tuple

Deprecated: use Intersect(...)

Parameters:

  • brep1 (BRep3D) –

    first brep

  • brep2 (BRep3D) –

    second brep

Returns:

  • tuple

    error code, eOK if intersection was successful,

  • tuple

    result brep of intersection

MakeIntersection(brep: BRep3D, polyhedron: Polyhedron3D) -> tuple

Deprecated: use Intersect(...)

Parameters:

  • brep (BRep3D) –

    first element - BRep3D

  • polyhedron (Polyhedron3D) –

    second element - Polyhedron3D

Returns:

result BRep3D
MakeIntersection(el1: Polyhedron3D, el2: Polyhedron3D) -> tuple

Deprecated: use Intersect(...)

Parameters:

Returns:

  • tuple

    error code, eOK if intersection was successful,

  • tuple

    resulted polyhedron

MakeSectionWithSurfaces

MakeSectionWithSurfaces(
    brep1: BRep3D, brep2: BRep3D
) -> tuple[eGeometryErrorCode, BRep3DList]

Compute section of brep and surface brep

Parameters:

  • brep1 (BRep3D) –

    first brep

  • brep2 (BRep3D) –

    section brep

Returns:

MakeSubtraction overloaded

make subtraction of 3D bodies from given body

Parameters:

Returns:

  • tuple

    tuple(GeoErrorCode, output 3D body of subtraction)

MakeSubtraction(
    poly1: Polygon2D, poly2: Polygon2D
) -> tuple[eGeometryErrorCode, Polygon2D, Polygon2D]

make subtraction of 2D polygons, if wished intersection is computed too.

Parameters:

Returns:

Examples:

square_1 and square_2 both have side length of 2.0, but the first one has its lower left corner in the origin, and the second in (1.0, 1.0). To ubtract the second one from the first, call:

>>> _err, subtracted_polygon, intersection_polygon = MakeSubtraction(square_1, square_2)

The result is a polygon with 6 edges and a surface area of 3.0:

>>> subtracted_polygon.Points
[Point2D(1, 1), Point2D(1, 2), Point2D(0, 2), Point2D(0, 0), Point2D(2, 0), Point2D(2, 1), Point2D(1, 1)]
>>> CalcArea(subtracted_polygon)[0]
3.0

The second resulting polygon is the intersection of the two: a polygon with 4 edges and a surface area of 1.0:

>>> intersection_polygon.Points
[Point2D(1, 1), Point2D(2, 1), Point2D(2, 2), Point2D(1, 2), Point2D(1, 1)]
>>> CalcArea(intersection_polygon)[0]
1.0
MakeSubtraction(
    polyhed1: Polyhedron3D, polyhed2: Polyhedron3D
) -> tuple[eGeometryErrorCode, Polyhedron3D]

make subtraction of polyhed1 - polyhed2

Parameters:

Returns:

Examples:

cube_1 and cube_2 both have side length of 2.0, but the first one is located in the origin, and the second one is translated by (1.0, 1.0, 1.0). To subtract the second one from the first, call:

>>> _err, resulting_polyhedron = MakeSubtraction(cube_1, cube_2)

The result of the subtraction is a polyhedron with 21 edges and a volume of 7.0:

>>> resulting_polyhedron.GetEdgesCount()
21
>>> CalcMass(resulting_polyhedron)[1]
7.000...
MakeSubtraction(
    brep1: BRep3D, brep2: BRep3D
) -> tuple[eGeometryErrorCode, BRep3D]

Compute subtraction of 2 breps

Parameters:

  • brep1 (BRep3D) –

    first brep

  • brep2 (BRep3D) –

    second brep to be subtracted from the first brep

Returns:

Examples:

cylinder_1 and cylinder_2 both have central axis aligned with Z axis, but the first has radius of 1.0 and height of 2.0, and the second has radius of 2.0 and height of 1.0. To subtract the first one from the second, call:

>>> _err, resulting_brep = MakeSubtraction(cylinder_2, cylinder_1)

The result is a cylinder with a hole in the middle. The resulting brep has 6 edges: 2 lines and 4 circles The total volume is \(4\i - \i = 3\i\).:

>>> [type(edge).__name__ for edge in resulting_brep.GetEdgeParametricCurves()[1]]
['Arc3D', 'Arc3D', 'Line3D', 'Arc3D', 'Arc3D', 'Line3D']
>>> CalcMass(resulting_brep)[1]
9.424...
MakeSubtraction(
    brep1: BRep3D, breps: BRep3DList
) -> tuple[eGeometryErrorCode, BRep3D]

Compute subtraction of brep and vector of breps

Parameters:

  • brep1 (BRep3D) –

    first brep

  • breps (BRep3DList) –

    vector of brep to be subtracted from the first brep

Returns:

MakeSubtraction(
    poly1: Polygon2D, poly2: Polygon2D, intersection: Polygon2D
) -> tuple

Deprecated: use MakeSubtraction(const Polygon2D& poly1, const Polygon2D& poly2)

make subtraction of 2D polygons, if wished intersection is computed too.

Parameters:

  • poly1 (Polygon2D) –

    first polygon

  • poly2 (Polygon2D) –

    second polygon

  • intersection (Polygon2D) –

    output 2D polygon of intersection, as input NULL if not required

Returns:

  • tuple

    Error code (eOK when subtraction is successful)

  • tuple

    Resulting polygon

MakeUnion overloaded

MakeUnion(
    bodies: PolyhedronTypesList, voidbodies: PolyhedronTypesList
) -> tuple

make union of 3D bodies

As input arbitrary elements which represents 3D is possible.

Parameters:

Returns:

  • tuple

    Error code (eOK when union is successful)

  • tuple

    Resulting polyhedron

MakeUnion(
    poly1: Polygon2D, poly2: Polygon2D
) -> tuple[eGeometryErrorCode, Polygon2D]

make union of 2D polygons

Parameters:

Returns:

Examples:

square_1 and square_2 both have side length of 2.0, but the first one has its lower left corner in the origin, and the second in (1.0, 1.0). The result of a union is a polygon with 8 edges and a surface area of 7.0:

>>> _err, resulting_polygon = MakeUnion(square_1, square_2)
>>> len(resulting_polygon.GetSegments()[1])
8
>>> CalcArea(resulting_polygon)[0]
7.0
MakeUnion(
    polyhed1: Polyhedron3D, polyhed2: Polyhedron3D
) -> tuple[eGeometryErrorCode, Polyhedron3D]

make union of 3D polyhedrons

Parameters:

Returns:

Examples:

cube_1 and cube_2 both have side length of 2.0, but the first one is located in the origin, and the second one is translated by (1.0, 1.0, 1.0). The result of a union is a polyhedron with 30 edges and a volume of 15.0:

>>> _err, resulting_polyhedron = MakeUnion(cube_1, cube_2)
>>> resulting_polyhedron.GetEdgesCount()
30
>>> CalcMass(resulting_polyhedron)[1]
15.0
MakeUnion(bodies: Polyhedron3DList) -> tuple[bool, Polyhedron3D]

Compute bulk union of more polyhedra at once

Parameters:

Returns:

  • bool

    True when union is successful, False otherwise

  • Polyhedron3D

    Resulting polyhedron

MakeUnion(brep1: BRep3D, brep2: BRep3D) -> tuple[eGeometryErrorCode, BRep3D]

Compute union of 2 breps

Parameters:

  • brep1 (BRep3D) –

    first brep

  • brep2 (BRep3D) –

    second brep

Returns:

Examples:

cylinder_1 and cylinder_2 both have central axis aligned with Z axis, but the first has radius of 1.0 and height of 2.0, and the second has radius of 2.0 and height of 1.0. The result of a union is a brep in form of two cylinders: bigger on the bottom, and smaller on the top. The total volume is \(\i + 4\i = 5\i\). The resulting brep has 6 edges: 2 lines and 4 circles:

>>> _err, resulting_brep = MakeUnion(cylinder_1, cylinder_2)
>>> CalcMass(resulting_brep)[1]
15.707...
>>> [type(edge).__name__ for edge in resulting_brep.GetEdgeParametricCurves()[1]]
['Arc3D', 'Line3D', 'Arc3D', 'Line3D', 'Arc3D', 'Arc3D']
MakeUnion(
    brep1: BRep3D, breps: BRep3DList
) -> tuple[eGeometryErrorCode, BRep3D]

Compute union of brep and a list of breps

Parameters:

Returns:

MakeUnion(breps: BRep3DList) -> tuple[eGeometryErrorCode, BRep3D]

Compute union of more breps at once (using paralelism if possible)

Parameters:

Returns:

Examples:

In the brep_list there ere two cylinders both having central axis aligned with Z axis, but the first has radius of 1.0 and height of 2.0, and the second has radius of 2.0 and height of 1.0. The result of a union is a brep in form of two cylinders: bigger on the bottom, and smaller on the top. The total volume is \(\i + 4\i = 5\i\). The resulting brep has 6 edges: 2 lines and 4 circles:

>>> brep_list = BRep3DList([cylinder_1, cylinder_2])
>>> _err, resulting_brep = MakeUnion(brep_list)
>>> CalcMass(resulting_brep)[1]
15.707...
>>> [type(edge).__name__ for edge in resulting_brep.GetEdgeParametricCurves()[1]]
['Arc3D', 'Line3D', 'Arc3D', 'Line3D', 'Arc3D', 'Arc3D']

Mirror overloaded

Mirror(point: Point3D, plane: Plane3D) -> Point3D

Mirror point 3D

Parameters:

  • point (Point3D) –

    mirroring point

  • plane (Plane3D) –

    mirror plane

Returns:

Mirror(point: Point3D, axis: Axis2D) -> Point3D

2D Mirror of 3D point

Parameters:

  • point (Point3D) –

    mirroring point

  • axis (Axis2D) –

    mirror plane

Returns:

Mirror(vec: Vector3D, plane: Plane3D) -> Vector3D

Mirror vector 3D

Parameters:

Returns:

Mirror(vec: Vector3D, axis: Axis2D) -> Vector3D

2D mirror of 3D vector

Parameters:

Returns:

Mirror(point: Point2D, plane: Plane3D) -> Point2D

Mirror point 2D

Parameters:

  • point (Point2D) –

    mirroring point 2D

  • plane (Plane3D) –

    mirror plane

Returns:

Mirror(point: Point2D, axis: Axis2D) -> Point2D

2D Mirror of 3D point

Parameters:

  • point (Point2D) –

    mirroring point 2D

  • axis (Axis2D) –

    mirror axis

Returns:

Mirror(vec: Vector2D, plane: Plane3D) -> Vector2D

Mirror vector 2D

Parameters:

Returns:

Mirror(vec: Vector2D, axis: Axis2D) -> Vector2D

2D mirror of 2D vector

Parameters:

Returns:

Mirror(line: Line2D, plane: Plane3D) -> Line2D

Mirror line 2D

Parameters:

  • line (Line2D) –

    mirroring line 2D

  • plane (Plane3D) –

    mirror plane

Returns:

Mirror(line: Line2D, axis: Axis2D) -> Line2D

Mirror line 2D

Parameters:

  • line (Line2D) –

    mirroring line 2D

  • axis (Axis2D) –

    mirror axis

Returns:

Mirror(line: Line3D, plane: Plane3D) -> Line3D

Mirror line 3D

Parameters:

  • line (Line3D) –

    mirroring line 3D

  • plane (Plane3D) –

    mirror plane

Returns:

Mirror(line: Line3D, axis: Axis2D) -> Line3D

2D mirror of 3D line

Parameters:

  • line (Line3D) –

    mirroring line 3D

  • axis (Axis2D) –

    mirror axis

Returns:

Mirror(polyline: Polyline2D, plane: Plane3D) -> Polyline2D

Mirror polyline 2D

Parameters:

Returns:

Mirror(polyline: Polyline2D, axis: Axis2D) -> Polyline2D

2D mirror of 2D polyline

Parameters:

Returns:

Mirror(polygon: Polygon2D, plane: Plane3D) -> Polygon2D

Mirror polygon 2d

Parameters:

Returns:

Mirror(polygon: Polygon2D, axis: Axis2D) -> Polygon2D

Mirror polygon 2d

Parameters:

Returns:

Mirror(plane: Plane3D, axis: Axis2D) -> Plane3D

Mirror plane

Parameters:

  • plane (Plane3D) –

    plane to mirror

  • axis (Axis2D) –

    mirror axis

Returns:

  • Plane3D

    mirrored polygonal area

Mirror(pla: Plane3D, plane: Plane3D) -> Plane3D

Mirror plane

Parameters:

Returns:

  • Plane3D

    mirrored polygonal area

Mirror(polygon: PolygonalArea2D, axis: Axis2D) -> PolygonalArea2D

Mirror polygonal area 2D

Parameters:

Returns:

Mirror(polygon: PolygonalArea3D, axis: Axis2D) -> PolygonalArea3D

Mirror polygonal area 2D

Parameters:

Returns:

Mirror(polygon: PolygonalArea3D, plane: Plane3D) -> PolygonalArea3D

Mirror polygonal area 3D

Parameters:

Returns:

Mirror(polyline: Polyline3D, plane: Plane3D) -> Polyline3D

Mirror polyline 3D

Parameters:

Returns:

Mirror(polyline: Polyline3D, axis: Axis2D) -> Polyline3D

Mirror polyline 3D

Parameters:

Returns:

Mirror(polygon: Polygon3D, plane: Plane3D) -> Polygon3D

Mirror polygon 3D

Parameters:

Returns:

Mirror(polygon: Polygon3D, axis: Axis2D) -> Polygon3D

Mirror polygon 3D

Parameters:

  • polygon (Polygon3D) –

    mirroring polygon 3D

  • axis (Axis2D) –

    mirror axis

Returns:

Mirror(spline: Spline2D, plane: Plane3D) -> Spline2D

Mirror spline 2D

Parameters:

  • spline (Spline2D) –

    mirroring spline 2D

  • plane (Plane3D) –

    mirror plane

Returns:

Mirror(spline: Spline2D, axis: Axis2D) -> Spline2D

Mirror spline 2D

Parameters:

  • spline (Spline2D) –

    mirroring spline 2D

  • axis (Axis2D) –

    mirror axis

Returns:

Mirror(spline: Spline3D, plane: Plane3D) -> Spline3D

Mirror spline 3D

Parameters:

  • spline (Spline3D) –

    mirroring spline 3D

  • plane (Plane3D) –

    mirror plane

Returns:

Mirror(spline: Spline3D, axis: Axis2D) -> Spline3D

Mirror spline 3D

Parameters:

  • spline (Spline3D) –

    mirroring spline 3D

  • axis (Axis2D) –

    mirror axis

Returns:

Mirror(bSpline: BSpline2D, plane: Plane3D) -> BSpline2D

Mirror BSpline 2D

Parameters:

Returns:

Mirror(bSpline: BSpline2D, axis: Axis2D) -> BSpline2D

Mirror BSpline 2D

Parameters:

  • bSpline (BSpline2D) –

    mirroring bSpline 2D

  • axis (Axis2D) –

    mirror axis

Returns:

Mirror(bSpline: BSpline3D, plane: Plane3D) -> BSpline3D

Mirror BSpline 3D

Parameters:

Returns:

Mirror(bSpline: BSpline3D, axis: Axis2D) -> BSpline3D

Mirror BSpline 3D

Parameters:

  • bSpline (BSpline3D) –

    mirroring bSpline 3D

  • axis (Axis2D) –

    mirror axis

Returns:

Mirror(arc: Arc2D, plane: Plane3D) -> Arc2D

Mirror arc 2D

Parameters:

  • arc (Arc2D) –

    mirroring arc 2D

  • plane (Plane3D) –

    mirror plane

Returns:

Mirror(arc: Arc2D, axis: Axis2D) -> Arc2D

Mirror arc 2D

Parameters:

  • arc (Arc2D) –

    mirroring arc 2D

  • axis (Axis2D) –

    mirror axis

Returns:

Mirror(arc: Arc3D, plane: Plane3D) -> Arc3D

Mirror arc 3D

Parameters:

  • arc (Arc3D) –

    mirroring arc 3D

  • plane (Plane3D) –

    mirror plane

Returns:

Mirror(arc: Arc3D, axis: Axis2D) -> Arc3D

Mirror arc 3D

Parameters:

  • arc (Arc3D) –

    mirroring arc 3D

  • axis (Axis2D) –

    mirror axis

Returns:

Mirror(path: Path3D, plane: Plane3D) -> Path3D

Mirror path 3D

Parameters:

  • path (Path3D) –

    mirroring path 3D

  • plane (Plane3D) –

    mirror plane

Returns:

Mirror(path: Path3D, axis: Axis2D) -> Path3D

Mirror path 3D

Parameters:

  • path (Path3D) –

    mirroring path 3D

  • axis (Axis2D) –

    mirror axis

Returns:

Mirror(path: Path2D, plane: Plane3D) -> Path2D

Mirror path 2D

Parameters:

  • path (Path2D) –

    mirroring path 2D

  • plane (Plane3D) –

    mirror plane

Returns:

Mirror(path: Path2D, axis: Axis2D) -> Path2D

Mirror path 2D

Parameters:

  • path (Path2D) –

    mirroring path 2D

  • axis (Axis2D) –

    mirror axis

Returns:

Mirror(area: ClosedArea2D, plane: Plane3D) -> ClosedArea2D

Mirror path bounded area 2D

Parameters:

Returns:

Mirror(area: ClosedArea2D, axis: Axis2D) -> ClosedArea2D

Mirror path bounded area 2D

Parameters:

Returns:

Mirror path bounded area composite 2D

Parameters:

Returns:

Mirror path bounded area composite 2D

Parameters:

Returns:

Mirror(angle: Angle, plane: Plane3D) -> Angle

Mirror angle

Parameters:

  • angle (Angle) –

    mirroring angle

  • plane (Plane3D) –

    mirror plane

Returns:

  • Angle

    mirrored angle

Mirror(angle: Angle, axis: Axis2D) -> Angle

Mirror angle

Parameters:

  • angle (Angle) –

    mirroring angle

  • axis (Axis2D) –

    mirror axis

Returns:

  • Angle

    mirrored angle

Mirror(polyhedron: Polyhedron3D, plane: Plane3D) -> Polyhedron3D

Mirror Polyhedron3D

Parameters:

Returns:

Mirror(polyhedron: Polyhedron3D, axis: Axis2D) -> Polyhedron3D

2D mirror of 3D Polyhedron

Parameters:

Returns:

2D Mirror ClippedSweptSolid3D

Parameters:

Returns:

Mirror ExtrudedAreaSolid3D

Parameters:

Returns:

2D Mirror of ExtrudedAreaSolid3D

Parameters:

Returns:

Mirror(clothoid: Clothoid2D, plane: Plane3D) -> Clothoid2D

Mirror of Clothoid2D

Parameters:

Returns:

Mirror(clothoid: Clothoid2D, axis: Axis2D) -> Clothoid2D

2D Mirror of Clothoid2D

Parameters:

Returns:

Mirror(placement: AxisPlacement2D, axis: Axis2D) -> AxisPlacement2D

2D Mirror AxisPlacement2D

Parameters:

Returns:

Mirror(placement: AxisPlacement2D, plane: Plane3D) -> AxisPlacement2D

3D Mirror AxisPlacement2D

Parameters:

Returns:

Mirror(placement: AxisPlacement3D, axis: Axis2D) -> AxisPlacement3D

2D Mirror AxisPlacement3D

Parameters:

Returns:

Mirror(placement: AxisPlacement3D, plane: Plane3D) -> AxisPlacement3D

3D Mirror AxisPlacement3D

Parameters:

Returns:

Mirror(cylinder: Cylinder3D, plane: Plane3D) -> Cylinder3D

Mirror Cylinder3D

Parameters:

Returns:

Mirror(cylinder: Cylinder3D, axis: Axis2D) -> Cylinder3D

Mirror Cylinder3D

Parameters:

Returns:

Mirror(cone: Cone3D, plane: Plane3D) -> Cone3D

Mirror Cone3D

Parameters:

  • cone (Cone3D) –

    Cone to mirror

  • plane (Plane3D) –

    mirror plane

Returns:

Mirror(cone: Cone3D, axis: Axis2D) -> Cone3D

Mirror Cone3D

Parameters:

  • cone (Cone3D) –

    Cone to mirror

  • axis (Axis2D) –

    mirror axis

Returns:

Mirror(ellipsoid: Ellipsoid3D, plane: Plane3D) -> Ellipsoid3D

Mirror Ellipsoid3D

Parameters:

Returns:

Mirror(ellipsoid: Ellipsoid3D, axis: Axis2D) -> Ellipsoid3D

Mirror Ellipsoid3D

Parameters:

Returns:

Mirror(brep: BRep3D, plane: Plane3D) -> BRep3D

3D Mirror brep3D

Parameters:

Returns:

  • BRep3D

    mirrored placement

Move overloaded

Move(box: BoundingBox2D, translation: Vector2D) -> BoundingBox2D

Move bounding box

Parameters:

Returns:

Move(area: PolygonalArea2D, translation: Vector2D) -> PolygonalArea2D

Move polygonal area

Parameters:

Returns:

Move(plane: Plane3D, translation: Vector3D) -> Plane3D

Move plane

Parameters:

  • plane (Plane3D) –

    Plane3D to move

  • translation (Vector3D) –

    Vector of translation

Returns:

Move(arc2D: Arc2D, moveVector: Vector2D) -> Arc2D

Move Arc2D by given vector

Parameters:

  • arc2D (Arc2D) –

    Arc2D to move

  • moveVector (Vector2D) –

    Vector of translation

Returns:

  • Arc2D

    Arc2D Moved arc

Move(arc3D: Arc3D, moveVector: Vector3D) -> Arc3D

Move Arc3D by given vector

Parameters:

  • arc3D (Arc3D) –

    Arc3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

  • Arc3D

    Arc3D Moved Arc

Move(axis2D: Axis2D, moveVector: Vector2D) -> Axis2D

Move Axis2D by given vector

Parameters:

  • axis2D (Axis2D) –

    Axis2D to move

  • moveVector (Vector2D) –

    Vector of translation

Returns:

  • Axis2D

    Axis2D Moved Axis

Move(axis3D: Axis3D, moveVector: Vector3D) -> Axis3D

Move Axis3D by given vector

Parameters:

  • axis3D (Axis3D) –

    Axis3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

  • Axis3D

    Axis3D Moved axis

Move(axisPlacement2D: AxisPlacement2D, moveVector: Vector2D) -> AxisPlacement2D

Move AxisPlacement2D by given vector

Parameters:

Returns:

Move(axisPlacement3D: AxisPlacement3D, moveVector: Vector3D) -> AxisPlacement3D

Move AxisPlacement3D by given vector

Parameters:

Returns:

Move(
    clippedSweptSolid3D: ClippedSweptSolid3D, vec: Vector3D
) -> ClippedSweptSolid3D

Move ClippedSweptSolid3D by given vector

Parameters:

Returns:

Move(clothoid2D: Clothoid2D, moveVector: Vector2D) -> Clothoid2D

Move Clothoid2D by given vector

Parameters:

  • clothoid2D (Clothoid2D) –

    Clothoid2D to move

  • moveVector (Vector2D) –

    Vector of translation

Returns:

Move(cuboid3D: Cuboid3D, moveVector: Vector3D) -> Cuboid3D

Move Cuboid3D by given vector

Parameters:

  • cuboid3D (Cuboid3D) –

    Cuboid3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

Move(
    extrudedAreaSolid3D: ExtrudedAreaSolid3D, moveVector: Vector3D
) -> ExtrudedAreaSolid3D

Move ExtrudedAreaSolid3D by given vector

Parameters:

Returns:

Move(line2D: Line2D, moveVector: Vector2D) -> Line2D

Move Line2D by given vector

Parameters:

  • line2D (Line2D) –

    Line2D to move

  • moveVector (Vector2D) –

    Vector of translation

Returns:

  • Line2D

    Line2D Moved line

Move(line3D: Line3D, moveVector: Vector3D) -> Line3D

Move Line3D by given vector

Parameters:

  • line3D (Line3D) –

    Line3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

  • Line3D

    Line3D Moved line

Move(path2D: Path2D, moveVector: Vector2D) -> Path2D

Move Path2D by given vector

Parameters:

  • path2D (Path2D) –

    Path2D to move

  • moveVector (Vector2D) –

    Vector of translation

Returns:

  • Path2D

    Path2D Moved path

Move(path3D: Path3D, moveVector: Vector3D) -> Path3D

Move Path3D by given vector

Parameters:

  • path3D (Path3D) –

    Path3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

  • Path3D

    Path3D Moved path

Move(point2D: Point2D, moveVector: Vector2D) -> Point2D

Move Point2D by given vector

Parameters:

  • point2D (Point2D) –

    Point2D to move

  • moveVector (Vector2D) –

    Vector of translation

Returns:

Move(point3D: Point3D, moveVector: Vector3D) -> Point3D

Move Point3D by given vector

Parameters:

  • point3D (Point3D) –

    Point3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

Move(polygon2D: Polygon2D, moveVector: Vector2D) -> Polygon2D

Move Polygon2D by given vector

Parameters:

  • polygon2D (Polygon2D) –

    Polygon2D to move

  • moveVector (Vector2D) –

    Vector of translation

Returns:

Move(polygon3D: Polygon3D, moveVector: Vector3D) -> Polygon3D

Move Polygon3D by given vector

Parameters:

  • polygon3D (Polygon3D) –

    Polygon3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

Move(polygonalArea3D: PolygonalArea3D, moveVector: Vector3D) -> PolygonalArea3D

Move PolygonalArea3D by given vector

Parameters:

Returns:

Move(polyhedron3D: Polyhedron3D, moveVector: Vector3D) -> Polyhedron3D

Move Polyhedron3D by given vector

Throw exception in case of error

Parameters:

  • polyhedron3D (Polyhedron3D) –

    Polyhedron3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

Move(polyline2D: Polyline2D, moveVector: Vector2D) -> Polyline2D

Move Polyline2D by given vector

Parameters:

  • polyline2D (Polyline2D) –

    Polyline2D to move

  • moveVector (Vector2D) –

    Vector of translation

Returns:

Move(polyline3D: Polyline3D, moveVector: Vector3D) -> Polyline3D

Move Polyline3D by given vector

Parameters:

  • polyline3D (Polyline3D) –

    Polyline3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

Move(area: ClosedArea2D, moveVector: Vector2D) -> ClosedArea2D

Move ClosedArea2D by given vector

Parameters:

Returns:

Move ClosedAreaComposite2D by given vector

Parameters:

Returns:

Move(cylinder3D: Cylinder3D, moveVector: Vector3D) -> Cylinder3D

Move Cylinder3D by given vector

Parameters:

  • cylinder3D (Cylinder3D) –

    Cylinder3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

Move(ellipsoid3D: Ellipsoid3D, moveVector: Vector3D) -> Ellipsoid3D

Move Ellipsoid3D by given vector

Parameters:

  • ellipsoid3D (Ellipsoid3D) –

    Ellipsoid3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

Move(cone3D: Cone3D, moveVector: Vector3D) -> Cone3D

Move Cone3D by given vector

Parameters:

  • cone3D (Cone3D) –

    Cone3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

  • Cone3D

    Cone3D Moved Cone

Move(spline2D: Spline2D, moveVector: Vector2D) -> Spline2D

Move Spline2D by given vector

Parameters:

  • spline2D (Spline2D) –

    Spline2D to move

  • moveVector (Vector2D) –

    Vector of translation

Returns:

Move(spline3D: Spline3D, moveVector: Vector3D) -> Spline3D

Move Spline3D by given vector

Parameters:

  • spline3D (Spline3D) –

    Spline3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

Move(bspline3D: BSpline3D, moveVector: Vector3D) -> BSpline3D

Move BSpline3D by given vector

Parameters:

  • bspline3D (BSpline3D) –

    BSpline3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

Move(brep: BRep3D, moveVector: Vector3D) -> BRep3D

Move BRep3D by given vector

Parameters:

  • brep (BRep3D) –

    BRep3D to move

  • moveVector (Vector3D) –

    Vector of translation

Returns:

  • BRep3D

    BRep3D Moved spline

MoveArc3DToZ0Plane

MoveArc3DToZ0Plane(
    arc3D: Arc3D,
) -> tuple[NemAll_Python_GeometryeServiceResult, Arc2D]

Move the given 3D arc on the z = 0 plane and create a 2D fromn it

Parameters:

  • arc3D (Arc3D) –

    Arc 3D

Returns:

  • tuple[NemAll_Python_GeometryeServiceResult, Arc2D]

    tuple(NO_ERR or INVALID_GEOOBJECT, Arc 2D)

MoveSpline3DToZ0Plane

MoveSpline3DToZ0Plane(
    spline3D: Spline3D,
) -> tuple[NemAll_Python_GeometryeServiceResult, Spline2D]

Move the given 3D arc on the z = 0 plane and create a 2D from it

Parameters:

Returns:

  • tuple[NemAll_Python_GeometryeServiceResult, Spline2D]

    tuple(NO_ERR or INVALID_GEOOBJECT, Spline 2D)

Offset overloaded

Offset(
    rDistance: float, geoObjects: list, checkSegmentsOrientation: bool
) -> eGeometryErrorCode

Counts parallel for Chain

If checkSegmentsOrientation is true, new polyline must have same count of points as original

Parameters:

  • rDistance (float) –

    Distances for the Chain

  • geoObjects (list) –

    Source elements and destination elements

  • checkSegmentsOrientation (bool) –

    check, if segments in parallel geometry has same orientation as in original

Returns:

Offset(
    srcElement: object, distance: float
) -> tuple[eGeometryErrorCode, typingAny]

Create a parallel element from the given distance

Parameters:

  • srcElement (object) –

    Source element

  • distance (float) –

    Distances for the points

Returns:

  • eGeometryErrorCode

    Error code (eOK when offset is successful)

  • typingAny

    Resulting element

Examples:

polyline_1 has three points: (0, 0), (1, 1) and (2, 0). To offset it by \(\sqrt{2}\), call:

>>> _err, offset_geometry = Offset(polyline_1, sqrt(2))
>>> offset_geometry.Points
[Point2D(-1, 1), Point2D(1, 3), Point2D(3, 1)]
Offset(point: Point2D, lineSrc: Line2D) -> tuple[eGeometryErrorCode, Line2D]

Calculate a parallel to given 2D line by a point

Parameters:

  • point (Point2D) –

    parallel line will pass through this point

  • lineSrc (Line2D) –

    line to be offset

Returns:

Examples:

>>> Offset(
...     Point2D(2, 3),
...     Line2D(0, 1, 4, 1))[1]
Line2D(0, 3, 4, 3)
Offset(dist: float, lineSrc: Line2D) -> tuple[eGeometryErrorCode, Line2D]

Calculate a parallel to given 2D line by distance

Parameters:

  • dist (float) –

    distance between the original and offset line

  • lineSrc (Line2D) –

    line to be offset

Returns:

Examples:

>>> Offset(
...     sqrt(2),
...     Line2D(0, 0, 3, 3))[1]
Line2D(-1, 1, 2, 4)
Offset(point: Point2D, pathSrc: Path2D) -> tuple[eGeometryErrorCode, Path2D]

Calculate a parallel to given 2D path by a point

Parameters:

  • point (Point2D) –

    parallel path will pass through this point

  • pathSrc (Path2D) –

    path to be offset

Returns:

Offset(
    dist: float, pathSrc: Path2D, checkSegmentsOrientation: bool
) -> tuple[eGeometryErrorCode, Path2D]

Calculate a parallel to given 2D path by distance

Parameters:

  • dist (float) –

    distance between the original and offset path

  • pathSrc (Path2D) –

    path to be offset

  • checkSegmentsOrientation (bool) –

    Whether to check, if segments in parallel path have same orientation as in original. When True, new path must have the same count of points as original.

Returns:

Offset(
    point: Point3D, dist: float, lineSrc: Line3D, offsetPlane: Offset3DPlane
) -> tuple[eGeometryErrorCode, Line3D]

Calculate a parallel to given 3D line by a point or by a distance

The function works in two ways: 1. If the dist is 0, the new parallel line is calculated so that is passes through the point, when projected on the plane given in offsetPlane argument. 2. If the dist is set, the vector between the endpoints of the original and offset line lies in the plane given in offsetPlane argument and has length equal to dist. The point is used only to determine the direction of this vector.

Parameters:

  • point (Point3D) –

    Parallel line will pass through this point

  • dist (float) –

    Distance between the original and offset line

  • lineSrc (Line3D) –

    Line to be offset

  • offsetPlane (Offset3DPlane) –

    Plane on which parallel line will be calculated

Returns:

Examples:

When distance is set to 0, and offset plane to XY, the new line is calculated so that it passes through the point in the projection on XY plane:

>>> Offset(
...     Point3D(0, 1, 0),
...     0,
...     Line3D(Point3D(0, 0, 0), Point3D(3, 3, 3)),
...     Offset3DPlane.eXY)[1]
Line3D(-0.5..., 0.5..., 0, 2.5, 3.5, 3)

When distance is set to a value, the distance between the original and offset line is equal to dist, and the point is used only as a direction indicator:

>>> Offset(
...     Point3D(0, 1, 0),
...     sqrt(2),
...     Line3D(Point3D(0, 0, 0), Point3D(3, 3, 3)),
...     Offset3DPlane.eXY)[1]
Line3D(-1, 1, 0, 2, 4, 3)
Offset(
    dist: float, offsetPlane: Plane3D, parallelsCount: int, polySrc: Polyline3D
) -> tuple[eGeometryErrorCode, Polyline3DList]

Calculate parallels to given 3D polyline by a distance

The function projects the polyline on the plane given in offsetPlane argument and calculates parallel polylines at the distance dist from the projected one. Thus, resulting polyline is planar and lies in offsetPlane.

Parameters:

  • dist (float) –

    Distance between the polySrc projected on offsetPlane and offset polyline

  • offsetPlane (Plane3D) –

    Plane on which offsets will be calculated

  • parallelsCount (int) –

    Count of parallels to calculate

  • polySrc (Polyline3D) –

    Polyline to be offset

Returns:

Examples:

polyline_2 is a polyline with following points: (0, 0, 0), (1, 0, 0), (1, 1, 0) and (1, 1, 1)

A parallel polyline calculated in XY plane (with reference point in the origin) at the distance of 0.5 have only 3 points:

>>> _err, offset_polylines = Offset(0.5, xy_plane, 1, polyline_2)
>>> offset_polylines[0].Points
[Point3D(0, 0.5, 0), Point3D(0.5, 0.5, 0), Point3D(0.5, 1, 0)]
Offset(
    point: Point3D,
    offsetPlane: Plane3D,
    parallelsCount: int,
    polySrc: Polyline3D,
) -> tuple[eGeometryErrorCode, Polyline3DList]

Calculate parallels to given 3D polyline by a point

The function projects the polyline on the plane given in offsetPlane argument and calculates parallel polylines that pass through the point. Thus, resulting polyline is flat and lies in offsetPlane. If point is not on the offsetPlane, it is projected on it.

Parameters:

  • point (Point3D) –

    Parallel polylines will pass through this point

  • offsetPlane (Plane3D) –

    Plane on which offsets will be calculated

  • parallelsCount (int) –

    Count of parallels to calculate

  • polySrc (Polyline3D) –

    Polyline to be offset

Returns:

Examples:

polyline_2 is a polyline with following points: (0, 0, 0), (1, 0, 0), (1, 1, 0) and (1, 1, 1)

A parallel polyline calculated in XY plane (with reference point in the origin) that passes through the point (0.2, 0.5, 0) have only 3 points:

>>> _err, offset_polylines = Offset(Point3D(0, 0.5, 0), xy_plane, 1, polyline_2)
>>> offset_polylines[0].Points
[Point3D(0, 0.5, 0), Point3D(0.5, 0.5, 0), Point3D(0.5, 1, 0)]
Offset(point: Point3D, arc3DSrc: Arc3D) -> tuple[eGeometryErrorCode, Arc3D]

Calculate a parallel to given 3D arc by a point

Parameters:

  • point (Point3D) –

    Parallel arc will pass through this point. If the point is not on the arc's plane, it is projected on it.

  • arc3DSrc (Arc3D) –

    Arc to be offset

Returns:

Examples:

arc_3 is a 90° arc in XY plane with a radius of 1.0 and center in (0, 0, 0). To calculate a parallel arc passing through (0, 0.5, 0), call:

>>> _err, offset_arc = Offset(Point3D(0, 0.5, 0), arc_3)
>>> offset_arc.MajorRadius
0.5
>>> Comparison.Equal(arc_3.Center, offset_arc.Center)
True
Offset(dist: float, arc3DSrc: Arc3D) -> tuple[eGeometryErrorCode, Arc3D]

Calculate a parallel to given 3D arc by a distance

Parameters:

  • dist (float) –

    Distance between the original and offset arc

  • arc3DSrc (Arc3D) –

    Arc to be offset

Returns:

Examples:

arc_3 is a 90° arc in XY plane with a radius of 1.0 and center in (0, 0, 0). To calculate a parallel arc at the distance of 0.5, call:

>>> _err, offset_arc = Offset(0.5, arc_3)
>>> offset_arc.MajorRadius
0.5
>>> Comparison.Equal(arc_3.Center, offset_arc.Center)
True
Offset(point: Point2D, arc2DSrc: Arc2D) -> tuple[eGeometryErrorCode, Arc2D]

Calculate a parallel to given 2D arc by a point

Parameters:

  • point (Point2D) –

    Parallel arc will pass through this point

  • arc2DSrc (Arc2D) –

    Arc to be offset

Returns:

Examples:

arc_1 is a 90° arc with a radius of 1.0 and center in (0, 0). To calculate a parallel arc passing through (0, 0.5), call:

>>> _err, offset_arc = Offset(Point2D(0, 0.5), arc_1)
>>> offset_arc.MajorRadius
0.4999...
>>> Comparison.Equal(arc_1.Center, offset_arc.Center)
True
Offset(dist: float, arc2DSrc: Arc2D) -> tuple[eGeometryErrorCode, Arc2D]

Calculate a parallel to given 2D arc by a distance

Parameters:

  • dist (float) –

    Distance between the original and offset arc

  • arc2DSrc (Arc2D) –

    Arc to be offset

Returns:

Examples:

arc_1 is a 90° arc with a radius of 1.0 and center in (0, 0). To calculate a parallel arc at the distance of 0.5, call:

>>> _err, offset_arc = Offset(0.5, arc_1)
>>> offset_arc.MajorRadius
0.5
>>> Comparison.Equal(arc_1.Center, offset_arc.Center)
True
Offset(
    dist: float, spline2DSrc: Spline2D, checkSegmentsOrientation: bool
) -> tuple[eGeometryErrorCode, Spline2D]

Calculate a parallel spline to given 2D spline by a distance

Parameters:

  • dist (float) –

    Distance between the original and offset spline

  • spline2DSrc (Spline2D) –

    Spline to be offset

  • checkSegmentsOrientation (bool) –

    Whether to check, if segments in parallel spline have same orientation as in original. When True, new spline must have the same count of points as original.

Returns:

Offset(
    dist: float,
    spline3DSrc: Spline3D,
    plane: Plane3D,
    checkSegmentsOrientation: bool,
) -> tuple[eGeometryErrorCode, Spline3D]

Calculate a parallel spline to given 3D cubic spline by a distance

This function works only for planar splines!

Parameters:

  • dist (float) –

    Distance between the original and offset spline

  • spline3DSrc (Spline3D) –

    Spline to be offset

  • plane (Plane3D) –

    plane to offset in

  • checkSegmentsOrientation (bool) –

    Whether to check, if segments in parallel spline have same orientation as in original. When True, new spline must have the same count of points as original.

Returns:

Examples:

spline_2 is a cubic spline with control points in (0, 0, 0), (1, 1, 1), (2, 0, 2) and (3, 1, 3). To calculate a approximation of the parallel spline at the distance of 0.5, call:

>>> Offset(0.5, spline_2, spline_2.IsPlanar()[1], False)[1]
Spline3D(
   IsPeriodic(0)
   StartVector(0, 0, 0)
   EndVector(0, 0, 0)
   Count(23)
   Points(...)
Offset(
    point: Point2D, spline2DSrc: Spline2D
) -> tuple[eGeometryErrorCode, Spline2D]

Calculate a parallel spline to given 2D cubic spline by a point

Parameters:

  • point (Point2D) –

    Parallel spline will pass through this point

  • spline2DSrc (Spline2D) –

    Spline to be offset

Returns:

Examples:

spline_1 is a cubic spline with control points in (0, 0), (2, 2), (3, 1) and (4, 3). To calculate a approximation of the parallel spline passing through (1, 1), call:

>>> Offset(Point2D(1, 1), spline_1)[1]
Spline2D(
   StartVector(0, 0)
   EndVector(0, 0)
   Count(25)
   Points(...)
Offset(
    point: Point3D, spline3DSrc: Spline3D, plane: Plane3D
) -> tuple[eGeometryErrorCode, Spline3D]

Calculate a parallel to given 3D spline by a point

Parameters:

  • point (Point3D) –

    Parallel spline will pass through this point

  • spline3DSrc (Spline3D) –

    Spline to be offset

  • plane (Plane3D) –

    plane to offset in

Returns:

Examples:

spline_2 is a spline with control points in (0, 0, 0), (1, 1, 1), (2, 0, 2) and (3, 1, 3). To calculate an approximation of the parallel spline passing through (1, 1, 1), call:

>>> Offset(Point3D(1, 1.2, 1), spline_2, xy_plane)[1]
Spline3D(
   IsPeriodic(0)
   StartVector(0, 0, 0)
   EndVector(0, 0, 0)
   Count(24)
   Points(...)
Offset(
    dist: float, spline2DSrc: Spline2D, checkSegmentsOrientation: bool
) -> tuple[eGeometryErrorCode, Polyline2D]

Calculate a parallel curve to given 2D spline by a distance

The calculated curve is a polyline being an approximation of the offset spline.

Parameters:

  • dist (float) –

    Distance between the original and offset curve

  • spline2DSrc (Spline2D) –

    Spline to be offset

  • checkSegmentsOrientation (bool) –

    Whether to check, if segments in parallel spline have same orientation as in original. When True, new spline must have the same count of points as original.

Returns:

  • eGeometryErrorCode

    Error code (eOK when offset is successful)

  • Polyline2D

    Resulting polyline as an approximation of the offset spline

Examples:

spline_1 is a spline with control points (0, 0), (2, 2), (3, 1) and (4, 3). To calculate a approximation of the parallel spline at the distance of 0.5, call:

>>> Offset(0.5, spline_1, False)[1]
Polyline2D(
   Count(17)
   Points(...)
Offset(
    dist: float, clothoid2DSrc: Clothoid2D
) -> tuple[eGeometryErrorCode, Clothoid2D]

Calculate a parallel to given 2D clothoid by a distance

Parameters:

  • dist (float) –

    Distance between the original and offset clothoid

  • clothoid2DSrc (Clothoid2D) –

    Clothoid to be offset

Returns:

Offset(
    point: Point2D, clothoid2DSrc: Clothoid2D
) -> tuple[eGeometryErrorCode, Clothoid2D]

Calculate a parallel to given 2D clothoid by a point

Parameters:

  • point (Point2D) –

    Parallel clothoid will pass through this point

  • clothoid2DSrc (Clothoid2D) –

    Clothoid to be offset

Returns:

Offset(
    rDistance: float, polyline2D: Polyline2D, checkSegmentsOrientation: bool
) -> tuple[eGeometryErrorCode, Polyline2D]

Calculate a parallel to given 2D polyline by a distance

Parameters:

  • rDistance (float) –

    Distance between the original and offset polyline

  • polyline2D (Polyline2D) –

    Polyline to be offset

  • checkSegmentsOrientation (bool) –

    Whether to check, if segments in parallel polyline have same orientation as in original. When True, new polyline must have the same count of points as original.

Returns:

Examples:

polyline_1 is a polyline with three points: (0, 0), (1, 1) and (2, 0). To calculate a parallel polyline at the distance of \(\sqrt{2}\), call:

>>> _err, offset_polyline = Offset(sqrt(2), polyline_1, False)
>>> offset_polyline.Points
[Point2D(-1, 1), Point2D(1, 3), Point2D(3, 1)]
Offset(
    point: Point2D, polyline2DSrc: Polyline2D
) -> tuple[eGeometryErrorCode, Polyline2D]

Calculate a parallel to given 2D polyline by a point

Parameters:

  • point (Point2D) –

    Parallel polyline will pass through this point

  • polyline2DSrc (Polyline2D) –

    Polyline to be offset

Returns:

Examples:

polyline_1 is a polyline with three points: (0, 0), (1, 1) and (2, 0). To calculate a parallel polyline passing through (0, 2), call:

>>> _err, offset_polyline = Offset(Point2D(0, 2), polyline_1)
>>> offset_polyline.Points
[Point2D(-1, 1), Point2D(1, 3), Point2D(3, 1)]
Offset(
    rDistance: float, polygon: Polygon2D, checkSegmentsOrientation: bool
) -> tuple[eGeometryErrorCode, Polygon2D]

Calculate a parallel to given 2D polygon by a distance

Parameters:

  • rDistance (float) –

    Distance between the original and offset polygon

  • polygon (Polygon2D) –

    Polygon to be offset

  • checkSegmentsOrientation (bool) –

    Whether to check, if segments in parallel polygon have same orientation as in original. When True, new polygon must have the same count of points as original.

Returns:

Examples:

square_1 is a square with side length of 2.0 and lower left corner in the origin. To calculate a parallel polygon at the distance of 0.5, call:

>>> _err, offset_polygon = Offset(0.5, square_1, False)
>>> offset_polygon.Points
[Point2D(0.5, 0.5), Point2D(1.5, 0.5), Point2D(1.5, 1.5), Point2D(0.5, 1.5), Point2D(0.5, 0.5)]
Offset(distances: VecDoubleList, polyline: Polyline2D) -> Polyline2D

Calculate a parallel to given 2D polyline by distances for each segment

Parameters:

  • distances (VecDoubleList) –

    List of distances between each segment of the original and offset polyline

  • polyline (Polyline2D) –

    Polyline to be offset

Returns:

  • Polyline2D

    List of resulting offset polylines

Examples:

polyline_1 is a polyline with three points: (0, 0), (1, 1) and (2, 0). To calculate parallel polyline where the first segment is offset by \(2\sqrt{2}\) and the second by \(\sqrt{2}\), call:

>>> Offset(VecDoubleList([2*sqrt(2), sqrt(2)]), polyline_1)
Polyline2D(
   Count(3)
   Points(
      (-2, 2)
      (0, 4)
      (3, 1)))
Offset(
    inputPath: Path3D, normVector: Vector3D, offsetDistance: float
) -> tuple[eGeometryErrorCode, Path3D]

Calculate a parallel to given 3D path by a distance

Parameters:

  • inputPath (Path3D) –

    input path

  • normVector (Vector3D) –

    normal vector of plane in that the offset will be calculated

  • offsetDistance (float) –

    offset distance

Returns:

Offset(
    inputPath: Path3D, inputPoint: Point3D, rayVector: Vector3D, plane: Plane3D
) -> tuple[eGeometryErrorCode, Path3D]

Calculate a parallel to given 3D path by a point

Parameters:

  • inputPath (Path3D) –

    input path

  • inputPoint (Point3D) –

    cursor point (ray point)

  • rayVector (Vector3D) –

    ray vector

  • plane (Plane3D) –

    plane of the planar face (of given boundary curves)

Returns:

OffsetCurve

OffsetCurve(
    inputCurves: Curve3DList,
    normVector: Vector3D,
    offsetDistance: float,
    sortEdges: bool = False,
) -> tuple

Offset 3D curves with given distance

Parameters:

  • inputCurves (Curve3DList) –

    input curves

  • normVector (Vector3D) –

    normal vector of plane in that the offset will be calculated

  • offsetDistance (float) –

    offset distance

  • sortEdges (bool, default: False ) –

    flag if to sort edges to original order

Returns:

  • tuple

    tuple(error code, result offset curves)

Polygonize overloaded

Polygonize(
    geometry_object: object,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
) -> tuple[bool, Polyline3D]

Polygonize whole curve

Parameters:

  • geometry_object (object) –

    Geometry object which will be polygonized

  • arcSegmentation (int) –

    segment number

  • useArcSegmentation (int) –

    if use segment polygonization, set to 0

  • armLength (float) –

    max length of calculated segment, for rise value polygonization only

  • riseValue (float) –

    rise value

Returns:

Polygonize(
    geometry_object: object,
    fromPoint: Point3D,
    toPoint: Point3D,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
    eps: float,
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

Parameters:

  • geometry_object (object) –

    Geometry object which will be polygonized

  • fromPoint (Point3D) –

    where to begin the polygonization; The point has to be on one of the Objects

  • toPoint (Point3D) –

    where to end the polygonization; The point has to be on one of the Objects

  • arcSegmentation (int) –

    Number of segments the arc will be divided

  • useArcSegmentation (int) –

    type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)

  • armLength (float) –

    maximum length of a segment for polygonized arc

  • riseValue (float) –

    is the maximum distance from the actual arc and the polyline

  • eps (float) –

    stw[295-1]

Returns:

  • tuple[bool, Polyline2D]

    tuple(true, if calculation completes, false: if something went wrong during the calculation, the polyline will be filled with the points of the polygonization)

Polygonize(
    path: Path2D,
    fromPoint: Point3D,
    toPoint: Point3D,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
    eps: float,
) -> tuple[bool, Polyline2D]

Polygonizes multiple geometry objects, if they if they follow directly one another

emark The objects in the path must follow directly one another. This means, the start- or endpoint of one object has to be the start- or endpoint of the next object in the path and the other point of the object has to be the start- or endpoint of the previous object in the path. eg.: Start1-End1, End2-Start2, End3-Start3, Start4-End4 and so on. where, End1 == End2, Start2 == End3, Start3 == Start4

        If they don't follow one another, it's unknown how the calculated polyline will look.

        The parameters: arcSegmentation, useArcSegmentation, armLength, riseValue are not relevant for lines and polylines.
        eps is only relevant if, there is a spline or clothoid in the vector.
        See class-description for more information about these parameters.

Args:
    path:               The vector with the objects, which will be polygonized
    fromPoint:          where to begin the polygonization; The point has to be on one of the Objects
    toPoint:            where to end the polygonization; The point has to be on one of the Objects
    arcSegmentation:    Number of segments the arc will be divided
    useArcSegmentation: type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)
    armLength:          maximum length of a segment for polygonized arc
    riseValue:          is the maximum distance from the actual arc and the polyline
    eps:                stw[295-1]

Returns:
    tuple(true, if calculation completes, false: if something went wrong during the calculation,
          the polyline will be filled with the points of the polygonization)
Polygonize(
    line: Line2D, fromPoint: Point3D, toPoint: Point3D, eps: float
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

Parameters:

  • line (Line2D) –

    Line which will be polygonized

  • fromPoint (Point3D) –

    where to begin the polygonization; The point has to be on one of the Objects

  • toPoint (Point3D) –

    where to end the polygonization; The point has to be on one of the Objects

  • eps (float) –

    stw[295-1]

Returns:

  • tuple[bool, Polyline2D]

    tuple(true, if calculation completes, false: if something went wrong during the calculation, the polyline will be filled with the points of the polygonization)

Polygonize(
    polyline: Polyline2D, fromPoint: Point3D, toPoint: Point3D, eps: float
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

Parameters:

  • polyline (Polyline2D) –

    Polyline which will be polygonized

  • fromPoint (Point3D) –

    where to begin the polygonization; The point has to be on one of the Objects

  • toPoint (Point3D) –

    where to end the polygonization; The point has to be on one of the Objects

  • eps (float) –

    stw[295-1]

Returns:

  • tuple[bool, Polyline2D]

    tuple(true, if calculation completes, false: if something went wrong during the calculation, the polyline will be filled with the points of the polygonization)

Polygonize(
    polygon: Polygon2D, fromPoint: Point3D, toPoint: Point3D, eps: float
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

Parameters:

  • polygon (Polygon2D) –

    Polygon which will be polygonized

  • fromPoint (Point3D) –

    where to begin the polygonization; The point has to be on one of the Objects

  • toPoint (Point3D) –

    where to end the polygonization; The point has to be on one of the Objects

  • eps (float) –

    stw[295-1]

Returns:

  • tuple[bool, Polyline2D]

    tuple(true, if calculation completes, false: if something went wrong during the calculation, the polyline will be filled with the points of the polygonization)

Polygonize(
    arc: Arc2D,
    fromPoint: Point3D,
    toPoint: Point3D,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

Parameters:

  • arc (Arc2D) –

    Arc which will be polygonized

  • fromPoint (Point3D) –

    where to begin the polygonization; The point has to be on one of the Objects

  • toPoint (Point3D) –

    where to end the polygonization; The point has to be on one of the Objects

  • arcSegmentation (int) –

    Number of segments the arc will be divided

  • useArcSegmentation (int) –

    type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)

  • armLength (float) –

    maximum length of a segment for polygonized arc

  • riseValue (float) –

    is the maximum distance from the actual arc and the polyline

Returns:

  • tuple[bool, Polyline2D]

    tuple(true, if calculation completes, false: if something went wrong during the calculation, the polyline will be filled with the points of the polygonization)

Polygonize(
    arc: Arc2D,
    fromPoint: Point2D,
    toPoint: Point2D,
    count: int,
    bInscribed: bool,
) -> tuple[bool, Polyline2D]

Polygonize Arc2D with given division

Parameters:

  • arc (Arc2D) –

    Arc2D

  • fromPoint (Point2D) –

    Start point for polygonization

  • toPoint (Point2D) –

    End point for polygonization

  • count (int) –

    Count of segments

  • bInscribed (bool) –

    in case of inscribed circle there is additional segment (one segment divided to 2 parts)

Returns:

  • tuple[bool, Polyline2D]

    tuple(bool (true = polygonization possible), PolyLine2D)

Polygonize(arc: Arc2D, countOfSegments: int) -> Polyline2D

Polygonize a Arc2D geometry object

Parameters:

  • arc (Arc2D) –

    Arc2D which will be polygonized

  • countOfSegments (int) –

    Count of segments

Returns:

  • Polyline2D

    Polyline2D The polyline will be filled with the points of the polygonization

Polygonize(
    spline: Spline2D,
    fromPoint: Point3D,
    toPoint: Point3D,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
    eps: float,
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

Parameters:

  • spline (Spline2D) –

    Spline which will be polygonized

  • fromPoint (Point3D) –

    where to begin the polygonization; The point has to be on one of the Objects

  • toPoint (Point3D) –

    where to end the polygonization; The point has to be on one of the Objects

  • arcSegmentation (int) –

    Number of segments the arc will be divided

  • useArcSegmentation (int) –

    type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)

  • armLength (float) –

    maximum length of a segment for polygonized arc

  • riseValue (float) –

    is the maximum distance from the actual arc and the polyline

  • eps (float) –

    stw[295-1]

Returns:

  • tuple[bool, Polyline2D]

    tuple(true, if calculation completes, false: if something went wrong during the calculation, the polyline will be filled with the points of the polygonization)

Polygonize(
    bspline: BSpline2D,
    fromPoint: Point3D,
    toPoint: Point3D,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
) -> tuple[bool, Polyline2D]

Polygonize a BSpline2D geometry object

Parameters:

  • bspline (BSpline2D) –

    BSpline2D which will be polygonized

  • fromPoint (Point3D) –

    where to begin the polygonization

  • toPoint (Point3D) –

    where to end the polygonization

  • arcSegmentation (int) –

    Number of segments the arc will be divided

  • useArcSegmentation (int) –

    type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)

  • armLength (float) –

    maximum length of a segment for polygonized arc

  • riseValue (float) –

    is the maximum distance from the actual arc and the polyline

Returns:

  • tuple[bool, Polyline2D]

    tuple(true, if calculation completes, false: if something went wrong during the calculation, the polyline will be filled with the points of the polygonization)

Polygonize(
    clothoid: Clothoid2D,
    fromPoint: Point3D,
    toPoint: Point3D,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
    eps: float,
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

Parameters:

  • clothoid (Clothoid2D) –

    Clothoid which will be polygonized

  • fromPoint (Point3D) –

    where to begin the polygonization; The point has to be on one of the Objects

  • toPoint (Point3D) –

    where to end the polygonization; The point has to be on one of the Objects

  • arcSegmentation (int) –

    Number of segments the arc will be divided

  • useArcSegmentation (int) –

    type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)

  • armLength (float) –

    maximum length of a segment for polygonized arc

  • riseValue (float) –

    is the maximum distance from the actual arc and the polyline

  • eps (float) –

    stw[295-1]

Returns:

  • tuple[bool, Polyline2D]

    tuple(true, if calculation completes, false: if something went wrong during the calculation, the polyline will be filled with the points of the polygonization)

Polygonize(arc: Arc3D, countOfSegments: int) -> Polyline3D

Polygonize a Arc3D geometry object

Parameters:

  • arc (Arc3D) –

    Arc3D which will be polygonized

  • countOfSegments (int) –

    Count of segments

Returns:

  • Polyline3D

    Polyline3D the polyline will be filled with the points of the polygonization

Polygonize(
    arc: Arc3D,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
) -> tuple[bool, Polyline3D]

Polygonize a Arc3D geometry object

Parameters:

  • arc (Arc3D) –

    Arc3D which will be polygonized

  • arcSegmentation (int) –

    Count of segments

  • useArcSegmentation (int) –

    if use segment polygonization, set to 0

  • armLength (float) –

    max length of calculated segment, for rise value polygonization only

  • riseValue (float) –

    rise value

Returns:

Polygonize(path: Path3D, countOfSegments: int) -> Polyline3D

Polygonize a Path3D geometry object

Parameters:

  • path (Path3D) –

    Path3D which will be polygonized

  • countOfSegments (int) –

    Count of segments

Returns:

  • Polyline3D

    Polyline3D the polyline will be filled with non repeated points of the polygonization

Polygonize(
    path: Path3D,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
) -> Polyline3D

Polygonize a Arc3D geometry object

Parameters:

  • path (Path3D) –

    Path3D which will be polygonized

  • arcSegmentation (int) –

    Count of segments

  • useArcSegmentation (int) –

    if use segment polygonization, set to 0

  • armLength (float) –

    max length of calculated segment, for rise value polygonization only

  • riseValue (float) –

    rise value

Returns:

Polygonize(spline: Spline3D, linesPerSegment: int) -> Polyline3D

Polygonize a Spline3D geometry object

Parameters:

  • spline (Spline3D) –

    Spline3D which will be polygonized

  • linesPerSegment (int) –

    Count of lines per segment

Returns:

  • Polyline3D

    Polyline3D the polyline will be filled with the points of the polygonization

Polygonize(
    spline: Spline3D, minmaxRadius: float, pixelSize: float
) -> tuple[bool, Polyline3D]

Polygonize Spline3D

Parameters:

  • spline (Spline3D) –

    Spline3D

  • minmaxRadius (float) –

    radius of minmax

  • pixelSize (float) –

    size of pixel

Returns:

  • tuple[bool, Polyline3D]

    tuple(bool (true = polygonization possible), polygonized spline)

Polygonize(
    spline: BSpline3D,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
) -> tuple[bool, Polyline3D]

Polygonize B-spline curve

Parameters:

  • spline (BSpline3D) –

    spline to tesselate

  • arcSegmentation (int) –

    segment number

  • useArcSegmentation (int) –

    if use segment polygonization, set to 0

  • armLength (float) –

    max length of calculated segment, for rise value polygonization only

  • riseValue (float) –

    rise value

Returns:

Polygonize(
    spline: Spline3D,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
) -> tuple[bool, Polyline3D]

Polygonize whole spline curve

Parameters:

  • spline (Spline3D) –

    spline to tesselate

  • arcSegmentation (int) –

    segment number

  • useArcSegmentation (int) –

    if use segment polygonization, set to 0

  • armLength (float) –

    max length of calculated segment, for rise value polygonization only

  • riseValue (float) –

    rise value

Returns:

Polygonize(line: Line3D) -> tuple[bool, Polyline3D]

Create polyline from line

Parameters:

  • line (Line3D) –

    Line to polygonize

Returns:

Polygonize(
    line: Line2D, fromOffset: float, toOffset: float
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

emark The polygonization is always done in the direction of the element and therefor for non-cyclic elements the fromOffset must be smaller than the toOffset

Args:
    line:       Line which will be polygonized
    fromOffset: the offset from the elements start point, where polygonization will begin
    toOffset:   the offset from the elements start point, where polygonization will end

Returns:
    tuple(true, if calculation completes, false: if something went wrong during the calculation,
          the polyline will be filled with the points of the polygonization)
Polygonize(
    clothoid: Clothoid2D,
    fromOffset: float,
    toOffset: float,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
    eps: float,
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

emark The polygonization is always done in the direction of the element and therefor for non-cyclic elements the fromOffset must be smaller than the toOffset

Args:
    clothoid:           Clothoid which will be polygonized
    fromOffset:         the offset from the elements start point, where polygonization will begin
    toOffset:           the offset from the elements start point, where polygonization will end
    arcSegmentation:    Number of segments the arc will be divided
    useArcSegmentation: type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)
    armLength:          maximum length of a segment for polygonized arc
    riseValue:          is the maximum distance from the actual arc and the polyline
    eps:                stw[295-1]

Returns:
    tuple(true, if calculation completes, false: if something went wrong during the calculation,
          the polyline will be filled with the points of the polygonization)
Polygonize(
    polyline: Polyline2D, fromOffset: float, toOffset: float, eps: float
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

emark The polygonization is always done in the direction of the element and therefor for non-cyclic elements the fromOffset must be smaller than the toOffset

Args:
    polyline:   Polyline which will be polygonized
    fromOffset: the offset from the elements start point, where polygonization will begin
    toOffset:   the offset from the elements start point, where polygonization will end
    eps:        stw[295-1]

Returns:
    tuple(true, if calculation completes, false: if something went wrong during the calculation,
          the polyline will be filled with the points of the polygonization)
Polygonize(
    polygon: Polygon2D, fromOffset: float, toOffset: float, eps: float
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

emark The polygonization is always done in the direction of the element and therefor for non-cyclic elements the fromOffset must be smaller than the toOffset

Args:
    polygon:    Polygon which will be polygonized
    fromOffset: the offset from the elements start point, where polygonization will begin
    toOffset:   the offset from the elements start point, where polygonization will end
    eps:        stw[295-1]

Returns:
    tuple(true, if calculation completes, false: if something went wrong during the calculation,
          the polyline will be filled with the points of the polygonization)
Polygonize(
    arc: Arc2D,
    fromOffset: float,
    toOffset: float,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

emark The polygonization is always done in the direction of the element and therefor for non-cyclic elements the fromOffset must be smaller than the toOffset

Args:
    arc:                Arc which will be polygonized
    fromOffset:         the offset from the elements start point, where polygonization will begin
    toOffset:           the offset from the elements start point, where polygonization will end
    arcSegmentation:    Number of segments the arc will be divided
    useArcSegmentation: type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)
    armLength:          maximum length of a segment for polygonized arc
    riseValue:          is the maximum distance from the actual arc and the polyline

Returns:
    tuple(true, if calculation completes, false: if something went wrong during the calculation,
          the polyline will be filled with the points of the polygonization)
Polygonize(
    arc: Arc2D, fromOffset: float, toOffset: float, count: int, bInscribed: bool
) -> tuple[bool, Polyline2D]

Polygonize Arc2D with given division

Parameters:

  • arc (Arc2D) –

    Arc2D

  • fromOffset (float) –

    the offset from the elements start point, where polygonization will begin

  • toOffset (float) –

    the offset from the elements start point, where polygonization will end

  • count (int) –

    Count of segments

  • bInscribed (bool) –

    in case of inscribed circle there is additional segment (one segment divided to 2 parts)

Returns:

  • tuple[bool, Polyline2D]

    tuple(bool (true = polygonization possible), PolyLine2D)

Polygonize(
    spline: Spline2D,
    fromOffset: float,
    toOffset: float,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
    eps: float,
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

emark The polygonization is always done in the direction of the element and therefor for non-cyclic elements the fromOffset must be smaller than the toOffset

Args:
    spline:             Spline which will be polygonized
    fromOffset:         the offset from the elements start point, where polygonization will begin
    toOffset:           the offset from the elements start point, where polygonization will end
    arcSegmentation:    Number of segments the arc will be divided
    useArcSegmentation: type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)
    armLength:          maximum length of a segment for polygonized arc
    riseValue:          is the maximum distance from the actual arc and the polyline
    eps:                stw[295-1]

Returns:
    tuple(true, if calculation completes, false: if something went wrong during the calculation,
          the polyline will be filled with the points of the polygonization)
Polygonize(
    path: Path2D,
    fromOffset: float,
    toOffset: float,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
    eps: float,
) -> tuple[bool, Polyline2D]

Polygonizes multiple geometry objects, if they if they follow directly one another

emark The objects in the path must follow directly one another. This means, the start- or endpoint of one object has to be the start- or endpoint of the next object in the path and the other point of the object has to be the start- or endpoint of the previous object in the path. eg.: Start1-End1, End2-Start2, End3-Start3, Start4-End4 and so on. where, End1 == End2, Start2 == End3, Start3 == Start4

        If they don't follow one another, it's unknown how the calculated polyline will look.

        The parameters: arcSegmentation, useArcSegmentation, armLength, riseValue are not relevant for lines and polylines.
        eps is only relevant if, there is a spline or clothoid in the vector.
        See class-description for more information about these parameters.

Args:
    path:               The vector with the objects, which will be polygonized
    fromOffset:         the offset from the elements start point, where polygonization will begin
    toOffset:           the offset from the elements start point, where polygonization will end
    arcSegmentation:    Number of segments the arc will be divided
    useArcSegmentation: type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)
    armLength:          maximum length of a segment for polygonized arc
    riseValue:          is the maximum distance from the actual arc and the polyline
    eps:                stw[295-1]

Returns:
    tuple(true, if calculation completes, false: if something went wrong during the calculation,
          the polyline will be filled with the points of the polygonization)
Polygonize(
    area: ClosedAreaComposite2D,
    eps: float,
    arcSegmentation: int = 360,
    useArcSegmentation: int = 0,
    armLength: float = 0.0,
    riseValue: float = 0.0,
) -> tuple[bool, Polygon2D]

Polygonizes path bounded area

Parameters:

  • area (ClosedAreaComposite2D) –

    path bounded area to be polygonized

  • eps (float) –

    Number of segments the arc will be divided

  • arcSegmentation (int, default: 360 ) –

    type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)

  • useArcSegmentation (int, default: 0 ) –

    maximum length of a segment for polygonized arc

  • armLength (float, default: 0.0 ) –

    is the maximum distance from the actual arc and the polyline

  • riseValue (float, default: 0.0 ) –

    stw[295-1]

Returns:

  • tuple[bool, Polygon2D]

    tuple(true, if calculation completes, false: if something went wrong during the calculation, the resulting polygon)

Polygonize(
    geometry_object: object,
    fromOffset: float,
    toOffset: float,
    arcSegmentation: int,
    useArcSegmentation: int,
    armLength: float,
    riseValue: float,
    eps: float,
) -> tuple[bool, Polyline2D]

Polygonize a single geometry object

emark The polygonization is always done in the direction of the element and therefor for non-cyclic elements the fromOffset must be smaller than the toOffset

Args:
    geometry_object:    Geometry object which will be polygonized
    fromOffset:         the offset from the elements start point, where polygonization will begin
    toOffset:           the offset from the elements start point, where polygonization will end
    arcSegmentation:    Number of segments the arc will be divided
    useArcSegmentation: type of the polygonization (if 0 use the arcSegmentation otherwise use the riseValue)
    armLength:          maximum length of a segment for polygonized arc
    riseValue:          is the maximum distance from the actual arc and the polyline
    eps:                stw[295-1]

Returns:
    tuple(true, if calculation completes, false: if something went wrong during the calculation,
          the polyline will be filled with the points of the polygonization)

PolygonizeEqually

PolygonizeEqually(
    arc: Arc2D, fromPoint: Point2D, toPoint: Point2D, count: int
) -> tuple[bool, Polyline2D]

Polygonize given arc always equally

Parameters:

  • arc (Arc2D) –

    Source arc

  • fromPoint (Point2D) –

    Start point for polygonization

  • toPoint (Point2D) –

    End point for polygonization

  • count (int) –

    Count of segments

Returns:

  • tuple[bool, Polyline2D]

    tuple(bool (true = polygonization possible), Output polyline)

Rotate overloaded

Rotate(point: Point2D, angle: Angle) -> Point2D

Rotate a point around zero point by an angle.

Parameters:

Returns:

Rotate(point: Point2D, zeroPoint: Point2D, angle: Angle) -> Point2D

Rotate a point around given point by an angle.

Parameters:

  • point (Point2D) –

    2D Point

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(line: Line2D, angle: Angle) -> Line2D

Rotate a line around zero point by an angle.

Parameters:

Returns:

  • Line2D

    Resulting 2D line

Rotate(line: Line2D, zeroPoint: Point2D, angle: Angle) -> Line2D

Rotate a line around given point by an angle.

Parameters:

  • line (Line2D) –

    2D line

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

  • Line2D

    Resulting 2D line

Rotate(arc: Arc2D, angle: Angle) -> Arc2D

Rotate a arc around zero point by an angle.

This function rotate center point and start and end angles.

Parameters:

Returns:

  • Arc2D

    Resulting 2D arc

Rotate(arc: Arc2D, zeroPoint: Point2D, angle: Angle) -> Arc2D

Rotate a arc around given point by an angle.

This function rotate center point start and end angles.

Parameters:

  • arc (Arc2D) –

    2D arc

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

  • Arc2D

    Resulting 2D arc

Rotate(vec: Vector2D, angle: Angle) -> Vector2D

Rotate a vector by an angle.

Parameters:

Returns:

Rotate(vec: Vector3D, axis: Axis3D, angle: Angle) -> Vector3D

Rotate a vector by an angle.

Parameters:

Returns:

Rotate(polyline: Polyline2D, zeroPoint: Point2D, angle: Angle) -> Polyline2D

Rotate a polyline around given point by an angle.

Parameters:

  • polyline (Polyline2D) –

    2D polyline

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(polyline: Polyline2D, angle: Angle) -> Polyline2D

Rotate a polyline around origin by an angle.

Parameters:

  • polyline (Polyline2D) –

    2D polyline

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(axis: Axis2D, angle: Angle) -> Axis2D

Rotate a axis around origin by an angle.

Parameters:

  • axis (Axis2D) –

    2D axis

  • angle (Angle) –

    Angle of rotation

Returns:

  • Axis2D

    Resulting 2D axis

Rotate(axis: Axis2D, zeroPoint: Point2D, angle: Angle) -> Axis2D

Rotate a axis around given point by an angle.

Parameters:

  • axis (Axis2D) –

    2D axis

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

  • Axis2D

    Resulting 2D axis

Rotate(axis: AxisPlacement2D, angle: Angle) -> AxisPlacement2D

Rotate a axis placement around origin by an angle.

Parameters:

  • placement

    2D axis placement

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(
    axis: AxisPlacement2D, zeroPoint: Point2D, angle: Angle
) -> AxisPlacement2D

Rotate a axis placement around given point by an angle.

Parameters:

  • placement

    2D axis placement

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(placement: AxisPlacement3D, angle: Angle) -> AxisPlacement3D

Rotate a axis placement3D around origin(z-axis) by an angle.

Parameters:

Returns:

Rotate(
    placement: AxisPlacement3D, rotAxis: Axis3D, angle: Angle
) -> AxisPlacement3D

Rotate a axis placement 3D around origin(z-axis) by an angle.

Parameters:

Returns:

Rotate(
    placement: AxisPlacement3D, zeroPoint: Point2D, angle: Angle
) -> AxisPlacement3D

Rotate a axis placement around given point (z-axis) by an angle.

Parameters:

Returns:

Rotate(clothoid: Clothoid2D, angle: Angle) -> Clothoid2D

Rotate a clothoid around origin by an angle.

Parameters:

  • clothoid (Clothoid2D) –

    2D clothoid

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(clothoid: Clothoid2D, zeroPoint: Point2D, angle: Angle) -> Clothoid2D

Rotate a clothoid around given point by an angle.

Parameters:

  • clothoid (Clothoid2D) –

    2D clothoid

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(polygon: Polygon2D, angle: Angle) -> Polygon2D

Rotate a polygon around origin by an angle.

Parameters:

  • polygon (Polygon2D) –

    2D polygon

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(polygon: Polygon2D, zeroPoint: Point2D, angle: Angle) -> Polygon2D

Rotate a polygon around given point by an angle.

Parameters:

  • polygon (Polygon2D) –

    2D polygon

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(area: PolygonalArea2D, angle: Angle) -> PolygonalArea2D

Rotate a polygonal area around origin by an angle.

Parameters:

Returns:

Rotate(
    area: PolygonalArea2D, zeroPoint: Point2D, angle: Angle
) -> PolygonalArea2D

Rotate a polygonal area around given point by an angle.

Parameters:

Returns:

Rotate(spline: Spline2D, angle: Angle) -> Spline2D

Rotate a spline around origin by an angle.

Parameters:

  • spline (Spline2D) –

    2D spline

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(spline: Spline2D, zeroPoint: Point2D, angle: Angle) -> Spline2D

Rotate a spline around given point by an angle.

Parameters:

  • spline (Spline2D) –

    2D spline

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(point: Point3D, angle: Angle) -> Point3D

Rotate a 3D point around origin by an angle.

Parameters:

  • point (Point3D) –

    3D point

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(point: Point3D, zeroPoint: Point2D, angle: Angle) -> Point3D

Rotate a 3D point around given 2D point by an angle.

Parameters:

  • point (Point3D) –

    3D point

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(point: Point3D, axis: Axis3D, angle: Angle) -> Point3D

Rotate a 3D point around given 3D axis by an angle.

Parameters:

  • point (Point3D) –

    3D point

  • axis (Axis3D) –

    3D axis

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(line: Line3D, zeroPoint: Point2D, angle: Angle) -> Line3D

Rotate a 3D line around given 2D point by an angle.

Parameters:

  • line (Line3D) –

    3D line

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

  • Line3D

    Resulting 3D line

Rotate(cylinder: Cylinder3D, angle: Angle) -> Cylinder3D

Rotate a 3D Cylinder around origin by an angle.

Parameters:

  • cylinder (Cylinder3D) –

    3D Cylinder

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(cylinder: Cylinder3D, zeroPoint: Point2D, angle: Angle) -> Cylinder3D

Rotate a 3D Cylinder around given 2D point by an angle.

Parameters:

  • cylinder (Cylinder3D) –

    3D Cylinder

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(cylinder: Cylinder3D, axis: Axis3D, angle: Angle) -> Cylinder3D

Rotate a 3D Cylinder around given 3D axis by an angle.

Parameters:

Returns:

Rotate(ellipsoid: Ellipsoid3D, angle: Angle) -> Ellipsoid3D

Parameters:

Returns:

Rotate(ellipsoid: Ellipsoid3D, zeroPoint: Point2D, angle: Angle) -> Ellipsoid3D

Rotate a 3D Ellipsoid around given 2D point by an angle.

Parameters:

  • ellipsoid (Ellipsoid3D) –

    3D Ellipsoid

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(ellipsoid: Ellipsoid3D, axis: Axis3D, angle: Angle) -> Ellipsoid3D

Rotate a 3D Ellipsoid around given 3D axis by an angle.

Parameters:

Returns:

Rotate(cone: Cone3D, angle: Angle) -> Cone3D

Rotate a 3D Cone around origin by an angle.

Parameters:

  • cone (Cone3D) –

    3D Cone

  • angle (Angle) –

    Angle of rotation

Returns:

  • Cone3D

    Resulting 3D Cone

Rotate(cone: Cone3D, zeroPoint: Point2D, angle: Angle) -> Cone3D

Rotate a 3D Cone around given 2D point by an angle.

Parameters:

  • cone (Cone3D) –

    3D Cone

  • zeroPoint (Point2D) –

    2D zero point

  • angle (Angle) –

    Angle of rotation

Returns:

  • Cone3D

    Resulting 3D Cone

Rotate(cone: Cone3D, axis: Axis3D, angle: Angle) -> Cone3D

Rotate a 3D Cone around given 3D axis by an angle.

Parameters:

  • cone (Cone3D) –

    3D Cone

  • axis (Axis3D) –

    3D axis

  • angle (Angle) –

    Angle of rotation

Returns:

  • Cone3D

    Resulting 3D Cone

Rotate(minmax: MinMax2D, angle: Angle) -> MinMax2D

Rotate a MinMax2D by an angle.

Parameters:

  • minmax (MinMax2D) –

    2D MinMax

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(brep: BRep3D, axis: Axis3D, angle: Angle) -> BRep3D

Rotate a brep around given 3D axis by an angle.

Parameters:

  • brep (BRep3D) –

    brep

  • axis (Axis3D) –

    3D axis

  • angle (Angle) –

    Angle of rotation

Returns:

Rotate(polyhedron: Polyhedron3D, axis: Axis3D, angle: Angle) -> Polyhedron3D

Rotate a polyhedron around given 3D axis by an angle.

Parameters:

Returns:

SetAbsoluteTolerance

SetAbsoluteTolerance(value: float)

set absolute tolerance

Parameters:

  • value (float) –

    new value

SetAngleTolerance

SetAngleTolerance(value: Angle)

Set angle tolerance

This tolerance is using for angle comparison.

Parameters:

  • value (Angle) –

    New tolerance using for angle comparison [rad]

SetCurvatureTolerance

SetCurvatureTolerance(value: float)

Set curvature tolerance

This tolerance is using for curvature comparison.

Parameters:

  • value (float) –

    New tolerance using for curvature comparison

SetCurveLengthTolerance

SetCurveLengthTolerance(value: float)

Set curve length tolerance

This tolerance is using for length of curve comparison.

Parameters:

  • value (float) –

    New tolerance using for length of curve comparison [mm]

SetRelativeTolerance

SetRelativeTolerance(value: float)

set relative tolerance

Parameters:

  • value (float) –

    new value

SetZValue

SetZValue(zValue: float, line: Line3D)

Set the the z value of a line

Parameters:

  • zValue (float) –

    zValue

  • line (Line3D) –

    line

Returns:

  • true, if the calculation was correct

Split overloaded

Split(
    polygon2D: Polygon2D,
    splitPoints: Point3DList,
    pSplitGeometry: object,
    posTol: float,
) -> tuple[eSplitResult, list[Polygon2D]]

Split a Polygon2D into multiple Polygon2D geometries by given split points

Parameters:

  • polygon2D (Polygon2D) –

    The polygon to split

  • splitPoints (Point3DList) –

    The given split points (e.g. intersection points between polygon2D and splitGeometry)

  • pSplitGeometry (object) –

    Can be NULL. The Geometry who splits the element. If available it maybe used as alternative for splitPoints

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

  • tuple[eSplitResult, list[Polygon2D]]

    tuple(eSplitResult, SPLIT_OK on success, Vector of split polygons. Usually this vector has cardinality of two. First polygon is BoolOp of 'given polygon - splitPolygon'. Second polygon is BoolOp of 'given polygon& splitPolygon'. The splitPolygon is created from splitPoints)

Split(
    line2D: Line2D, splitPoints: Point3DList, posTol: float
) -> tuple[eSplitResult, list[Line2D]]

Split a Line2D into multiple Line2D geometries by given split points

Parameters:

  • line2D (Line2D) –

    The line to split

  • splitPoints (Point3DList) –

    The given split points (e.g. intersection points onto the line)

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

Split(
    polyline2D: Polyline2D, splitPoints: Point3DList, posTol: float
) -> tuple[eSplitResult, list[Polyline2D]]

Split a Polyline2D into multiple Polyline2D geometries by given split points

Parameters:

  • polyline2D (Polyline2D) –

    The polyline to split

  • splitPoints (Point3DList) –

    The given split points (e.g. intersection points onto the polyline)

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

Split(
    spline2D: Spline2D, splitPoints: Point3DList, posTol: float
) -> tuple[eSplitResult, list[Spline2D]]

Split a Spline2D into multiple Spline2D geometries by given split points

Parameters:

  • spline2D (Spline2D) –

    The spline to split

  • splitPoints (Point3DList) –

    The given split points (e.g. intersection points onto the spline)

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

Split(
    spline3D: Spline3D, splitPoints: Point3DList, posTol: float
) -> tuple[eSplitResult, list[Spline3D]]

Split a Spline3D into multiple Spline3D geometries by given split points

Parameters:

  • spline3D (Spline3D) –

    The spline to split

  • splitPoints (Point3DList) –

    The given split points (e.g. intersection points onto the spline)

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

Split(
    polyline2D: Polyline2D, polygon2D: Polygon2D, posTol: float
) -> tuple[eSplitResult, list[Polyline2D], list[Polyline2D]]

Split a Polyline2D into multiple Polyline2D geometries by given split polygon

Parameters:

  • polyline2D (Polyline2D) –

    The polyline to split

  • polygon2D (Polygon2D) –

    The given polygon

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

  • tuple[eSplitResult, list[Polyline2D], list[Polyline2D]]

    tuple(eSplitResult, SPLIT_OK on success, Vector of split polylines inside polygon, Vector of split polylines outside polygon)

Split(
    polygon: Polygon2D,
    polyline: Polyline2D,
    posTol: float,
    divideComponents: bool,
) -> tuple[eSplitResult, Polygon2D, Polygon2D, Polygon2D]

Split Polygon2D into 3 polygons by given Polyline2D

Parameters:

  • polygon (Polygon2D) –

    The polygon to split

  • polyline (Polyline2D) –

    The given polyline

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

  • divideComponents (bool) –

    If true, polygon will be split by intersection points of polyline and connection lines between components

Returns:

  • tuple[eSplitResult, Polygon2D, Polygon2D, Polygon2D]

    tuple(eSplitResult, SPLIT_OK on success, Polygon, which consist of not split components, Polygon, which consist of components on left side of polyline, Polygon, which consist of components on right side of polyline)

Split(
    polygon: Polygon2D, axis: Axis2D, posTol: float, divideComponents: bool
) -> tuple[eSplitResult, Polygon2D, Polygon2D, Polygon2D]

Split Polygon2D into 3 polygons by given Axis2D

Parameters:

  • polygon (Polygon2D) –

    The polygon to split

  • axis (Axis2D) –

    The given axis

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

  • divideComponents (bool) –

    If true, polygon will be split by intersection points of polyline and connection lines between components

Returns:

  • tuple[eSplitResult, Polygon2D, Polygon2D, Polygon2D]

    tuple(eSplitResult, SPLIT_OK on success, Polygon, which consist of not split components, Polygon, which consist of components on left side of polyline, Polygon, which consist of components on right side of polyline)

Split(
    line3D: Line3D, splitPoints: Point3DList, posTol: float
) -> tuple[eSplitResult, list[Line3D]]

Split a Line3D into multiple Line3D geometries by given split points

Parameters:

  • line3D (Line3D) –

    The line to split

  • splitPoints (Point3DList) –

    The given split points (e.g. intersection points onto the line)

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

Split(
    polyline3D: Polyline3D, splitPoints: Point3DList, posTol: float
) -> tuple[eSplitResult, list[Polyline3D]]

Split a Polyline3D into multiple Polyline3D geometries by given split points

Parameters:

  • polyline3D (Polyline3D) –

    The polyline to split

  • splitPoints (Point3DList) –

    The given split points (e.g. intersection points onto the line)

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

Split(
    arc3D: Arc3D, splitPoints: Point3DList, posTol: float
) -> tuple[eSplitResult, list[Arc3D]]

Split a Arc3D into multiple Arc3D geometries by given split points

Parameters:

  • arc3D (Arc3D) –

    The arc to split

  • splitPoints (Point3DList) –

    The given split points (e.g. intersection points onto the line)

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

Split(
    arc2D: Arc2D, splitPoints: Point3DList, posTol: float
) -> tuple[eSplitResult, list[Arc2D]]

Split a Arc2D into multiple Arc2D geometries by given split points

Parameters:

  • arc2D (Arc2D) –

    The arc to split

  • splitPoints (Point3DList) –

    The given split points (e.g. intersection points onto the arc)

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

Split(
    clothoid2D: Clothoid2D, splitPoints: Point3DList, posTol: float
) -> tuple[eSplitResult, list[Clothoid2D]]

Split a Clothoid2D into multiple Clothoid2D geometries by given split points

Parameters:

  • clothoid2D (Clothoid2D) –

    The clothoid to split

  • splitPoints (Point3DList) –

    The given split points (e.g. intersection points onto the clothoid)

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

Split(
    bspline2D: BSpline2D, splitPoints: Point3DList, posTol: float
) -> tuple[eSplitResult, list[BSpline2D]]

Split a BSpline2D into multiple BSpline2D geometries by given split points

Parameters:

  • bspline2D (BSpline2D) –

    The spline to split

  • splitPoints (Point3DList) –

    The given split points (e.g. intersection points onto the spline)

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

Split(
    bspline3D: BSpline3D, splitPoints: Point3DList, posTol: float
) -> tuple[eSplitResult, list[BSpline3D]]

Split a BSpline3D into multiple BSpline3D geometries by given split points

Parameters:

  • bspline3D (BSpline3D) –

    The spline to split

  • splitPoints (Point3DList) –

    The given split points (e.g. intersection points onto the spline)

  • posTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

Split(
    baseGeometry: object, point: Point3D, bGetFirstHalf: bool, eps: float
) -> object

Split the element in two and return one half

Parameters:

  • baseGeometry (object) –

    Geometry will be split

  • point (Point3D) –

    Split point

  • bGetFirstHalf (bool) –

    True, if the given point should be

  • eps (float) –

    Tolerance

Returns:

  • object

    first or second half or nullptr

SplitPolygon3DToParts

SplitPolygon3DToParts(polygon: Polygon3D) -> tuple

Splits normalized Polygon3D into parts

Parameters:

  • polygon (Polygon3D) –

    Normalized 3D polygon

Returns:

  • tuple

    eOK if converted successful, else eError,

Vector of parts (loops)

Tesselate overloaded

Tesselate(
    brep: BRep3D,
    density: float,
    maxAngle: float,
    minEdge: float,
    maxEdge: float,
) -> tuple

Tesselate b-rep with mesh triangles

Parameters:

  • brep (BRep3D) –

    brep to be tesselated

  • density (float) –

    density of resulting mesh (when 0, not used)

  • maxAngle (float) –

    maximal angle between neighbor triangles in degrees (when 0, not used)

  • minEdge (float) –

    minimal edge length (when 0, not used)

  • maxEdge (float) –

    maximal edge length (when 0, not used)

Returns:

  • tuple

    error code,

  • tuple

    resulting tesselated polyhedron

Tesselate(
    brep: BRep3D,
    density: float,
    chord: float,
    maxAngle: float,
    minEdge: float,
    maxEdge: float,
) -> tuple

Tesselate b-rep with mesh triangles

Parameters:

  • brep (BRep3D) –

    brep to be tesselated

  • density (float) –

    density of resulting mesh (when 0, not used)

  • chord (float) –

    curve/surface chord tolerance (when 0, not used)

  • maxAngle (float) –

    maximal angle between neighbor triangles in degrees (when 0, not used)

  • minEdge (float) –

    minimal edge length (when 0, not used)

  • maxEdge (float) –

    maximal edge length (when 0, not used)

Returns:

  • tuple

    error code,

  • tuple

    resulting tesselated polyhedron

Touching overloaded

Touching(line1: Line2D, line2: Line2D) -> bool

Test for collision between 2 line2D objects

Parameters:

  • line1 (Line2D) –

    the first geometry object

  • line2 (Line2D) –

    the second geometry object

Returns:

  • bool

    true when in touch, otherwise false.

Touching(polygon1: Polygon2D, polygon2: Polygon2D) -> bool

Test for collision between 2 polygon2D objects

Parameters:

  • polygon1 (Polygon2D) –

    the first geometry object

  • polygon2 (Polygon2D) –

    the second geometry object

Returns:

  • bool

    true when 1 or more lines in touch, otherwise false.

Touching(polygon: Polygon2D, polyline: Polyline2D) -> bool

Test for collision between polygon2D and polyline2D

Parameters:

  • polygon (Polygon2D) –

    the first geometry object

  • polyline (Polyline2D) –

    the second geometry object

Returns:

  • bool

    true when 1 or more lines in touch, otherwise false.

Transform overloaded

Transform(point: Point2D, matrix: Matrix2D) -> Point2D

Point2D matrix transformation.

Parameters:

  • point (Point2D) –

    2D point to transform.

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(line: Line2D, matrix: Matrix2D) -> Line2D

Line2D matrix transformation.

Parameters:

  • line (Line2D) –

    2D line to transform.

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(vec: Vector2D, matrix: Matrix2D) -> Vector2D

Vector2D matrix transformation.

Parameters:

  • vec (Vector2D) –

    2D vector to transform.

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(arc: Arc2D, matrix: Matrix2D) -> Arc2D

Arc2D matrix transformation.

Parameters:

  • arc (Arc2D) –

    2D arc to transform.

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(clothoid: Clothoid2D, matrix: Matrix2D) -> Clothoid2D

Clothoid2D matrix transformation.

Parameters:

  • clothoid (Clothoid2D) –

    2D clothoid to transform.

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(spline: Spline2D, matrix: Matrix2D) -> Spline2D

Spline2D matrix transformation.

Parameters:

  • spline (Spline2D) –

    2D spline to transform.

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(axis: Axis2D, matrix: Matrix2D) -> Axis2D

Axis2D matrix transformation.

Parameters:

  • axis (Axis2D) –

    2D axis to transform.

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(polyline: Polyline2D, matrix: Matrix2D) -> Polyline2D

Polyline2D matrix transformation.

Parameters:

  • polyline (Polyline2D) –

    2D polyline to transform.

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(path: Path2D, matrix: Matrix2D) -> Path2D

Path2D matrix transformation.

Parameters:

  • path (Path2D) –

    2D path to transform.

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(area: PolygonalArea2D, matrix: Matrix2D) -> PolygonalArea2D

PolygonalArea2D matrix transformation.

Parameters:

  • area (PolygonalArea2D) –

    2D polygonal area which will be transformed

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(area: ClosedArea2D, matrix: Matrix2D) -> ClosedArea2D

ClosedArea2D matrix transformation.

Parameters:

  • area (ClosedArea2D) –

    2D path bounded area which will be transformed

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(
    area: ClosedAreaComposite2D, matrix: Matrix2D
) -> ClosedAreaComposite2D

ClosedAreaComposite2D matrix transformation.

Parameters:

Transform(point: Point3D, matrix: Matrix3D) -> Point3D

Point3D matrix3D transformation.

Parameters:

  • point (Point3D) –

    3D point to transform.

  • matrix (Matrix3D) –

    Transformation 3D Matrix.

Transform(point: Point3D, matrix: Matrix2D) -> Point3D

Point3D matrix2D transformation.

Parameters:

  • point (Point3D) –

    3D point to transform.

  • matrix (Matrix2D) –

    Transformation 2D Matrix.

Transform(el: Line3D, matrix: Matrix3D) -> Line3D

Line3D matrix3D transformation.

Parameters:

  • el (Line3D) –

    3D line to transform.

  • matrix (Matrix3D) –

    Transformation 3D Matrix.

Transform(el: Line3D, matrix: Matrix2D) -> Line3D

Line3D matrix2D transformation.

Parameters:

  • el (Line3D) –

    3D line to transform.

  • matrix (Matrix2D) –

    Transformation 2D Matrix.

Transform(vec: Vector3D, matrix: Matrix3D) -> Vector3D

Vector3D matrix3D transformation.

Parameters:

  • vec (Vector3D) –

    3D vector to transform.

  • matrix (Matrix3D) –

    Transformation 3D Matrix.

Transform(vec: Vector3D, matrix: Matrix2D) -> Vector3D

Vector3D matrix2D transformation.

Parameters:

  • vec (Vector3D) –

    3D vector to transform.

  • matrix (Matrix2D) –

    Transformation 2D Matrix.

Transform(arc: Arc3D, matrix: Matrix3D) -> Arc3D

Arc3D matrix3D transformation.

Parameters:

  • arc (Arc3D) –

    3D arc to transform.

  • matrix (Matrix3D) –

    Transformation 3D Matrix.

Transform(arc: Arc3D, matrix: Matrix2D) -> Arc3D

Arc3D matrix2D transformation.

Parameters:

  • arc (Arc3D) –

    3D arc to transform.

  • matrix (Matrix2D) –

    Transformation 2D Matrix.

Transform(cuboid: Cuboid3D, matrix: Matrix3D) -> Cuboid3D

Cuboid3D matrix3D transformation.

Parameters:

  • cuboid (Cuboid3D) –

    3D cuboid to transform.

  • matrix (Matrix3D) –

    Transformation 3D Matrix.

Transform(cuboid: Cuboid3D, matrix: Matrix2D) -> Cuboid3D

Cuboid3D matrix2D transformation.

Parameters:

  • cuboid (Cuboid3D) –

    3D cuboid to transform.

  • matrix (Matrix2D) –

    Transformation 2D Matrix.

Transform(plane: Plane3D, matrix: Matrix3D) -> Plane3D

Plane3D matrix3D transformation.

Parameters:

  • plane (Plane3D) –

    3D plane to transform.

  • matrix (Matrix3D) –

    Transformation 3D Matrix.

Transform(plane: Plane3D, matrix: Matrix2D) -> Plane3D

Plane3D matrix2D transformation.

Parameters:

  • plane (Plane3D) –

    2D plane to transform.

  • matrix (Matrix2D) –

    Transformation 3D Matrix.

Transform(polygon: Polygon2D, matrix: Matrix2D) -> Polygon2D

Polyline2D matrix transformation.

Parameters:

  • polygon (Polygon2D) –

    2D polygon to transform.

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(polygon: Polygon3D, matrix: Matrix2D) -> Polygon3D

Polygon3D matrix transformation.

Parameters:

  • polygon (Polygon3D) –

    3D polygon to transform.

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(polygon: Polygon3D, matrix: Matrix3D) -> Polygon3D

Polygon3D matrix transformation.

Parameters:

  • polygon (Polygon3D) –

    3D polygon to transform.

  • matrix (Matrix3D) –

    Transformation Matrix.

Transform(polyline: Polyline3D, matrix: Matrix2D) -> Polyline3D

Polyline3D matrix transformation.

Parameters:

  • polyline (Polyline3D) –

    3D polyline to transform.

  • matrix (Matrix2D) –

    Transformation Matrix.

Transform(polyline: Polyline3D, matrix: Matrix3D) -> Polyline3D

Polyline3D matrix transformation.

Parameters:

  • polyline (Polyline3D) –

    3D polyline to transform.

  • matrix (Matrix3D) –

    Transformation Matrix.

Transform(spline: Spline3D, matrix: Matrix3D) -> Spline3D

Spline3D matrix transformation.

Parameters:

  • spline (Spline3D) –

    3D spline to transform.

  • matrix (Matrix3D) –

    Transformation Matrix.

Transform(polyhedron: Polyhedron3D, matrix: Matrix3D) -> Polyhedron3D

Polyhedron3D matrix3D transformation.

Parameters:

  • polyhedron (Polyhedron3D) –

    3D polyhedron to transform.

  • matrix (Matrix3D) –

    Transformation 3D Matrix.

Transform(polyhedron: Polyhedron3D, matrix: Matrix2D) -> Polyhedron3D

Polyhedron3D matrix2D transformation.

Parameters:

  • polyhedron (Polyhedron3D) –

    3D polyhedron to transform.

  • matrix (Matrix2D) –

    Transformation 2D Matrix.

Transform(axis: Axis3D, matrix: Matrix2D) -> Axis3D

Axis3D matrix2D transformation.

Parameters:

  • axis (Axis3D) –

    3D axis to transform.

  • matrix (Matrix2D) –

    Transformation 2D Matrix.

Transform(axis: Axis3D, matrix: Matrix3D) -> Axis3D

Axis3D matrix3D transformation.

Parameters:

  • axis (Axis3D) –

    3D axis to transform.

  • matrix (Matrix3D) –

    Transformation 3D Matrix.

Transform(path: Path3D, matrix: Matrix3D) -> Path3D

Path3D matrix3D transformation.

Parameters:

  • path (Path3D) –

    3D path to transform.

  • matrix (Matrix3D) –

    Transformation 3D Matrix.

Transform(path: Path3D, matrix: Matrix2D) -> Path3D

Path3D matrix2D transformation.

Parameters:

  • path (Path3D) –

    3D path to transform.

  • matrix (Matrix2D) –

    Transformation 2D Matrix.

Transform(area: PolygonalArea3D, matrix: Matrix2D) -> PolygonalArea3D

PolygonalArea3D matrix2D transformation.

Parameters:

  • area (PolygonalArea3D) –

    3D polygonal area which will be transformed

  • matrix (Matrix2D) –

    Transformation 2D Matrix.

Transform(area: PolygonalArea3D, matrix: Matrix3D) -> PolygonalArea3D

PolygonalArea3D matrix3D transformation.

Parameters:

  • area (PolygonalArea3D) –

    3D polygonal area which will be transformed

  • matrix (Matrix3D) –

    Transformation 3D Matrix.

Transform(solid: ClippedSweptSolid3D, matrix: Matrix2D) -> ClippedSweptSolid3D

ClippedSweptSolid3D matrix2D transformation.

Parameters:

Transform(solid: ClippedSweptSolid3D, matrix: Matrix3D) -> ClippedSweptSolid3D

ClippedSweptSolid3D matrix3D transformation.

This body is transformed by 2D transformations only to keep vertical extrusion of the profile.

Parameters:

Transform(cylinder: Cylinder3D, matrix: Matrix2D) -> Cylinder3D

Cylinder3D matrix2D transformation.

Parameters:

  • cylinder (Cylinder3D) –

    Cylinder3D which will be transformed

  • matrix (Matrix2D) –

    Transformation 2D Matrix.

Warning: Perspective transformation will not work correctly

Transform(cylinder: Cylinder3D, matrix: Matrix3D) -> Cylinder3D

Cylinder3D matrix3D transformation.

Parameters:

  • cylinder (Cylinder3D) –

    Cylinder3D which will be transformed

  • matrix (Matrix3D) –

    Transformation 3D Matrix.

Warning: Perspective transformation will not work correctly

Transform(ellipsoid: Ellipsoid3D, matrix: Matrix2D) -> Ellipsoid3D

Ellipsoid3D matrix2D transformation.

Parameters:

  • ellipsoid (Ellipsoid3D) –

    Ellipsoid3D which will be transformed

  • matrix (Matrix2D) –

    Transformation 2D Matrix.

Warning: Perspective transformation will not work correctly

Transform(ellipsoid: Ellipsoid3D, matrix: Matrix3D) -> Ellipsoid3D

Ellipsoid3D matrix3D transformation.

Parameters:

  • ellipsoid (Ellipsoid3D) –

    Ellipsoid3D which will be transformed

  • matrix (Matrix3D) –

    Transformation 3D Matrix.

Warning: Perspective transformation will not work correctly

Transform(brep: BRep3D, matrix: Matrix3D) -> BRep3D

BRep3D matrix3D transformation.

Parameters:

  • brep (BRep3D) –

    Brep3D to transform.

  • matrix (Matrix3D) –

    Transformation 3D Matrix.

Transform(brep: BRep3D, matrix: Matrix2D) -> BRep3D

BRep3D matrix2D transformation.

Parameters:

  • brep (BRep3D) –

    Brep3D to transform.

  • matrix (Matrix2D) –

    Transformation 3D Matrix.

Transform(spline: BSpline3D, matrix: Matrix3D) -> BSpline3D

BSpline3D matrix transformation

Parameters:

  • spline (BSpline3D) –

    Bspline3D to transform

  • matrix (Matrix3D) –

    Transformation 3D matrix

Transform(spline: BSpline3D, matrix: Matrix2D) -> BSpline3D

BSpline3D matrix transformation

Parameters:

  • spline (BSpline3D) –

    Bspline3D to transform

  • matrix (Matrix2D) –

    Transformation 2D matrix

Transform(cone: Cone3D, matrix: Matrix3D) -> Cone3D

Cone3D matrix transformation

Parameters:

  • cone (Cone3D) –

    Cone3D to transform

  • matrix (Matrix3D) –

    Transformation 3D matrix

Transform(cone: Cone3D, matrix: Matrix2D) -> Cone3D

Cone3D matrix transformation

Parameters:

  • cone (Cone3D) –

    Cone3D to transform

  • matrix (Matrix2D) –

    Transformation 2D matrix

Trim overloaded

Trim(
    spline: Spline2D,
    useStartSpline: bool,
    point1: Point2D,
    useEndSpline: bool,
    point2: Point2D,
    splineTol: float,
) -> tuple[eSplitResult, Spline2D]

Trim a Spline2D by given trim points

Flags useStartSpline, useEndSpline are optional and can not be never used, but if these flags are used, then calculation is faster. point1 and point2 are ordered during trimming when flags for spline points are not using. If spline flags is used, then point1 is always start point and pont2 is always end point of trimming. In this case, Trim function return SPLIT_INVALID_ARGS when points are in reversed order.

Parameters:

  • spline (Spline2D) –

    The spline to split

  • useStartSpline (bool) –

    True when trimming is from beginning of spline, point1 is ignored

  • point1 (Point2D) –

    The given trimming point1 (e.g. intersection points onto the spline)

  • useEndSpline (bool) –

    True when trimming is to end of spline, point2 is ignored

  • point2 (Point2D) –

    The given trimming point2 (e.g. intersection points onto the spline)

  • splineTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

Trim(
    clothoid: Clothoid2D,
    useStartClothoid: bool,
    point1: Point2D,
    useEndClothoid: bool,
    point2: Point2D,
    clothoidTol: float,
) -> tuple[eSplitResult, Clothoid2D]

Trim a Clothoid2D by given trim points

Flags useStartClothoid, useEndClothoid are optional and can not be never used, but if these flags are used, then calculation is faster. point1 and point2 are ordered during trimming when flags for clothoid points are not using. If clothoid flags is used, then point1 is always start point and pont2 is always end point of trimming. In this case, Trim function return SPLIT_INVALID_ARGS when points are in reversed order.

Parameters:

  • clothoid (Clothoid2D) –

    The clothoid to split

  • useStartClothoid (bool) –

    True when trimming is from beginning of clothoid, point1 is ignored

  • point1 (Point2D) –

    The given trimming point1 (e.g. intersection points onto the clothoid)

  • useEndClothoid (bool) –

    True when trimming is to end of clothoid, point2 is ignored

  • point2 (Point2D) –

    The given trimming point2 (e.g. intersection points onto the clothoid)

  • clothoidTol (float) –

    Tolerance being used to determine the position of split points on the input curve

Returns:

Unite overloaded

Unite(
    line1: Line2D,
    line2: Line2D,
    uniteMode: eUniteMode = eUniteMode.UNITE_OVERLAPPING_AND_TOUCHING,
) -> tuple[bool, Line2D]

Unite two overlapping or touching lines into one line. Lines must be located on the same axis but may have reverse orientations.

Parameters:

  • line1 (Line2D) –

    First line to be united into one resulting line

  • line2 (Line2D) –

    Second line to be united into one resulting line

  • uniteMode (eUniteMode, default: UNITE_OVERLAPPING_AND_TOUCHING ) –

    Predicates for the unite operation. See eUnitMode for details

Returns:

  • tuple[bool, Line2D]

    tuple(true if both input lines were united into one line, otherwise false, Resulting united line)

Unite(
    arc1: Arc2D,
    arc2: Arc2D,
    uniteMode: eUniteMode = eUniteMode.UNITE_OVERLAPPING_AND_TOUCHING,
) -> tuple[bool, Arc2D]

Unite two overlapping or touching arcs into one arcs. Arcs must have same basic properties (e.g. radius, midpoint, etc) but may have reverse orientations.

Parameters:

  • arc1 (Arc2D) –

    First arc to be united into one resulting line

  • arc2 (Arc2D) –

    Second line be united into one resulting line

  • uniteMode (eUniteMode, default: UNITE_OVERLAPPING_AND_TOUCHING ) –

    Predicates for the unite operation. See eUnitMode for details

Returns:

  • tuple[bool, Arc2D]

    tuple(true if both input arcs were united into one arc, otherwise false, Resulting united arc)

Unite(
    polyline1: Polyline2D,
    polyline2: Polyline2D,
    uniteMode: eUniteMode = eUniteMode.UNITE_OVERLAPPING_AND_TOUCHING,
) -> tuple[bool, Polyline2D]

Unite two overlapping, duplicate or touching polylines into one polyline. Polylines may have reverse orientations.

Parameters:

Returns:

  • tuple[bool, Polyline2D]

    tuple(true if both input polylines were united into one polyline, otherwise false, Resulting united polyline)

Placeholder