BezierSpan: Difference between revisions

From SDK
Jump to navigation Jump to search
(Created page with " right|50px|link=Creating Vectors From Script right|50px|link=Creating Vectors From Script ==References== '''Please Note:''...")
 
No edit summary
 
Line 1: Line 1:
  [[File:Back.jpg|right|50px|link=Creating Vectors From Script]]
  [[File:Back.jpg|right|50px|link=Creating Vectors From Script]]
[[Category:SDK]]
This object represents a bezier span in a Contour. It is derived from the Span class and all methods and properties of the span class are valid on this object as well. As well as creating spans to append to a contour you can use the BezierTo methods to avoid span creation. 


 


== Constructors  ==




=== BezierSpan( Point2D start_pt, Point2D end_pt, Point2D ctrl_pt_1, Point2D ctrl_pt_1) ===


A new span representing a bezier is created within a Lua script using this contructor method 


::''start_pt – Point2D – 2D position for start point of span  ''


::''end_pt – Point2D – 2D position for end point of span - must have same Z values as start ''


::''ctrl_pt_1 - Point2D – 2D position for first control point ''


::''ctrl_pt_2 - Point2D – 2D position for second control point  ''


 
<nowiki>
  e.g 


  local start_pt = Point2D(0,  0)
  local end_pt  = Point2D(1.0, 0)
  local ctrl_1  = Point2D(0.2, 0.2)
  local ctrl_2  = Point2D(0.8, 0.2) 
  local bez_span = BezierSpan(start_pt, end_pt, ctrl_1, ctrl_2)    </nowiki>


----


=== BezierSpan( Point3D start_pt, Point3D end_pt, Point2D ctrl_pt_1, Point2D ctrl_pt_1) ===


A new span representing a bezier is created within a Lua script using this constructor method 


  [[File:Back.jpg|right|50px|link=Creating Vectors From Script]]
::''start_pt - Point3D – 3D position for start point of span ''
 
::''end_pt - Point3D – 3D position for end point of span- must have same Z values as start ''
 
::''ctrl_pt_1 - Point2D – 2D position for first control point ''
 
::''ctrl_pt_2 - Point2D – 2D position for second control point  ''
 
<nowiki> e.g 
 
  local start_pt = Point3D(0,  0, 0)
  local end_pt  = Point3D(1.0, 0, 0)
  local ctrl_1  = Point2D(0.2, 0.2)
  local ctrl_2  = Point2D(0.8, 0.2) 
  local bez_span = BezierSpan(start_pt, end_pt, ctrl_1, ctrl_2)  </nowiki>
 
 
[[File:Back.jpg|right|50px|link=Creating Vectors From Script]]
==References==
==References==
'''Please Note:''' The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 2.05, published September 12, 2018. by Vectric Ltd. Most current document from Vertric can be downloaded at [https://gadgets.vectric.com/developerinfo.html Vertric Developer Information]
'''Please Note:''' The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 2.05, published September 12, 2018. by Vectric Ltd. Most current document from Vertric can be downloaded at [https://gadgets.vectric.com/developerinfo.html Vertric Developer Information]

Latest revision as of 20:20, 3 August 2021

Back.jpg

This object represents a bezier span in a Contour. It is derived from the Span class and all methods and properties of the span class are valid on this object as well. As well as creating spans to append to a contour you can use the BezierTo methods to avoid span creation.


Constructors

BezierSpan( Point2D start_pt, Point2D end_pt, Point2D ctrl_pt_1, Point2D ctrl_pt_1)

A new span representing a bezier is created within a Lua script using this contructor method

start_pt – Point2D – 2D position for start point of span
end_pt – Point2D – 2D position for end point of span - must have same Z values as start
ctrl_pt_1 - Point2D – 2D position for first control point
ctrl_pt_2 - Point2D – 2D position for second control point


  e.g  

  local start_pt = Point2D(0,   0)
  local end_pt   = Point2D(1.0, 0)
  local ctrl_1   = Point2D(0.2, 0.2) 
  local ctrl_2   = Point2D(0.8, 0.2)  
  local bez_span = BezierSpan(start_pt, end_pt, ctrl_1, ctrl_2)    

BezierSpan( Point3D start_pt, Point3D end_pt, Point2D ctrl_pt_1, Point2D ctrl_pt_1)

A new span representing a bezier is created within a Lua script using this constructor method

start_pt - Point3D – 3D position for start point of span
end_pt - Point3D – 3D position for end point of span- must have same Z values as start
ctrl_pt_1 - Point2D – 2D position for first control point
ctrl_pt_2 - Point2D – 2D position for second control point
 e.g  

  local start_pt = Point3D(0,   0, 0) 
  local end_pt   = Point3D(1.0, 0, 0) 
  local ctrl_1   = Point2D(0.2, 0.2) 
  local ctrl_2   = Point2D(0.8, 0.2)  
  local bez_span = BezierSpan(start_pt, end_pt, ctrl_1, ctrl_2)   


Back.jpg

References

Please Note: The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 2.05, published September 12, 2018. by Vectric Ltd. Most current document from Vertric can be downloaded at Vertric Developer Information