Class: ModraUp::HatchPatternData
- Inherits:
-
Object
- Object
- ModraUp::HatchPatternData
Overview
Values for hatch patterns that do not belong to a model collection and have no name, used for ModraUp::RenderingOptions#hatch_pattern (the default hatch pattern for styles). The object obtained from the rendering options is frozen: first dup, modify it, and then assign it back.
Class Method Summary # collapse
-
.new ⇒ ModraUp::HatchPatternData
Create an empty hatch pattern settings: white fill, no line family and texture, scale 1, rotation 0.
Instance Method Summary # collapse
-
#initialize_copy(other) ⇒ ModraUp::HatchPatternData
Copy all settings (use dup / clone).
-
#==(other) ⇒ Boolean
Returns true if all settings are the same.
-
#clear_fill_pattern ⇒ ModraUp::HatchPattern, ModraUp::HatchPatternData
Clear the .PAT line pattern definition (the #fill_pattern_file_name will be empty), while preserving the fill color and texture.
-
#clear_fill_texture ⇒ ModraUp::HatchPattern, ModraUp::HatchPatternData
Clear the fill texture, retaining the fill color and .PAT line family.
-
#fill_color ⇒ ModraUp::Color
Retrieve the fill color (the background color beneath lines and patterns).
-
#fill_color=(color) ⇒ ModraUp::Color
Sets the fill color.
-
#fill_pattern_file_name ⇒ String
The path to the line pattern file (.PAT / .skh / .oskh); an empty string if no line pattern is defined.
-
#fill_texture_file_name ⇒ String
The path to the texture source file; an empty string if no texture is used.
-
#fill_texture_image ⇒ ModraUp::ImageRep, nil
Returns the image used for texture filling; returns nil if no texture is applied.
-
#rotation_angle ⇒ Float
Reads the rotation angle (degrees, counterclockwise).
-
#rotation_angle=(angle) ⇒ Float
Sets the rotation angle (degrees).
-
#save_fill_pattern_to_file(file_name) ⇒ ModraUp::HatchPattern, ModraUp::HatchPatternData
Write the .PAT hatch pattern as an AutoCAD .PAT text file (excluding fill color, scale, and texture; use ModraUp::HatchPattern#write for the entire pattern).
-
#set_fill_pattern_from_file(file_name) ⇒ ModraUp::HatchPattern, ModraUp::HatchPatternData
Read hatch patterns from a file. Only the first pattern in the file is used; also accepts line patterns from .skh / .oskh files.
-
#set_fill_texture_image_and_file_name(image, file_name) ⇒ ModraUp::HatchPattern, ModraUp::HatchPatternData
Set fill texture: The image and its source path are saved. The new texture initially tiles 12 inches wide, then scaled by #uv_scale.
-
#set_uv_scale(u_scale, v_scale) ⇒ ModraUp::HatchPattern, ModraUp::HatchPatternData
Sets the repeat scale in the U/V directions (pattern units × scale = model inches).
-
#uv_scale ⇒ Array(Float, Float)
Retrieve the U/V repetition scale.
Class Method Details
.new ⇒ ModraUp::HatchPatternData
Create an empty hatch pattern settings: white fill, no line family and texture, scale 1, rotation 0.
Instance Method Details
#initialize_copy(other) ⇒ ModraUp::HatchPatternData
Copy all settings (use dup / clone).
#==(other) ⇒ Boolean
Returns true if all settings are the same.
#clear_fill_pattern ⇒ ModraUp::HatchPattern, ModraUp::HatchPatternData
Clear the .PAT line pattern definition (the #fill_pattern_file_name will be empty), while preserving the fill color and texture.
#clear_fill_texture ⇒ ModraUp::HatchPattern, ModraUp::HatchPatternData
Clear the fill texture, retaining the fill color and .PAT line family.
#fill_color ⇒ ModraUp::Color
Retrieve the fill color (the background color beneath lines and patterns).
#fill_color=(color) ⇒ ModraUp::Color
Sets the fill color.
#fill_pattern_file_name ⇒ String
The path to the line pattern file (.PAT / .skh / .oskh); an empty string if no line pattern is defined.
#fill_texture_file_name ⇒ String
The path to the texture source file; an empty string if no texture is used.
#fill_texture_image ⇒ ModraUp::ImageRep, nil
Returns the image used for texture filling; returns nil if no texture is applied.
#rotation_angle ⇒ Float
Reads the rotation angle (degrees, counterclockwise).
#rotation_angle=(angle) ⇒ Float
Sets the rotation angle (degrees).
#save_fill_pattern_to_file(file_name) ⇒ ModraUp::HatchPattern, ModraUp::HatchPatternData
Write the .PAT hatch pattern as an AutoCAD .PAT text file (excluding fill color, scale, and texture; use ModraUp::HatchPattern#write for the entire pattern).
#set_fill_pattern_from_file(file_name) ⇒ ModraUp::HatchPattern, ModraUp::HatchPatternData
Read hatch patterns from a file. Only the first pattern in the file is used; also accepts line patterns from .skh / .oskh files.
#set_fill_texture_image_and_file_name(image, file_name) ⇒ ModraUp::HatchPattern, ModraUp::HatchPatternData
Set fill texture: The image and its source path are saved. The new texture initially tiles 12 inches wide, then scaled by #uv_scale.
#set_uv_scale(u_scale, v_scale) ⇒ ModraUp::HatchPattern, ModraUp::HatchPatternData
Sets the repeat scale in the U/V directions (pattern units × scale = model inches).
#uv_scale ⇒ Array(Float, Float)
Retrieve the U/V repetition scale.