34#include <NDEVR/File.h>
35#include <NDEVR/Angle.h>
36#include <NDEVR/LineSegment.h>
37#include <NDEVR/Font.h>
38#include <NDEVR/RGBColor.h>
49 , e_background_contrast
64 mat = mat.offset(model_space_bounds[MIN]);
66 if (paper_space_bounds.span()[Z] == 0.0 || scale[Z] == 0.0)
68 mat = mat.scale(scale);
69 mat = mat.offset(paper_space_origin);
79 RGBColor color = Constant<RGBColor>::Invalid;
82 return mode == other.mode && color == other.color;
86 return mode != other.mode || color != other.color;
110 var_type = CADVARType::e_double;
111 values.add({key_label ,
String(value) });
116 var_type = CADVARType::e_int;
117 values.add({ key_label ,
String(value) });
122 var_type = CADVARType::e_string;
123 values.add({ key_label ,
String(value) });
128 var_type = CADVARType::e_double;
129 values.add({ 10 ,
String(data[X]) });
130 values.add({ 20 ,
String(data[Y]) });
135 var_type = CADVARType::e_double;
136 values.add({ 10 ,
String(data[X]) });
137 values.add({ 20 ,
String(data[Y]) });
138 values.add({ 30 ,
String(data[Z]) });
179 , e_frozen_by_default
195 struct BlockData :
public LayerData
200 : LayerData(name, flags)
219 LineTypeData(
const String& name,
const String& description,
int flags,
uint04 numberOfDashes,
double patternLength)
221 , description(description)
223 , number_of_dashes(numberOfDashes)
224 , pattern_length(patternLength)
228 , description(description)
230 , number_of_dashes(numberOfDashes)
231 , pattern_length(patternLength)
249 , fixed_text_height(Constant<fltp08>::Invalid)
252 , text_generation_flags(0)
253 , last_height_used(Constant<fltp08>::Invalid)
254 , primary_font_file(
File())
255 , big_font_file(
File())
259 StyleData(
const String& name,
int flags,
double fixedTextHeight,
double widthFactor,
double obliqueAngle,
260 int textGenerationFlags,
double lastHeightUsed,
const String& primaryFontFile,
const String& bigFontFile)
263 , fixed_text_height(fixedTextHeight)
264 , width_factor(widthFactor)
265 , oblique_angle(obliqueAngle)
266 , text_generation_flags(textGenerationFlags)
267 , last_height_used(lastHeightUsed)
268 , primary_font_file(primaryFontFile)
269 , big_font_file(bigFontFile)
274 bool operator==(
const StyleData& other)
const
277 return (name == other.name && flags == other.flags && fixed_text_height == other.fixed_text_height &&
278 width_factor == other.width_factor && oblique_angle == other.oblique_angle &&
279 primary_font_file == other.primary_font_file && big_font_file == other.big_font_file);
299 : offset(center_point)
301 , thickness(Constant<fltp08>::Invalid)
339 CurveType curve_type = CurveType::e_no_smooth;
340 uint04 vertex_count = Constant<uint04>::Invalid;
341 uint04 m = Constant<uint04>::Invalid;
342 uint04 n = Constant<uint04>::Invalid;
356 bool is_solid =
false;
380 enum PropertyOverrideType
385 , e_material_mapper = 3
391 uint04 sub_entity_marker = 0;
392 PropertyOverrideType type = e_color;
404 uint04 version_number = 2;
405 uint04 subdivide_level = 0;
406 uint04 data_dictionary_reference = Constant<uint04>::Invalid;
407 bool bend_crease =
false;
418 : insertion_point(insertion_point)
419 , direction_vector(direction)
422 , drawing_direction(drawingDirection)
423 , line_spacing_style(lineSpacingStyle)
424 , line_spacing_factor(lineSpacingFactor)
440 int drawing_direction;
441 int line_spacing_style;
442 fltp04 line_spacing_factor;
456 fltp08 height = Constant<fltp08>::Invalid;
457 fltp08 reference_width = Constant<fltp08>::Invalid;
458 fltp08 thickness = Constant<fltp08>::Invalid;
462 fltp08 line_spacing_factor = 1.0;
465 bool is_m_text =
false;
474 e_attribute_invisible
475 , e_constant_attribute
476 , e_verification_required
477 , e_no_prompt_on_insertion
482 bool is_locked =
false;
490 fltp08 thickness = Constant<fltp08>::Invalid;
500 fltp08 thickness = Constant<fltp08>::Invalid;
501 fltp08 minor_to_major_ratio;
533 bool attribute_to_follow;
573 uint01 attachment_point_align = 5;
574 int line_spacing_style;
575 fltp08 line_spacing_factor;
579 double linear_factor;
583 String dimension_block_name;
616 uint04 handle = Constant<uint04>::Invalid;
618 bool hard_owned =
true;
622 handle = Constant<uint04>::Invalid;
633 : coordinate(coordinate)
646 : def_point(def_point)
656 template<u
int04 t_data_count>
661 static_assert(t_data_count == 3,
"Wrong Argument Count");
662 def_points[0] = def_point_1;
663 def_points[1] = def_point_2;
664 def_points[2] = def_point_3;
669 static_assert(t_data_count == 4,
"Wrong Argument Count");
670 def_points[0] = def_point_1;
671 def_points[1] = def_point_2;
672 def_points[2] = def_point_3;
673 def_points[3] = def_point_4;
680 struct DimOrdinateData :
public LineSegment<3, fltp08>,
public DimensionData
683 : LineSegment<3, fltp08>(p1, p2)
687 DimOrdinateData(LineSegment<3, fltp08>& dimension,
bool type)
688 : LineSegment<3, fltp08>(dimension)
704 : text_annotation_size(Constant<fltp08>::Invalid)
705 , use_arrowhead(
false)
706 , leader_path_type(e_segments)
707 , leader_creation_flag(
BitFlag(0))
708 , hookline_direction_flag(
BitFlag(0))
711 LeaderData(
bool lArrowHeadFlag, LeaderPathType lLeaderPathType,
int lLeaderCreationFlag,
int lHooklineDirectionFlag
712 ,
int lHooklineFlag,
fltp08 lTextAnnotationHeight,
fltp08 lTextAnnotationWidth)
713 : text_annotation_size(lTextAnnotationWidth, lTextAnnotationHeight)
714 , use_arrowhead(lArrowHeadFlag)
715 , leader_path_type(lLeaderPathType)
716 , leader_creation_flag(lLeaderCreationFlag)
717 , hookline_direction_flag(lHooklineDirectionFlag)
718 , hookline_flag(lHooklineFlag)
723 LeaderPathType leader_path_type;
725 BitFlag hookline_direction_flag;
739 , scale(Constant<fltp08>::Invalid)
740 , num_loops(Constant<uint04>::Invalid)
745 : pattern_origin(origin)
746 , pattern_name(std::move(pattern))
748 , num_loops(numLoops)
765 : num_of_edges(Constant<uint04>::Invalid)
767 HatchLoopData(
uint04 num_edges)
768 : num_of_edges(num_edges)
783 , radius(Constant<fltp08>::Invalid)
784 , axis_ratio(Constant<fltp08>::Invalid)
792 : line(std::move(line))
797 , radius(Constant<fltp08>::Invalid)
798 , axis_ratio(Constant<fltp08>::Invalid)
808 , center_point(arc_center)
813 , angle_start(angle_start)
814 , angle_end(angle_end)
815 , axis_ratio(Constant<fltp08>::Invalid)
825 , center_point(center)
828 , axis_major_point(axis_major_point)
829 , radius(Constant<fltp08>::Invalid)
830 , angle_start(angle1)
833 , type(e_elliptic_arc)
840 HatchEdgeData(
uint01 degree,
bool rational,
bool periodic,
847 : control_points(std::move(controlPoints))
848 , fit_points(std::move(fitPoints))
849 , knots(std::move(knots))
850 , weights(std::move(weights))
853 , start_tangent(start_tangent)
854 , end_tangent(end_tangent)
856 , radius(Constant<fltp08>::Invalid)
857 , axis_ratio(Constant<fltp08>::Invalid)
903 uint04 handle = Constant<uint04>::Invalid;
914 fltp08 perspective_lens_length = 1.0;
915 fltp08 elevation = Constant<fltp08>::Invalid;
924 , e_enable_front_clipping
925 , e_enable_back_clipping
926 , e_enable_ucs_follow
927 , e_enable_front_clip
928 , e_enable_icon_visible
929 , e_enable_ucs_icon_at_origin
937 , e_enable_viewport_zoom_lock
939 , e_enable_non_rect_clipping
941 , e_grid_beyond_limits
944 , e_grid_follows_workplane
953 , e_gouraud_shaded = 4
954 , e_flat_shaded_with_wireframe = 5
955 , e_gouraud_shaded_with_wireframe = 6
959 e_perspective_view = 0
960 , e_front_clipping = 1
961 , e_back_clipping = 2
962 , e_ucs_follow_mode = 3
963 , e_front_clipping_not_at_camera = 4
965 enum OrthographicMode
967 e_not_orthographic = 0
975 bool has_grid =
false;
976 bool is_vport =
false;
978 RenderMode render_mode = e_2D_optimized;
989 , insertion_point(insertion_point)
990 , bottom_vector(bottom_vector)
991 , left_side(left_side)
992 , image_size(iwidth, iheight)
993 , brightness(ibrightness)
994 , contrast(icontrast)
1014 bool use_value =
false;
1015 fltp08 color_intensity = 1.0;
1016 RGBColor color = Constant<RGBColor>::Invalid;
1023 fltp08 map_blend_factor = 1.0;
1024 bool use_current_scene =
true;
1026 RGBColor color = Constant<RGBColor>::Invalid;
1039 fltp08 specular_gloss_factor = 0.5;
1040 fltp08 opacity_percent = 1.0;
1052 bool is_named =
false;
1053 bool selectable =
false;
1081 : m_direction(direction)
1082 , m_elevation(elevation)
1087 m_direction[0] = dx;
1088 m_direction[1] = dy;
1089 m_direction[2] = dz;
1093 void setElevation(
double elevation) { m_elevation = elevation; }
1094 fltp08 getElevation()
const {
return m_elevation; }
Stores an angle in an optimized internal format with support for efficient trigonometric operations.
A bitset that stores 8 bits (elements with only two possible values: 0 or 1, true or false,...
A specification of upper and lower bounds in N-dimensions.
The equivelent of std::vector but with a bit more control.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Templated logic for doing matrix multiplication.
Represents a color in the RGB space with optional alpha transparency.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
A point in N-dimensional space, used primarily for spatial location information.
The primary namespace for the NDEVR SDK.
@ BitFlag
Per-vertex bit flags (selected, hidden, etc.).
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
int32_t sint04
-Defines an alias representing a 4 byte, signed integer.
@ DEGREES
Angle measured in degrees (0 to 360 for a full circle).
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
static constexpr bool IsInvalid(const Angle< t_type > &value)
Checks whether the given Angle holds an invalid value.
ColorMode
Modes that CAD can use to color objects.
Logic for storing attribute data in a CAD-friendly way for exporting and importing.
Information for how to place a CAD block within a scene (Similar to Model).
Stores color information for interfacing with CAD.
A container for information pointing to a CAD dictionary in CAD memory.
logic for storing a circle data in a CAD-friendly way for exporting and importing.
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
A type of entity in CAD representing several entities grouped together.
A DXF friendly material class which contains UV properties similar to a Material object.
Dimensional measurements stored in a CAD-friendly way.
Stores Ellipse information for interfacing with CAD.
An entity in CAD which has a layer and other handle information.
uint04 file_line_number
Line number in the source file.
CADColorInfo color_info
Color information for this entity.
bool is_off
Whether the entity layer is off.
String layer
The layer this entity belongs to.
uint04 material_handle
Handle to the associated material.
PaperSpace paper_space_info
Paper space configuration for this entity.
bool visible
Whether this entity is visible.
fltp08 line_type_scale
Scale factor for the line type pattern.
bool paper_space
Whether this entity is in paper space.
String line_type
The line type name for this entity.
Data for extruding an object onto a plane in CAD.
fltp08 elevation
The elevation above the extrusion plane.
Vector< 3, fltp08 > extrusion
The extrusion direction vector.
A handle used to reference an object in CAD.
uint04 handle
The handle of this object.
uint04 file_line_number
The line number in the source file.
uint04 parent_handle
The handle of the parent object.
A CAD-friendly way to store line segment information.
int attachment_point
Attachment point.
Provides CAD information for managing images attached to a Material.
UVOptions used for interfacing with CAD, similar to those used by a Material object.
Stores CAD details about PaperSpace or 2D document space.
Data about where to place an object, used for interfacing with CAD.
Point data stored in a friendly way for interfacing with CAD.
logic for storing a polyline data in a CAD-friendly way for exporting and importing.
logic for storing a text data in a CAD-friendly way for exporting and importing.
logic for storing a viewport in a CAD-friendly way for exporting and importing.