ladybug_geometry.geometry3d.arc module¶

3D Arc

class ladybug_geometry.geometry3d.arc.Arc3D(plane, radius, a1=0, a2=6.283185307179586)[source]

Bases: `object`

3D arc object.

Parameters
• plane – A Plane in which the arc lies with an origin representing the center of the circle for the arc.

• radius – A number representing the radius of the arc.

• a1 – A number between 0 and 2 * pi for the start angle of the arc.

• a2 – A number between 0 and 2 * pi for the end angle of the arc.

Properties:
• plane

• radius

• a1

• a2

• p1

• p2

• midpoint

• c

• min

• max

• length

• angle

• is_circle

• is_inverted

• arc2d

ToString()[source]

Overwrite .NET ToString.

closest_point(point)[source]

Get the closest Point3D on this object to another Point3D.

Parameters

point – A Point3D object to which the closest point on this object will be computed.

Returns

Point3D for the closest point on this line to the input point.

distance_to_point(point)[source]

Get the minimum distance between this object and the input point.

Parameters

point – A Point3D object to which the minimum distance will be computed.

Returns

The distance to the input point.

duplicate()[source]

Get a copy of this object.

classmethod from_arc2d(arc2d, z=0)[source]

Initialize a new Arc3D from an Arc2D and a z value.

Parameters
• arc2d – An Arc2D to be used to generate the Arc3D.

• z – A number for the Z coordinate value of the arc.

classmethod from_dict(data)[source]

Create a Arc3D from a dictionary.

Parameters

data – A python dictionary in the following format

```{
"type": "Arc3D"
"plane": {"n": (0, 0, 1), "o": (0, 10, 0), "x": (1, 0, 0)},
"radius": 5,
"a1": 0,
"a2": 3.14159
}
```
classmethod from_start_mid_end(p1, m, p2, circle=False)[source]

Initialize a new arc from start, middle, and end points.

Note that input points will be assumed to be in counterclockwise order.

Parameters
• p1 – The start point of the arc.

• m – Any point along the length of the arc that is not the start or end.

• p2 – The end point of the arc.

• circle – Set to True if you would like the output to be a full circle defined by the three points instead of an arc with a start and end. Default is False.

intersect_plane(plane)[source]

Get the intersection between this Arc3D and a Plane.

Parameters

plane – A Plane that will be intersected with this arc.

Returns

A list of Point3D objects if the intersection was successful. None if no intersection exists.

move(moving_vec)[source]

Get an arc that has been moved along a vector.

Parameters

moving_vec – A Vector3D with the direction and distance to move the arc.

point_at(parameter)[source]

Get a point at a given fraction along the arc.

Parameters

parameter – The fraction between the start and end point where the desired point lies. For example, 0.5 will yield the midpoint.

point_at_angle(angle)[source]

Get a point at a given angle along the arc.

Parameters

angle – The angle in radians from the start point along the arc to get the Point3D.

point_at_length(length)[source]

Get a point at a given distance along the arc segment.

Parameters

length – The distance along the arc from the start point where the desired point lies.

reflect(normal, origin)[source]

Get a arc reflected across a plane with the input normal vector and origin.

Parameters
• normal – A Vector3D representing the normal vector for the plane across which the arc will be reflected. THIS VECTOR MUST BE NORMALIZED.

• origin – A Point3D representing the origin from which to reflect.

rotate(axis, angle, origin)[source]

Rotate this arc by a certain angle around an axis and origin.

Right hand rule applies: If axis has a positive orientation, rotation will be clockwise. If axis has a negative orientation, rotation will be counterclockwise.

Parameters
• axis – A Vector3D axis representing the axis of rotation.

• angle – An angle for rotation in radians.

• origin – A Point3D for the origin around which the object will be rotated.

rotate_xy(angle, origin)[source]

Get a arc that is rotated counterclockwise in the world XY plane by a certain angle.

Parameters
• angle – An angle for rotation in radians.

• origin – A Point3D for the origin around which the arc will be rotated.

scale(factor, origin=None)[source]

Scale a arc by a factor from an origin point.

Parameters
• factor – A number representing how much the arc should be scaled.

• origin – A Point2D representing the origin from which to scale. If None, it will be scaled from the World origin (0, 0, 0).

split_with_plane(plane)[source]

Split this Arc3D in 2 or 3 smaller arcs using a Plane.

Parameters

plane – A Plane that will be used to split this arc.

Returns

A list with two or three Arc3D objects if the split was successful. Will be a list with 1 Arc3D if no intersection exists.

subdivide(distances)[source]

Get Point3D values along the arc that subdivide it based on input distances.

Parameters

distances – A list of distances along the arc at which to subdivide it. This can also be a single number that will be repeated until the end of the arc.

subdivide_evenly(number)[source]

Get Point3D values along the arc that divide it into evenly-spaced segments.

Parameters

number – The number of segments into which the arc will be divided.

to_dict()[source]

Get Arc3D as a dictionary.

to_polyline(divisions, interpolated=True)[source]

Get this Arc3D as an approximated Polyline3D.

Parameters
• divisions – The number of segments into which the arc will be divided.

• interpolated – Boolean to note whether the polyline should be interpolated between the input vertices when it is translated to other interfaces. This property has no effect on the geometric calculations performed by this library and is only present in order to assist with display/translation. (Default: True)

property a1

Start angle of the arc in radians.

property a2

End angle of the arc in radians.

property angle

The total angle over the domain of the arc in radians.

property arc2d

An Arc2D within the plane of the Arc3D.

property area

Area of the circle to which the arc belongs.

property c

Center point of the circle on which the arc lies.

property is_circle

Boolean for whether the arc is a full circle (True) or not (False).

property is_inverted

Boolean noting whether the end angle a2 is smaller than the start angle a1.

property length

The length of the arc.

property max

A Point3D for the maximum bounding box vertex around this geometry.

property midpoint

Midpoint.

property min

A Point3D for the minimum bounding box vertex around this geometry.

property p1

Start point.

property p2

End point.

property plane

A Plane in which the arc lies with an origin for the center of the arc.

property radius

Radius of arc.