This section is for general discussion about Gadgets
I'm just learning how to create gadgets and was wondering what the easiest way of creating a circle within a gadget is.
I have tried to use the CreateCircle() global method but cant seem to get it to work it just keeps returning a nil value. (Maybe I'm doing something wrong)
Would it be easier to us the contour:ArcTo() method and us either 2 or 4 lines arced to make the circle.
any help would be appreciated.
- Vectric Apprentice
- Posts: 4
- Joined: Thu Jun 16, 2016 8:05 am
- Model of CNC Machine: Ascent pro
This is a bit of code based on an example SDK script that draws a circle using CreateCircle.
- Code: Select all
-- VECTRIC LUA SCRIPT
function AddGroupToJob(job, group, layer_name)
local cad_object = CreateCadGroup(group);
local layer = job.LayerManager:GetLayerWithName(layer_name)
local job = VectricJob()
if not job.Exists then
DisplayMessageBox("No job loaded")
local group = ContourGroup(true)
AddGroupToJob(job, group, "Circle Example")
- Vectric Archimage
- Posts: 8135
- Joined: Thu Nov 23, 2006 2:19 pm
- Location: Surrey, UK
- Model of CNC Machine: ShopBot PRS Alpha 96x48
Return to Gadgets - General
Who is online
Users browsing this forum: No registered users and 2 guests