#pragma once #include #include #include #include "primitive_descriptor.h" #include "internal_structs.hpp" namespace internal { template using stl_vector = std::vector>; using constant = constant_descriptor_t; using plane = plane_descriptor_t; using sphere = sphere_descriptor_t; using cone = cone_descriptor_t; struct mesh { stl_vector vertices{}; stl_vector> faces{}; }; // CAUTION: in polyline local space, the X/Y axis should be according to local N/B directions struct polyline { std::vector vertices{}; // // for a straight line, it consists of two vertices; for a circle arc, it consists // of three vertices: start point, circle center, and a point on the circle to // construct local XY coordinate system std::vector thetas{}; // for a straight line, this should be 0 std::vector start_indices{}; // has the same size as thetas, indicating the starting index of each segment }; struct helixline { // Eigen::Vector3d start_point{}; // Eigen::Vector3d axis_direction{}; // Eigen::Vector3d base_direction_u{}; // Eigen::Vector3d base_direction_v{}; double radius{}; double total_theta{}; double height{}; }; struct extrude_polyline { Eigen::Transform world_to_axis{}; polyline axis{}; polyline profile{}; }; struct extrude_helixline { Eigen::Transform world_to_axis{}; helixline axis{}; polyline profile{}; }; } // namespace internal