Class: Sketchup::Edge
- Inherits:
-
Drawingelement
- Object
- Entity
- Drawingelement
- Sketchup::Edge
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb
Overview
The Edge class contains methods modifying and extracting information for edges.
Instance Method Summary collapse
-
#all_connected ⇒ Array<Sketchup::Entity>
The all_connected method retrieves all of the entities connected to an edge, including the edge itself.
-
#common_face(edge2) ⇒ Sketchup::Face?
The common_face method is used to identify a face that is common to two edges.
-
#curve ⇒ Sketchup::Curve?
The curve method is used to get the Curve object that this edge belongs to, if any.
-
#end ⇒ Sketchup::Vertex
The end method is used to retrieve the Vertex object at the end of the edge.
-
#explode_curve ⇒ Sketchup::Edge
The explode_curve method is used to explode the curve that the given edge is a part of.
-
#faces ⇒ Array<Sketchup::Face>
The #faces method is used to retrieve all of the faces common to the edge.
-
#find_faces ⇒ Integer
The find_faces method is used to create all of the Faces that can be created with this edge.
-
#length(*args) ⇒ Object
The #length method is used to retrieve the length of an edge in current units.
-
#line ⇒ Array(Geom::Point3d, Geom::Vector3d)
The line method is used to retrieve the line defined by the edge.
-
#other_vertex(vertex1) ⇒ Sketchup::Vertex
The other_vertex method is used to find the opposite vertex given one vertex of the edge.
-
#reversed_in?(face) ⇒ Boolean
The #reversed_in? method is used to determine if the edge is reversed in a face’s bounding loop.
-
#smooth=(value) ⇒ Boolean
The #smooth= method is used to set the edge to be smooth.
-
#smooth? ⇒ Boolean
The #smooth? method is used to retrieve the current smooth setting for an edge.
-
#soft=(value) ⇒ Boolean
The #soft= method is used to set the edge to be soft.
-
#soft? ⇒ Boolean
The #soft? method is used to retrieve the current soft setting for an edge.
-
#split(position) ⇒ Sketchup::Edge
The split method is used to to split an edge into two or more distinct edges.
-
#start ⇒ Sketchup::Vertex
The start method is used to retrieve the Vertex object at the start of the edge.
-
#used_by?(element) ⇒ Boolean
The used_by? method is used to see if an edge is used by a given Face or Vertex.
-
#vertices ⇒ Array<Sketchup::Vertex>
The vertices method is used to retrieve the vertices on the edge.
Methods inherited from Drawingelement
#bounds, #casts_shadows=, #casts_shadows?, #erase!, #hidden=, #hidden?, #layer, #layer=, #material, #material=, #receives_shadows=, #receives_shadows?, #visible=, #visible?
Methods inherited from Entity
#add_observer, #attribute_dictionaries, #attribute_dictionary, #delete_attribute, #deleted?, #entityID, #get_attribute, #inspect, #model, #parent, #persistent_id, #remove_observer, #set_attribute, #to_s, #typename, #valid?
Instance Method Details
#all_connected ⇒ Array<Sketchup::Entity>
The all_connected method retrieves all of the entities connected to an edge, including the edge itself.
31 32 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 31 def all_connected end |
#common_face(edge2) ⇒ Sketchup::Face?
The common_face method is used to identify a face that is common to two edges.
59 60 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 59 def common_face(edge2) end |
#curve ⇒ Sketchup::Curve?
The curve method is used to get the Curve object that this edge belongs to, if any. Note that if the edge is part of an arc instead of a random curve, then this method will return an ArcCurve object.
75 76 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 75 def curve end |
#end ⇒ Sketchup::Vertex
The end method is used to retrieve the Vertex object at the end of the edge.
87 88 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 87 def end end |
#explode_curve ⇒ Sketchup::Edge
The explode_curve method is used to explode the curve that the given edge is a part of.
103 104 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 103 def explode_curve end |
#faces ⇒ Array<Sketchup::Face>
The #faces method is used to retrieve all of the faces common to the edge.
115 116 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 115 def faces end |
#find_faces ⇒ Integer
The find_faces method is used to create all of the Faces that can be created with this edge. For example, if you use the API to draw three edges that form a triangle, the face between them will not show up because you’ve only drawn the edges, but if you call find_faces on one of the edges, the triangle will be filled in.
140 141 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 140 def find_faces end |
#length ⇒ Length #length(transform) ⇒ Length
The #length method is used to retrieve the length of an edge in current units.
You can pass in an optional Geom::Transformation (or an array that can represent a transformation), to correct for a parent group’s transformation. For example, if an edge is inside of a group that is scaled to 200%, the length method will return the unscaled length of the edge. So by passing a 200% transformation object to this method, you can account for that to get the “visual” length of the edge.
169 170 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 169 def length(*args) end |
#line ⇒ Array(Geom::Point3d, Geom::Vector3d)
The line method is used to retrieve the line defined by the edge. Lines in SketchUp aren’t visible entities but geometric constructs represented by an Array with a Point3d and a Vector3d. See the Geom module and the Array class for more information on lines.
185 186 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 185 def line end |
#other_vertex(vertex1) ⇒ Sketchup::Vertex
The other_vertex method is used to find the opposite vertex given one vertex of the edge.
204 205 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 204 def other_vertex(vertex1) end |
#reversed_in?(face) ⇒ Boolean
The #reversed_in? method is used to determine if the edge is reversed in a face’s bounding loop.
234 235 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 234 def reversed_in?(face) end |
#smooth=(value) ⇒ Boolean
The soft and smooth properties are normally set in pairs. You can observer this when the Soften/Smooth Edges feature or holding down Ctrl when using the Eraser Tool.
The #smooth= method is used to set the edge to be smooth.
A smooth edge will cause the shading between connected faces to blend to a smooth transition. The edge will still be visible.
258 259 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 258 def smooth=(value) end |
#smooth? ⇒ Boolean
The #smooth? method is used to retrieve the current smooth setting for an edge.
A smooth edge will cause the shading between connected faces to blend to a smooth transition. The edge will still be visible.
277 278 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 277 def smooth? end |
#soft=(value) ⇒ Boolean
The soft and smooth properties are normally set in pairs. You can observe this when the Soften/Smooth Edges feature or holding down Ctrl when using the Eraser Tool.
The #soft= method is used to set the edge to be soft.
A soft edge will cause the connected faces to be treated as a surface. This means that if you have Hidden Geometry off and select one face it will also select all faces connected with soft edges. A soft edge will also appear hidden.
303 304 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 303 def soft=(value) end |
#soft? ⇒ Boolean
The #soft? method is used to retrieve the current soft setting for an edge.
A soft edge will cause the connected faces to be treated as a surface. This means that if you have Hidden Geometry off and select one face it will also select all faces connected with soft edges. A soft edge will also appear hidden.
324 325 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 324 def soft? end |
#split(position) ⇒ Sketchup::Edge
The split method is used to to split an edge into two or more distinct edges. If a Point3d is given, it must be a point that is on the Edge.
If a Float is given, it is a number between 0 and 1 that gives the relative position along the edge at which to split it. For example, edge.split(0.5) will split the Edge at its midpoint. This split position is measured from the Edge.start.
Returns the new Edge that was created as a result of splitting this one.
350 351 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 350 def split(position) end |
#start ⇒ Sketchup::Vertex
The start method is used to retrieve the Vertex object at the start of the edge.
363 364 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 363 def start end |
#used_by?(element) ⇒ Boolean
The used_by? method is used to see if an edge is used by a given Face or Vertex.
382 383 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 382 def used_by?(element) end |
#vertices ⇒ Array<Sketchup::Vertex>
The vertices method is used to retrieve the vertices on the edge.
394 395 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb', line 394 def vertices end |