compas_pb.conversions
¤
Functions:¤
arc_from_pb
¤
arc_from_pb(proto_data: ArcData) -> Arc
Convert a protobuf message to COMPAS Arc.
Parameters:
-
proto_data(ArcData) –The protobuf message representing an Arc.
Returns:
-
Arc–The deserialized COMPAS Arc object.
arc_to_pb
¤
arc_to_pb(arc: Arc) -> ArcData
Convert a COMPAS Arc to protobuf message.
Parameters:
-
arc(Arc) –The COMPAS Arc object to serialize.
Returns:
-
ArcData–The protobuf message representing the Arc.
bezier_from_pb
¤
bezier_from_pb(proto_data: BezierData) -> Bezier
Convert a protobuf message to COMPAS Bezier.
Parameters:
-
proto_data(BezierData) –The protobuf message representing a Bezier.
Returns:
-
Bezier–The deserialized COMPAS Bezier object.
bezier_to_pb
¤
bezier_to_pb(bezier: Bezier) -> BezierData
Convert a COMPAS Bezier to protobuf message.
Parameters:
-
bezier(Bezier) –The COMPAS Bezier object to serialize.
Returns:
-
BezierData–The protobuf message representing the Bezier.
box_from_pb
¤
box_from_pb(proto_data: BoxData) -> Box
Convert a protobuf message to COMPAS Box.
Parameters:
-
proto_data(BoxData) –The protobuf message representing a Box.
Returns:
-
Box–The deserialized COMPAS Box object.
box_to_pb
¤
box_to_pb(box: Box) -> BoxData
Convert a COMPAS Box to protobuf message.
Parameters:
-
box(Box) –The COMPAS Box object to serialize.
Returns:
-
BoxData–The protobuf message representing the Box.
capsule_from_pb
¤
capsule_from_pb(proto_data: CapsuleData) -> Capsule
Convert a protobuf message to COMPAS Capsule.
Parameters:
-
proto_data(CapsuleData) –The protobuf message representing a Capsule.
Returns:
-
Capsule–The deserialized COMPAS Capsule object.
capsule_to_pb
¤
capsule_to_pb(capsule: Capsule) -> CapsuleData
Convert a COMPAS Capsule to protobuf message.
Parameters:
-
capsule(Capsule) –The COMPAS Capsule object to serialize.
Returns:
-
CapsuleData–The protobuf message representing the Capsule.
circle_from_pb
¤
circle_from_pb(proto_data: CircleData) -> Circle
Convert a protobuf message to COMPAS Circle.
Parameters:
-
proto_data(CircleData) –The protobuf message representing a Circle.
Returns:
-
Circle–The deserialized COMPAS Circle object.
circle_to_pb
¤
circle_to_pb(circle: Circle) -> CircleData
Convert a COMPAS Circle to protobuf message.
Parameters:
-
circle(Circle) –The COMPAS Circle object to serialize.
Returns:
-
CircleData–The protobuf message representing the Circle.
cone_from_pb
¤
cone_from_pb(proto_data: ConeData) -> Cone
Convert a protobuf message to COMPAS Cone.
Parameters:
-
proto_data(ConeData) –The protobuf message representing a Cone.
Returns:
-
Cone–The deserialized COMPAS Cone object.
cone_to_pb
¤
cone_to_pb(cone: Cone) -> ConeData
Convert a COMPAS Cone to protobuf message.
Parameters:
-
cone(Cone) –The COMPAS Cone object to serialize.
Returns:
-
ConeData–The protobuf message representing the Cone.
cylinder_from_pb
¤
cylinder_from_pb(proto_data: CylinderData) -> Cylinder
Convert a protobuf message to COMPAS Cylinder.
Parameters:
-
proto_data(CylinderData) –The protobuf message representing a Cylinder.
Returns:
-
Cylinder–The deserialized COMPAS Cylinder object.
cylinder_to_pb
¤
cylinder_to_pb(cylinder: Cylinder) -> CylinderData
Convert a COMPAS Cylinder to protobuf message.
Parameters:
-
cylinder(Cylinder) –The COMPAS Cylinder object to serialize.
Returns:
-
CylinderData–The protobuf message representing the Cylinder.
ellipse_from_pb
¤
ellipse_from_pb(proto_data: EllipseData) -> Ellipse
Convert a protobuf message to COMPAS Ellipse.
Parameters:
-
proto_data(EllipseData) –The protobuf message representing an Ellipse.
Returns:
-
Ellipse–The deserialized COMPAS Ellipse object.
ellipse_to_pb
¤
ellipse_to_pb(ellipse: Ellipse) -> EllipseData
Convert a COMPAS Ellipse to protobuf message.
Parameters:
-
ellipse(Ellipse) –The COMPAS Ellipse object to serialize.
Returns:
-
EllipseData–The protobuf message representing the Ellipse.
frame_from_pb
¤
frame_from_pb(proto_data: FrameData) -> Frame
Convert a protobuf message to COMPAS Frame.
Parameters:
-
proto_data(FrameData) –The protobuf message representing a Frame.
Returns:
-
Frame–The deserialized COMPAS Frame object.
frame_to_pb
¤
frame_to_pb(frame_obj: Frame) -> FrameData
Convert a COMPAS Frame to protobuf message.
Parameters:
-
frame_obj(Frame) –The COMPAS Frame object to serialize.
Returns:
-
FrameData–The protobuf message representing the Frame.
graph_from_pb
¤
graph_from_pb(proto_data: GraphData) -> Graph
Convert a protobuf message to COMPAS Graph.
Parameters:
-
proto_data(GraphData) –The protobuf message representing a Graph.
Returns:
-
Graph–The deserialized COMPAS Graph object.
graph_to_pb
¤
graph_to_pb(graph: Graph) -> GraphData
Convert a COMPAS Graph to protobuf message.
Parameters:
-
graph(Graph) –The COMPAS Graph object to serialize.
Returns:
-
GraphData–The protobuf message representing the Graph.
hyperbola_from_pb
¤
hyperbola_from_pb(proto_data: HyperbolaData) -> Hyperbola
Convert a protobuf message to COMPAS Hyperbola.
Parameters:
-
proto_data(HyperbolaData) –The protobuf message representing a Hyperbola.
Returns:
-
Hyperbola–The deserialized COMPAS Hyperbola object.
hyperbola_to_pb
¤
hyperbola_to_pb(hyperbola: Hyperbola) -> HyperbolaData
Convert a COMPAS Hyperbola to protobuf message.
Parameters:
-
hyperbola(Hyperbola) –The COMPAS Hyperbola object to serialize.
Returns:
-
HyperbolaData–The protobuf message representing the Hyperbola.
line_from_pb
¤
line_from_pb(proto_data: LineData) -> Line
Convert a protobuf message to COMPAS Line.
Parameters:
-
proto_data(LineData) –The protobuf message representing a Line.
Returns:
-
Line–The deserialized COMPAS Line object.
line_to_pb
¤
line_to_pb(line_obj: Line) -> LineData
Convert a COMPAS Line to protobuf message.
Parameters:
-
line_obj(Line) –The COMPAS Line object to serialize.
Returns:
-
LineData–The protobuf message representing the Line.
mesh_from_pb
¤
mesh_from_pb(proto_data: MeshData) -> Mesh
Convert a protobuf message to COMPAS Mesh.
Parameters:
-
proto_data(MeshData) –The protobuf message representing a Mesh.
Returns:
-
Mesh–The deserialized COMPAS Mesh object.
mesh_to_pb
¤
mesh_to_pb(mesh: Mesh) -> MeshData
Convert a COMPAS Mesh to protobuf message.
Parameters:
-
mesh(Mesh) –The COMPAS Mesh object to serialize.
Returns:
-
MeshData–The protobuf message representing the Mesh.
parabola_from_pb
¤
parabola_from_pb(proto_data: ParabolaData) -> Parabola
Convert a protobuf message to COMPAS Parabola.
Parameters:
-
proto_data(ParabolaData) –The protobuf message representing a Parabola.
Returns:
-
Parabola–The deserialized COMPAS Parabola object.
parabola_to_pb
¤
parabola_to_pb(parabola: Parabola) -> ParabolaData
Convert a COMPAS Parabola to protobuf message.
Parameters:
-
parabola(Parabola) –The COMPAS Parabola object to serialize.
Returns:
-
ParabolaData–The protobuf message representing the Parabola.
plane_from_pb
¤
plane_from_pb(proto_data: PlaneData) -> Plane
Convert a protobuf message to COMPAS Plane.
Parameters:
-
proto_data(PlaneData) –The protobuf message representing a Plane.
Returns:
-
Plane–The deserialized COMPAS Plane object.
plane_to_pb
¤
plane_to_pb(plane: Plane) -> PlaneData
Convert a COMPAS Plane to protobuf message.
Parameters:
-
plane(Plane) –The COMPAS Plane object to serialize.
Returns:
-
PlaneData–The protobuf message representing the Plane.
point_from_pb
¤
point_from_pb(proto_data: PointData) -> Point
Convert a protobuf message to COMPAS Point.
Parameters:
-
proto_data(PointData) –The protobuf message representing a Point.
Returns:
-
Point–The deserialized COMPAS Point object.
point_to_pb
¤
point_to_pb(obj: Point) -> PointData
Convert a COMPAS Point to protobuf message.
Parameters:
-
obj(Point) –The COMPAS Point object to serialize.
Returns:
-
PointData–The protobuf message representing the Point.
pointcloud_from_pb
¤
pointcloud_from_pb(proto_data: PointcloudData) -> Pointcloud
Convert a protobuf message to COMPAS Pointcloud.
Parameters:
-
proto_data(PointcloudData) –The protobuf message representing a Pointcloud.
Returns:
-
Pointcloud–The deserialized COMPAS Pointcloud object.
pointcloud_to_pb
¤
pointcloud_to_pb(pointcloud: Pointcloud) -> PointcloudData
Convert a COMPAS Pointcloud to protobuf message.
Parameters:
-
pointcloud(Pointcloud) –The COMPAS Pointcloud object to serialize.
Returns:
-
PointcloudData–The protobuf message representing the Pointcloud.
polygon_from_pb
¤
polygon_from_pb(proto_data: PolygonData) -> Polygon
Convert a protobuf message to COMPAS Polygon.
Parameters:
-
proto_data(PolygonData) –The protobuf message representing a Polygon.
Returns:
-
Polygon–The deserialized COMPAS Polygon object.
polygon_to_pb
¤
polygon_to_pb(polygon: Polygon) -> PolygonData
Convert a COMPAS Polygon to protobuf message.
Parameters:
-
polygon(Polygon) –The COMPAS Polygon object to serialize.
Returns:
-
PolygonData–The protobuf message representing the Polygon.
polyhedron_from_pb
¤
polyhedron_from_pb(proto_data: PolyhedronData) -> Polyhedron
Convert a protobuf message to COMPAS Polyhedron.
Parameters:
-
proto_data(PolyhedronData) –The protobuf message representing a Polyhedron.
Returns:
-
Polyhedron–The deserialized COMPAS Polyhedron object.
polyhedron_to_pb
¤
polyhedron_to_pb(polyhedron: Polyhedron) -> PolyhedronData
Convert a COMPAS Polyhedron to protobuf message.
Parameters:
-
polyhedron(Polyhedron) –The COMPAS Polyhedron object to serialize.
Returns:
-
PolyhedronData–The protobuf message representing the Polyhedron.
polyline_from_pb
¤
polyline_from_pb(proto_data: PolylineData) -> Polyline
Convert a protobuf message to COMPAS Polyline.
Parameters:
-
proto_data(PolylineData) –The protobuf message representing a Polyline.
Returns:
-
Polyline–The deserialized COMPAS Polyline object.
polyline_to_pb
¤
polyline_to_pb(polyline: Polyline) -> PolylineData
Convert a COMPAS Polyline to protobuf message.
Parameters:
-
polyline(Polyline) –The COMPAS Polyline object to serialize.
Returns:
-
PolylineData–The protobuf message representing the Polyline.
projection_from_pb
¤
projection_from_pb(proto_data: ProjectionData) -> Projection
Convert a protobuf message to COMPAS Projection.
Parameters:
-
proto_data(ProjectionData) –The protobuf message representing a Projection.
Returns:
-
Projection–The deserialized COMPAS Projection object.
projection_to_pb
¤
projection_to_pb(projection: Projection) -> ProjectionData
Convert a COMPAS Projection to protobuf message.
Parameters:
-
projection(Projection) –The COMPAS Projection object to serialize.
Returns:
-
ProjectionData–The protobuf message representing the Projection.
quaternion_from_pb
¤
quaternion_from_pb(proto_data: QuaternionData) -> Quaternion
Convert a protobuf message to COMPAS Quaternion.
Parameters:
-
proto_data(QuaternionData) –The protobuf message representing a Quaternion.
Returns:
-
Quaternion–The deserialized COMPAS Quaternion object.
quaternion_to_pb
¤
quaternion_to_pb(quaternion: Quaternion) -> QuaternionData
Convert a COMPAS Quaternion to protobuf message.
Parameters:
-
quaternion(Quaternion) –The COMPAS Quaternion object to serialize.
Returns:
-
QuaternionData–The protobuf message representing the Quaternion.
reflection_from_pb
¤
reflection_from_pb(proto_data: ReflectionData) -> Reflection
Convert a protobuf message to COMPAS Reflection.
Parameters:
-
proto_data(ReflectionData) –The protobuf message representing a Reflection.
Returns:
-
Reflection–The deserialized COMPAS Reflection object.
reflection_to_pb
¤
reflection_to_pb(reflection: Reflection) -> ReflectionData
Convert a COMPAS Reflection to protobuf message.
Parameters:
-
reflection(Reflection) –The COMPAS Reflection object to serialize.
Returns:
-
ReflectionData–The protobuf message representing the Reflection.
rotation_from_pb
¤
rotation_from_pb(proto_data: RotationData) -> Rotation
Convert a protobuf message to COMPAS Rotation.
Parameters:
-
proto_data(RotationData) –The protobuf message representing a Rotation.
Returns:
-
Rotation–The deserialized COMPAS Rotation object.
rotation_to_pb
¤
rotation_to_pb(rotation: Rotation) -> RotationData
Convert a COMPAS Rotation to protobuf message.
Parameters:
-
rotation(Rotation) –The COMPAS Rotation object to serialize.
Returns:
-
RotationData–The protobuf message representing the Rotation.
scale_from_pb
¤
scale_from_pb(proto_data: ScaleData) -> Scale
Convert a protobuf message to COMPAS Scale.
Parameters:
-
proto_data(ScaleData) –The protobuf message representing a Scale.
Returns:
-
Scale–The deserialized COMPAS Scale object.
scale_to_pb
¤
scale_to_pb(scale: Scale) -> ScaleData
Convert a COMPAS Scale to protobuf message.
Parameters:
-
scale(Scale) –The COMPAS Scale object to serialize.
Returns:
-
ScaleData–The protobuf message representing the Scale.
shear_from_pb
¤
shear_from_pb(proto_data: ShearData) -> Shear
Convert a protobuf message to COMPAS Shear.
Parameters:
-
proto_data(ShearData) –The protobuf message representing a Shear.
Returns:
-
Shear–The deserialized COMPAS Shear object.
shear_to_pb
¤
shear_to_pb(shear: Shear) -> ShearData
Convert a COMPAS Shear to protobuf message.
Parameters:
-
shear(Shear) –The COMPAS Shear object to serialize.
Returns:
-
ShearData–The protobuf message representing the Shear.
sphere_from_pb
¤
sphere_from_pb(proto_data: SphereData) -> Sphere
Convert a protobuf message to COMPAS Sphere.
Parameters:
-
proto_data(SphereData) –The protobuf message representing a Sphere.
Returns:
-
Sphere–The deserialized COMPAS Sphere object.
sphere_to_pb
¤
sphere_to_pb(sphere: Sphere) -> SphereData
Convert a COMPAS Sphere to protobuf message.
Parameters:
-
sphere(Sphere) –The COMPAS Sphere object to serialize.
Returns:
-
SphereData–The protobuf message representing the Sphere.
torus_from_pb
¤
torus_from_pb(proto_data: TorusData) -> Torus
Convert a protobuf message to COMPAS Torus.
Parameters:
-
proto_data(TorusData) –The protobuf message representing a Torus.
Returns:
-
Torus–The deserialized COMPAS Torus object.
torus_to_pb
¤
torus_to_pb(torus: Torus) -> TorusData
Convert a COMPAS Torus to protobuf message.
Parameters:
-
torus(Torus) –The COMPAS Torus object to serialize.
Returns:
-
TorusData–The protobuf message representing the Torus.
transformation_from_pb
¤
transformation_from_pb(proto_data: TransformationData) -> Transformation
Convert a protobuf message to COMPAS Transformation.
Parameters:
-
proto_data(TransformationData) –The protobuf message representing a Transformation.
Returns:
-
Transformation–The deserialized COMPAS Transformation object.
transformation_to_pb
¤
transformation_to_pb(transformation: Transformation) -> TransformationData
Convert a COMPAS Transformation to protobuf message.
Parameters:
-
transformation(Transformation) –The COMPAS Transformation object to serialize.
Returns:
-
TransformationData–The protobuf message representing the Transformation.
translation_from_pb
¤
translation_from_pb(proto_data: TranslationData) -> Translation
Convert a protobuf message to COMPAS Translation.
Parameters:
-
proto_data(TranslationData) –The protobuf message representing a Translation.
Returns:
-
Translation–The deserialized COMPAS Translation object.
translation_to_pb
¤
translation_to_pb(translation: Translation) -> TranslationData
Convert a COMPAS Translation to protobuf message.
Parameters:
-
translation(Translation) –The COMPAS Translation object to serialize.
Returns:
-
TranslationData–The protobuf message representing the Translation.