22#if !defined(OPENNURBS_DEFINES_INC_)
23#define OPENNURBS_DEFINES_INC_
25#if defined (cplusplus) || defined(_cplusplus) || defined(__cplusplus) || defined(ON_CPLUSPLUS)
28#if !defined(ON_CPLUSPLUS)
31#define ON_EXTERNC extern "C"
32#define ON_BEGIN_EXTERNC extern "C" {
33#define ON_END_EXTERNC }
40#define ON_BEGIN_EXTERNC
64#if defined(ON_DLL_EXPORTS)
66#if !defined(ON_COMPILING_OPENNURBS)
67#error When compiling an OpenNURBS DLL, ON_DLL_EXPORTS must be defined
71#define ON_CLASS __declspec(dllexport)
72#define ON_DECL __declspec(dllexport)
73#define ON_EXTERN_DECL __declspec(dllexport)
74#define ON_DLL_TEMPLATE
76#elif defined(ON_DLL_IMPORTS)
78#if defined(ON_COMPILING_OPENNURBS)
79#error When compiling an OpenNURBS DLL, ON_DLL_IMPORTS must NOT be defined
83#define ON_CLASS __declspec(dllimport)
84#define ON_DECL __declspec(dllimport)
85#define ON_EXTERN_DECL __declspec(dllimport)
86#define ON_DLL_TEMPLATE extern
95#if defined(ON_DLL_TEMPLATE)
103#if defined(ON_COMPILER_MSC)
104#define ON_DEPRECATED __declspec(deprecated)
112#define ON_PI 3.141592653589793238462643
115#define ON_DEGREES_TO_RADIANS ON_PI/180.0
116#define ON_RADIANS_TO_DEGREES 180.0/ON_PI
118#define ON_SQRT2 1.414213562373095048801689
119#define ON_SQRT3 1.732050807568877293527446
120#define ON_SQRT3_OVER_2 0.8660254037844386467637230
121#define ON_1_OVER_SQRT2 0.7071067811865475244008445
122#define ON_SIN_PI_OVER_12 0.2588190451025207623488990
123#define ON_COS_PI_OVER_12 0.9659258262890682867497433
125#define ON_LOG2 0.6931471805599453094172321
126#define ON_LOG10 2.302585092994045684017991
128#define ON_ArrayCount(a) (sizeof(a)/sizeof((a)[0]))
131#define ON_DBL_MAX DBL_MAX
133#define ON_DBL_MAX 1.7976931348623158e+308
137#define ON_DBL_MIN DBL_MIN
139#define ON_DBL_MIN 2.22507385850720200e-308
142#if defined(DBL_EPSILON)
143#define ON_EPSILON DBL_EPSILON
145#define ON_EPSILON 2.2204460492503131e-16
147#define ON_SQRT_EPSILON 1.490116119385000000e-8
172#define ON_UNSET_VALUE -1.23432101234321e+308
181#define ON_UNSET_FLOAT -1.234321e+38f
228#define ON_UNSET_COLOR 0xFFFFFFFF
238#define ON_ZERO_TOLERANCE 1.0e-12
241#define ON_DEFAULT_ANGLE_TOLERANCE (ON_PI/180.0)
242#define ON_MINIMUM_ANGLE_TOLERANCE (ON_DEFAULT_ANGLE_TOLERANCE/10.0)
279#if defined(ON_CPLUSPLUS)
309 const char* Revision();
315 const char* filename,
321 const wchar_t* filename,
322 const wchar_t* filemode
346 bool GetFileStats(
const wchar_t* filename,
349 time_t* lastmodify_time
353 bool GetFileStats( FILE* fp,
356 time_t* lastmodify_time
373 static eAnnotationType AnnotationType(
int);
377 enum eTextDisplayMode
385 static eTextDisplayMode TextDisplayMode(
int);
395 static active_space ActiveSpace(
int);
455 custom_unit_system = 11
458 static unit_system UnitSystem(
int);
477 static double UnitScale(
478 ON::unit_system us_from,
479 ON::unit_system us_to
481 static double UnitScale(
485 static double UnitScale(
486 ON::unit_system us_from,
489 static double UnitScale(
491 ON::unit_system us_to
493 static double UnitScale(
512 unknown_point_style = 0,
514 homogeneous_rational = 2,
515 euclidean_rational = 3,
516 intrinsic_point_style = 4,
517 point_style_count = 5
520 static point_style PointStyle(
int);
525 unknown_knot_style = 0,
527 quasi_uniform_knots = 2,
528 piecewise_bezier_knots = 3,
529 clamped_end_knots = 4,
530 non_uniform_knots = 5,
534 static knot_style KnotStyle(
int);
539 unknown_continuity = 0,
565 C0_locus_continuous = 6,
566 C1_locus_continuous = 7,
567 C2_locus_continuous = 8,
568 G1_locus_continuous = 9,
569 G2_locus_continuous = 10,
571 Cinfinity_continuous = 11,
578 static continuity Continuity(
int);
586 static continuity ParametricContinuity(
int);
591 unknown_curve_style = 0,
599 planar_freeform_curve = 8,
601 curve_style_count = 10
604 static curve_style CurveStyle(
int);
609 unknown_surface_style = 0,
611 circular_cylinder = 2,
612 elliptical_cylinder = 3,
617 surface_of_revolution = 8,
619 freeform_surface = 10,
620 surface_style_count = 11
623 static surface_style SurfaceStyle(
int);
632 static sort_algorithm SortAlgorithm(
int);
640 static endian Endian(
int);
641 static endian Endian();
646 unknown_archive_mode = 0,
653 static archive_mode ArchiveMode(
int);
679 static view_projection ViewProjection(
int i);
687 static bool IsPerspectiveProjection( ON::view_projection projection );
696 static bool IsParallelProjection( ON::view_projection projection );
700 enum coordinate_system
708 static coordinate_system CoordinateSystem(
int);
713 unknown_exception = 0,
717 unable_to_write_archive,
718 unable_to_read_archive,
719 unable_to_seek_archive,
720 unexpected_end_of_archive,
721 unexpected_value_in_archive
723 static exception_type ExceptionType(
int);
734 static layer_mode LayerMode(
int);
745 object_mode_count = 4
747 static object_mode ObjectMode(
int);
750 enum object_color_source
752 color_from_layer = 0,
753 color_from_object = 1,
754 color_from_material = 2,
755 color_from_parent = 3
758 static object_color_source ObjectColorSource(
int);
761 enum plot_color_source
763 plot_color_from_layer = 0,
764 plot_color_from_object = 1,
765 plot_color_from_display = 2,
766 plot_color_from_parent = 3
769 static plot_color_source PlotColorSource(
int);
772 enum plot_weight_source
774 plot_weight_from_layer = 0,
775 plot_weight_from_object = 1,
776 plot_weight_from_parent = 3
779 static plot_weight_source PlotWeightSource(
int);
782 enum object_linetype_source
784 linetype_from_layer = 0,
785 linetype_from_object = 1,
786 linetype_from_parent = 3
789 static object_linetype_source ObjectLinetypeSource(
int);
792 enum object_material_source
794 material_from_layer = 0,
795 material_from_object = 1,
796 material_from_parent = 3
805 static object_material_source ObjectMaterialSource(
int);
810 unknown_light_style = 0,
814 camera_directional_light = 4,
815 camera_point_light = 5,
816 camera_spot_light = 6,
817 world_directional_light = 7,
818 world_point_light = 8,
819 world_spot_light = 9,
821 world_linear_light = 11,
822 world_rectangular_light = 12,
823 light_style_count = 13
825 static light_style LightStyle(
int);
830 unknown_curvature_style = 0,
831 gaussian_curvature = 1,
835 curvature_style_count = 5
837 static curvature_style CurvatureStyle(
int);
843 wireframe_display = 1,
845 renderpreview_display = 3
847 static display_mode DisplayMode(
int);
858 nested_view_type = 2,
862 static view_type ViewType(
int);
871 modulate_texture = 1,
875 static texture_mode TextureMode(
int);
887 unknown_object_type = 0,
896 material_object = 0x80,
897 light_object = 0x100,
898 annotation_object = 0x200,
899 userdata_object = 0x400,
900 instance_definition = 0x800,
901 instance_reference = 0x1000,
903 grip_object = 0x4000,
904 detail_object = 0x8000,
905 hatch_object = 0x10000,
906 morph_control_object = 0x20000,
907 loop_object = 0x80000,
908 polysrf_filter = 0x200000,
909 edge_filter = 0x400000,
910 polyedge_filter = 0x800000,
911 meshvertex_object = 0x01000000,
912 meshedge_object = 0x02000000,
913 meshface_object = 0x04000000,
914 cage_object = 0x08000000,
915 phantom_object = 0x10000000,
916 clipplane_object = 0x20000000,
917 beam_object = 0x40000000,
918 extrusion_object = 0x40000000,
920 any_object = 0xFFFFFFFF
925 static object_type ObjectType(
int);
930 unknown_bitmap_type = 0,
935 static bitmap_type BitmapType(
int);
937 enum object_decoration
939 no_object_decoration = 0,
940 start_arrowhead = 0x08,
941 end_arrowhead = 0x10,
942 both_arrowhead = 0x18
944 static object_decoration ObjectDecoration(
int);
954 static mesh_type MeshType(
int);
975 os_intersection = 0x2000,
977 os_perpendicular = 0x80000,
978 os_tangent = 0x200000,
979 os_point = 0x08000000,
982 os_all_snaps = 0xFFFFFFF
984 static osnap_mode OSnapMode(
int);
1006 enum cubic_loft_end_condition
1008 cubic_loft_ec_quadratic = 0,
1009 cubic_loft_ec_linear = 1,
1010 cubic_loft_ec_cubic = 2,
1011 cubic_loft_ec_natural = 3,
1012 cubic_loft_ec_unit_tangent = 4,
1013 cubic_loft_ec_1st_derivative = 5,
1014 cubic_loft_ec_2nd_derivative = 6,
1015 cubic_loft_ec_free_cv = 7
1030 cubic_loft_end_condition CubicLoftEndCondition(
int i);
1063 meshtop_vertex = 12,
1067 polycurve_segment = 31,
1068 pointcloud_point = 41,
1070 extrusion_bottom_profile = 61,
1071 extrusion_top_profile = 62,
1072 dim_linear_point = 100,
1073 dim_radial_point = 101,
1074 dim_angular_point = 102,
1075 dim_ordinate_point = 103,
1076 dim_text_point = 104,
1105 int Compare(
const ON_COMPONENT_INDEX* a,
const ON_COMPONENT_INDEX* b);
1111 ON_COMPONENT_INDEX();
1117 ON_COMPONENT_INDEX(
TYPE type,
int index);
1119 bool operator==(
const ON_COMPONENT_INDEX& other)
const;
1120 bool operator!=(
const ON_COMPONENT_INDEX& other)
const;
1121 bool operator<(
const ON_COMPONENT_INDEX& other)
const;
1122 bool operator<=(
const ON_COMPONENT_INDEX& other)
const;
1123 bool operator>(
const ON_COMPONENT_INDEX& other)
const;
1124 bool operator>=(
const ON_COMPONENT_INDEX& other)
const;
1126 void Set(
TYPE type,
int index);
1146 bool IsMeshComponentIndex()
const;
1153 bool IsBrepComponentIndex()
const;
1160 bool IsIDefComponentIndex()
const;
1166 bool IsPolyCurveComponentIndex()
const;
1172 bool IsGroupMemberComponentIndex()
const;
1179 bool IsExtrusionProfileComponentIndex()
const;
1185 bool IsPointCloudComponentIndex()
const;
1191 bool IsAnnotationComponentIndex()
const;
1258 unsigned int code_page
1308 unsigned int locale_id,
1331int on_wcsicmp(
const wchar_t*,
const wchar_t* );
1355int on_strnicmp(
const char * s1,
const char * s2,
int n);
bool operator<(const RPainterPath &p1, const RPainterPath &p2)
This operator allows us to sort painter paths based on z-level.
Definition RPainterPath.cpp:765
int i
Copyright (c) 2011-2018 by Andrew Mustun.
Definition autostart.js:32
This action handles the user interaction to close the current drawing.
Definition CloseFile.js:9
Definition opennurbs_3dm_settings.h:26
Definition opennurbs_string.h:688
Handles all user interaction to open documents.
Definition OpenFile.js:11
@ TYPE
Definition inflate.h:32
distance_display_mode
Definition opennurbs_defines.cpp:1298
@ decimal
Definition opennurbs_defines.cpp:1299
@ feet_inches
Definition opennurbs_defines.cpp:1301
@ fractional
Definition opennurbs_defines.cpp:1300
ON_EXTERN_DECL const float ON_FLT_NINF
Definition opennurbs_object.cpp:375
ON_EXTERN_DECL const float ON_FLT_QNAN
Definition opennurbs_object.cpp:373
ON_DECL int on_wcsicmp(const wchar_t *, const wchar_t *)
Definition opennurbs_defines.cpp:381
ON_DECL wchar_t * on_wcslwr(wchar_t *)
Definition opennurbs_defines.cpp:520
ON_DECL int on_WideCharToMultiByte(const wchar_t *, int, char *, int)
Definition opennurbs_defines.cpp:715
ON_EXTERN_DECL const float ON_FLT_PINF
Definition opennurbs_object.cpp:374
ON_DECL int on_MultiByteToWideChar(const char *, int, wchar_t *, int)
Definition opennurbs_defines.cpp:769
ON_DECL int on_strnicmp(const char *s1, const char *s2, int n)
Definition opennurbs_archive.cpp:5377
#define ON_BEGIN_EXTERNC
Definition opennurbs_defines.h:40
ON_DECL wchar_t * on_wcsupr(wchar_t *)
Definition opennurbs_defines.cpp:494
ON_DECL void ON_FLT_SNAN(float *x)
Definition opennurbs_object.cpp:446
#define ON_DECL
Definition opennurbs_defines.h:92
ON_BEGIN_EXTERNC ON_EXTERN_DECL const double ON_DBL_QNAN
Definition opennurbs_object.cpp:369
ON_DECL unsigned int ON_GetStringConversionWindowsLocaleID()
Definition opennurbs_defines.cpp:108
ON_DECL unsigned int ON_SetStringConversionWindowsLocaleID(unsigned int locale_id, ON_BOOL32 bWin9X)
Definition opennurbs_defines.cpp:100
ON_EXTERN_DECL const double ON_DBL_NINF
Definition opennurbs_object.cpp:371
ON_EXTERN_DECL const double ON_DBL_PINF
Definition opennurbs_object.cpp:370
ON_DECL char * on_strrev(char *)
Definition opennurbs_defines.cpp:75
ON_DECL char * on_strupr(char *)
Definition opennurbs_defines.cpp:43
ON_DECL unsigned int ON_GetStringConversionWindowsCodePage()
Definition opennurbs_defines.cpp:1991
ON_DECL int on_stricmp(const char *, const char *)
Definition opennurbs_defines.cpp:32
ON_DECL char * on_strlwr(char *)
Definition opennurbs_defines.cpp:59
ON_DECL void ON_DBL_SNAN(double *x)
Definition opennurbs_object.cpp:377
#define ON_CLASS
Definition opennurbs_defines.h:91
ON_BEGIN_EXTERNC ON_DECL unsigned int ON_SetStringConversionWindowsCodePage(unsigned int code_page)
Definition opennurbs_defines.cpp:1984
#define ON_EXTERN_DECL
Definition opennurbs_defines.h:93
ON_DECL wchar_t * on_wcsrev(wchar_t *)
Definition opennurbs_defines.cpp:697
#define ON_END_EXTERNC
Definition opennurbs_defines.h:41
long long ON__INT64
Definition opennurbs_system.h:353
int ON__INT32
Definition opennurbs_system.h:323
int ON_BOOL32
Definition opennurbs_system.h:362
Definition opennurbs_defines.h:249
int j
Definition opennurbs_defines.h:251
int i
Definition opennurbs_defines.h:250
Definition opennurbs_defines.h:261
int j
Definition opennurbs_defines.h:263
int i
Definition opennurbs_defines.h:262
int k
Definition opennurbs_defines.h:264
Definition opennurbs_defines.h:270
ON__INT64 h
Definition opennurbs_defines.h:272
char b[8]
Definition opennurbs_defines.h:271
void * p
Definition opennurbs_defines.h:275
int j[2]
Definition opennurbs_defines.h:274
ON__INT32 i
Definition opennurbs_defines.h:273
double d
Definition opennurbs_defines.h:276