Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
0
71
0
40
1.5
41
1.5
280
0
281
0
"""
tablestyle_subclass = DefSubclass('AcDbTableStyle', {
'version': DXFAttr(280), # 0 = 2010
'name': DXFAttr(3), # Table style description (string; 255 characters maximum)
'flow_direction': DXFAttr(7), # FlowDirection (integer):
# 0 = Down
# 1 = Up
'flags': DXFAttr(7), # Flags (bit-coded)
'horizontal_cell_margin': DXFAttr(40), # Horizontal cell margin (real; default = 0.06)
'vertical_cell_margin': DXFAttr(41), # Vertical cell margin (real; default = 0.06)
'suppress_title': DXFAttr(280), # Flag for whether the title is suppressed: 0/1 = not suppressed/suppressed
'suppress_column_header': DXFAttr(281), # Flag for whether the column heading is suppressed: 0/1 = not suppressed/suppressed
# The following group codes are repeated for every cell in the table
# 7: Text style name (string; default = STANDARD)
# 140: Text height (real)
# 170: Cell alignment (integer)
# 62: Text color (integer; default = BYBLOCK)
# 63: Cell fill color (integer; default = 7)
# 283: Flag for whether background color is enabled (default = 0): 0/1 = disabled/enabled
'sheet_subset_name': DXFAttr(4), # Included only if Output type is Sheet Set.
'dates_from_calender': DXFAttr(291),
'date_input_array_size': DXFAttr(91), # represents the number of dates picked
# 90 Julian day; represents the date. One entry for each date picked.
# 90 Seconds past midnight; represents the time of day. One entry for each date picked.
'range_of_dates': DXFAttr(292),
# 93 Start time. If range of dates flag is true.
# 94 End time. If range of dates flag is true.
# 95 Interval in seconds. If range of dates flag is true.
'hours_count': DXFAttr(73),
# 290 Hour. One entry for every hour as specified by the number of hours entry above.
'page_setup_wizard_id': DXFAttr(340), # Page setup wizard hard pointer ID
'view_id': DXFAttr(341), # View hard pointer ID
'visual_style_id': DXFAttr(342), # Visual Style ID
'shade_plot_type': DXFAttr(74),
'viewports_per_page': DXFAttr(75),
'nrows': DXFAttr(76), # Number of rows for viewport distribution
'ncols': DXFAttr(77), # Number of columns for viewport distribution
'spacing': DXFAttr(40),
'lock_viewports': DXFAttr(293),
'label_viewports': DXFAttr(294),
'text_style_id': DXFAttr(343),
})
class SunStudy(DXFObject):
# Requires AC1021/R2007
__slots__ = ()
TEMPLATE = ExtendedTags.from_text(_SUNSTUDY_TPL)
DXFATTRIBS = DXFAttributes(none_subclass, sunstudy_subclass)
'diffuse_color_value': DXFAttr(91), # integer representing an AcCmEntityColor
'diffuse_map_blend_factor': DXFAttr(42, default=1.), # valid range is 0.0 to 1.0
'diffuse_map_source': DXFAttr(72, default=1), # 0=use current scene; 1=use image file (specified by file name; null file name specifies no map)
'diffuse_map_file_name': DXFAttr(3, default=''),
'diffuse_map_projection_method': DXFAttr(73, default=1), # 1=Planar; 2=Box; 3=Cylinder; 4=Sphere
'diffuse_map_tiling_method': DXFAttr(74, default=1), # 1=Tile; 2=Crop; 3=Clamp
'diffuse_map_auto_transform_method': DXFAttr(75, default=1), # bitset;
# 1 = No auto transform
# 2 = Scale mapper to current entity extents; translate mapper to entity origin
# 4 = Include current block transform in mapper transform
# 16x group code 43: Transform matrix of diffuse map mapper (16 reals; row major format; default = identity matrix)
'specular_gloss_factor': DXFAttr(44, default=.5), # valid range is 0.0 to 1.0
'specular_color_method': DXFAttr(73, default=0), # 0=use current color; 1=override current color
'specular_color_factor': DXFAttr(45, default=1.), # valid range is 0.0 to 1.0
'specular_color_value': DXFAttr(92), # integer representing an AcCmEntityColor
'specular_map_blend_factor': DXFAttr(46, default=1.), # valid range is 0.0 to 1.0
'specular_map_source': DXFAttr(77, default=1), # 0=use current scene; 1=use image file (specified by file name; null file name specifies no map)
'specular_map_file_name': DXFAttr(4, default=''),
'specular_map_projection_method': DXFAttr(78, default=1), # 1=Planar; 2=Box; 3=Cylinder; 4=Sphere
'specular_map_tiling_method': DXFAttr(79, default=1), # 1=Tile; 2=Crop; 3=Clamp
'specular_map_auto_transform_method': DXFAttr(170, default=1), # bitset;
# 1 = No auto transform
# 2 = Scale mapper to current entity extents; translate mapper to entity origin
# 4 = Include current block transform in mapper transform
# 16x group code 47: Transform matrix of specular map mapper (16 reals; row major format; default = identity matrix)
'reflection_map_blend_factor': DXFAttr(48, default=1.), # valid range is 0.0 to 1.0
'reflection_map_source': DXFAttr(171, default=1), # 0=use current scene; 1=use image file (specified by file name; null file name specifies no map)
'reflection_map_file_name': DXFAttr(6, default=''),
'reflection_map_projection_method': DXFAttr(172, default=1), # 1=Planar; 2=Box; 3=Cylinder; 4=Sphere
'reflection_map_tiling_method': DXFAttr(173, default=1), # 1=Tile; 2=Crop; 3=Clamp
'reflection_map_auto_transform_method': DXFAttr(174, default=1), # bitset;
# 1 = No auto transform
# 16x group code 142: Transform matrix of reflection map mapper (16 reals; row major format; default = identity matrix)
'bump_map_blend_factor': DXFAttr(143, default=1.), # valid range is 0.0 to 1.0
'bump_map_source': DXFAttr(179, default=1), # 0=use current scene; 1=use image file (specified by file name; null file name specifies no map)
'bump_map_file_name': DXFAttr(8, default=''),
'bump_map_projection_method': DXFAttr(270, default=1), # 1=Planar; 2=Box; 3=Cylinder; 4=Sphere
'bump_map_tiling_method': DXFAttr(271, default=1), # 1=Tile; 2=Crop; 3=Clamp
'bump_map_auto_transform_method': DXFAttr(272, default=1), # bitset;
# 1 = No auto transform
# 2 = Scale mapper to current entity extents; translate mapper to entity origin
# 4 = Include current block transform in mapper transform
# 16x group code 144: Transform matrix of bump map mapper (16 reals; row major format; default = identity matrix)
'refraction_index': DXFAttr(145, default=1.), # valid range is 0.0 to 1.0
'refraction_map_blend_factor': DXFAttr(146, default=1.), # valid range is 0.0 to 1.0
'refraction_map_source': DXFAttr(273, default=1), # 0=use current scene; 1=use image file (specified by file name; null file name specifies no map)
'refraction_map_file_name': DXFAttr(9, default=''),
'refraction_map_projection_method': DXFAttr(274, default=1), # 1=Planar; 2=Box; 3=Cylinder; 4=Sphere
'refraction_map_tiling_method': DXFAttr(275, default=1), # 1=Tile; 2=Crop; 3=Clamp
'refraction_map_auto_transform_method': DXFAttr(276, default=1), # bitset;
# 1 = No auto transform
# 2 = Scale mapper to current entity extents; translate mapper to entity origin
# 4 = Include current block transform in mapper transform
# 16x group code 147: Transform matrix of reflection map mapper (16 reals; row major format; default = identity matrix)
# normal map shares group codes with diffuse map
'normal_map_method': DXFAttr(271),
'normal_map_strength': DXFAttr(465),
'normal_map_blend_factor': DXFAttr(42, default=1.), # valid range is 0.0 to 1.0
'normal_map_source': DXFAttr(72, default=1), # 0=use current scene; 1=use image file (specified by file name; null file name specifies no map)
'normal_map_file_name': DXFAttr(3, default=''),
'normal_map_projection_method': DXFAttr(73, default=1), # 1=Planar; 2=Box; 3=Cylinder; 4=Sphere
'normal_map_tiling_method': DXFAttr(74, default=1), # 1=Tile; 2=Crop; 3=Clamp
'normal_map_auto_transform_method': DXFAttr(75, default=1), # bitset;
}
330
0
100
AcDbField
1
_text
2
90
0
"""
field_subclass = DefSubclass('AcDbField', {
'evaluator_id': DXFAttr(1),
'field_code': DXFAttr(2),
'field_code_overflow': DXFAttr(3), # Overflow of field code string
'n_child_fields': DXFAttr(90), # Number of child fields
# 360: Child field ID (AcDbHardOwnershipId); repeats for number of children
# 97: Number of object IDs used in the field code
# 331: Object ID used in the field code (AcDbSoftPointerId); repeats for the number of object IDs used in the field code
# 93: Number of the data set in the field
# 6: Key string for the field data; a key-field pair is repeated for the number of data sets in the field
# 7: Key string for the evaluated cache; this key is hard-coded as ACFD_FIELD_VALUE
# 90: Data type of field value
# 91: Long value (if data type of field value is long)
# 140: Double value (if data type of field value is double)
# 330: ID value, AcDbSoftPointerId (if data type of field value is ID)
# 92: Binary data buffer size (if data type of field value is binary)
# 310: Binary data (if data type of field value is binary)
# 301: Format string
# 9: Overflow of Format string
'design_point': DXFAttr(10, xtype=XType.point3d), # Design point, reference point in WCS coordinates
'reference_point': DXFAttr(11, xtype=XType.point3d),
# Reference point in coordinate system coordinates, valid only when coordinate type is Local Grid.
'north_direction': DXFAttr(12, xtype=XType.point2d), # North direction vector (2D)
'horizontal_unit_scale': DXFAttr(40),
# Horizontal unit scale, factor which converts horizontal design coordinates to meters by multiplication.
'vertical_unit_scale': DXFAttr(41),
# Vertical unit scale, factor which converts vertical design coordinates to meters by multiplication.
'horizontal_units': DXFAttr(91),
# Horizontal units per UnitsValue enumeration. Will be kUnitsUndefined if units specified by horizontal unit scale is not supported by AutoCAD enumeration.
'vertical_units': DXFAttr(92),
# Vertical units per UnitsValue enumeration. Will be kUnitsUndefined if units specified by vertical unit scale is not supported by AutoCAD enumeration.
'up_direction': DXFAttr(210, xtype=XType.point3d), # Up direction
'scale_estimation_method': DXFAttr(95, default=1),
# 1=None; 2=User specified scale factor; 3=Grid scale at reference point; 4=Prismoidal
'sea_level_correction': DXFAttr(294, default=0), # Bool flag specifying whether to do sea level correction
'user_scale_factor': DXFAttr(141, default=1), # User specified scale factor
'sea_level_elevation': DXFAttr(142, default=0), # Sea level elevation
'coordinate_projection_radius': DXFAttr(143, default=0), # Coordinate projection radius
'geo_rss_tag': DXFAttr(302, default=''), # GeoRSS tag
'observation_from_tag': DXFAttr(305, default=''), # Observation from tag
'observation_to_tag': DXFAttr(306, default=''), # Observation to tag
'mesh_point_count': DXFAttr(93), # Number of Geo-Mesh points
# mesh definition:
# source mesh point (13, 23) repeat, mesh_point_count?
# target mesh point (14, 24) repeat, mesh_point_count?
'mesh_faces_count': DXFAttr(96), # Number of faces
# face index 97 repeat, faces_count
# face index 98 repeat, faces_count
# face index 99 repeat, faces_count
}),
10, 20 30 2d point (30?)
11, 21, 31 3d point
331 soft-pointer ID/handle to object value
360 hard-pointer ownership ID
340 hard-pointer ID/handle
330 soft-pointer ID/handle
"""
__slots__ = ()
TEMPLATE = ExtendedTags.from_text(_DATATABLE_TPL)
CLASS = ExtendedTags.from_text(_DATATABLE_CLS)
DXFATTRIBS = DXFAttributes(
none_subclass,
DefSubclass('AcDbDataTable', {
'version': DXFAttr(70),
'columns': DXFAttr(90),
'rows': DXFAttr(91),
'table_name': DXFAttr(1),
}),
'page_setup_name': DXFAttr(1),
'plot_configuration_file': DXFAttr(2),
'paper_size': DXFAttr(4),
'plot_view_name': DXFAttr(6),
'left_margin': DXFAttr(40), # in mm
'bottom_margin': DXFAttr(41), # in mm
'right_margin': DXFAttr(42), # in mm
'top_margin': DXFAttr(43), # in mm
'paper_width': DXFAttr(44), # in mm
'paper_height': DXFAttr(45), # in mm
'plot_origin_x_offset': DXFAttr(46, default=0.), # in mm
'plot_origin_y_offset': DXFAttr(47, default=0.), # in mm
'plot_window_x1': DXFAttr(48, default=0.),
'plot_window_y1': DXFAttr(49, default=0.),
'plot_window_x2': DXFAttr(140, default=0.),
'plot_window_y2': DXFAttr(141, default=0.),
'scale_numerator': DXFAttr(142, default=1.), # Numerator of custom print scale: real world (paper) units
'scale_denominator': DXFAttr(143, default=1.), # Denominator of custom print scale: drawing units
'plot_layout_flags': DXFAttr(70),
# 1 = Plot Viewport Borders
# 2 = Show Plot Styles
# 4 = Plot Centered
# 8 = Plot Hidden
# 16 = Use Standard Scale
# 32 = Plot Plot Styles
# 64 = Scale Lineweights
# 128 = Print Lineweights
# 512 = Draw Viewports First
# 1024 = Model Type
# 2048 = Update Paper
# 4096 = Zoom To Paper On Update
# 8192 = Initializing
330
0
102
}
330
0
100
AcDbVisualStyle
2
2dWireframe
70
4
"""
visualstyle_subclass = DefSubclass('AcDbVisualStyle', {
'description': DXFAttr(2),
'style_type': DXFAttr(70),
'face_lighting_model': DXFAttr(71),
# 0 =Invisible
# 1 = Visible
# 2 = Phong
# 3 = Gooch
'face_lighting_quality': DXFAttr(72),
# 0 = No lighting
# 1 = Per face lighting
# 2 = Per vertex lighting
'face_color_mode': DXFAttr(73),
# 0 = No color
# 1 = Object color
# 2 = Background color
# 3 = Custom color
# 4 = Mono color
'horizontal_unit_scale': DXFAttr(40),
# Horizontal unit scale, factor which converts horizontal design coordinates to meters by multiplication.
'vertical_unit_scale': DXFAttr(41),
# Vertical unit scale, factor which converts vertical design coordinates to meters by multiplication.
'horizontal_units': DXFAttr(91),
# Horizontal units per UnitsValue enumeration. Will be kUnitsUndefined if units specified by horizontal unit scale is not supported by AutoCAD enumeration.
'vertical_units': DXFAttr(92),
# Vertical units per UnitsValue enumeration. Will be kUnitsUndefined if units specified by vertical unit scale is not supported by AutoCAD enumeration.
'up_direction': DXFAttr(210, xtype=XType.point3d), # Up direction
'scale_estimation_method': DXFAttr(95, default=1),
# 1=None; 2=User specified scale factor; 3=Grid scale at reference point; 4=Prismoidal
'sea_level_correction': DXFAttr(294, default=0), # Bool flag specifying whether to do sea level correction
'user_scale_factor': DXFAttr(141, default=1), # User specified scale factor
'sea_level_elevation': DXFAttr(142, default=0), # Sea level elevation
'coordinate_projection_radius': DXFAttr(143, default=0), # Coordinate projection radius
'geo_rss_tag': DXFAttr(302, default=''), # GeoRSS tag
'observation_from_tag': DXFAttr(305, default=''), # Observation from tag
'observation_to_tag': DXFAttr(306, default=''), # Observation to tag
'mesh_point_count': DXFAttr(93), # Number of Geo-Mesh points
# mesh definition:
# source mesh point (13, 23) repeat, mesh_point_count?
# target mesh point (14, 24) repeat, mesh_point_count?
'mesh_faces_count': DXFAttr(96), # Number of faces
# face index 97 repeat, faces_count
# face index 98 repeat, faces_count
# face index 99 repeat, faces_count
}),
)
# coordinate_type const
UNKNOWN = 0