Import (teach-in) Positions into VCP?

This forum is for general discussion about Cut3D

Import (teach-in) Positions into VCP?

Postby Roelli » Wed Jul 06, 2016 1:05 am

Hello.

I want to use a camera to move the cnc machine manually to several positions on the material. I can save these positions in a file, which looks like this:
G01 X 23 Y 23 Z -20 A 0
G01 X 34 Y 43 Z -20 A 0

Is there a way to import these positions into VCP so that I can manually place shapes (circle cutouts, rectangular cutouts) to the center point of these positions?

Thanks,
Roelli.


(background info: Iam in contact with someone who does printing on aluminum panels... but the printing can't be printed 100% parallel to the outside contour of the aluminum panel AND... the printing might be stretched or compressed a bit. Until now he used an old machine which had a camera fixed to the z axis. He manually moves the spindle/camera to every position on the aluminum panel where he needs to cut holes and saves these positions. After that he programs holes in a sub-menu of the machine-software. )
Vcarve PRO rocks!
...and now it rocks even more: http://paulrowntree.weebly.com/gadgets.html
Roelli
Vectric Craftsman
 
Posts: 139
Joined: Mon Sep 03, 2007 9:10 pm
Location: Germany

Re: Import (teach-in) Positions into VCP?

Postby PaulRowntree » Wed Jul 06, 2016 1:27 am

I'm not sure if this can do what you want, but you can 'script' the creation of shapes in VCP or Aspire using the CSV gadget. They are text files that have (X,Y) coordinates to make Vectric programs create shapes, vectors, circles, polygons, NACA airfoils, etc. Some example files are provided below (renamed from .csv to .txt).
Attachments
CSV_StandardForms.txt
(2 KiB) Downloaded 64 times
CSV_SpecialForms.txt
(2.02 KiB) Downloaded 54 times
CSV_NACA.txt
(581 Bytes) Downloaded 61 times
Paul Rowntree
WarpDriver, StandingWave, Topo and gadgets available at PaulRowntree.weebly.com
PaulRowntree
Vectric Wizard
 
Posts: 1646
Joined: Sun Oct 24, 2010 7:28 pm
Location: Guelph, Ontario
Model of CNC Machine: homebuilt 4'x2' (Mach3+G540)

Re: Import (teach-in) Positions into VCP?

Postby Roelli » Wed Jul 06, 2016 3:22 pm

Hi Paul!

Yeah... that's might work. 8)

I tried it, and I can draw a line... but somehow I can't draw a circle.
And iam not sure where/how to set the x,y coordinates. (the position where the circle should be placed)

I tried this, but it doesn't draw a circle... ?

Code: Select all
;
; INFO
; set !mm or !inch
; draw circles: x,y, radius
;
;
!mm
;
!Circle, 5,5,2



And if it will work... I have to find a way to convert the (teach-in) file which comes from the machine:

Code: Select all
N10 T1
N20 G00 Z0.000
N30 G00 X 0 Y 0 Z 0 A 0
N40 G00 X 10 Y 10 Z 0 A 0
N50 G00 X 20 Y 20 Z 0 A 0
M30


Is there any software which can do batch processing like this:
open file, remove line 1, remove line 2, remove the first 8 digits (N30 G00 ), find and remove "M30".
I found a software called "csv buddy", maybe this might work.

Thanks!

Roelli.
Vcarve PRO rocks!
...and now it rocks even more: http://paulrowntree.weebly.com/gadgets.html
Roelli
Vectric Craftsman
 
Posts: 139
Joined: Mon Sep 03, 2007 9:10 pm
Location: Germany

Re: Import (teach-in) Positions into VCP?

Postby LittleGreyMan » Wed Jul 06, 2016 4:11 pm

Roelli wrote:Is there any software which can do batch processing like this:
open file, remove line 1, remove line 2, remove the first 8 digits (N30 G00 ), find and remove "M30".


Hi Roelli,

Notepad++ can do this kind of things using regular expressions.
https://notepad-plus-plus.org/
I never used macro recording, so I don't know if this can be easily automated.

If you write your own code, delete line 2 then delete line 1. Classical trap: if you delete line 1 then delete line 2, this new line 2 is the former line 3… Or delete twice line 1.

HTH

Tschüss
Best regards

LGM

W7 - Aspire 8.517
LittleGreyMan
Vectric Wizard
 
Posts: 415
Joined: Fri May 15, 2015 1:10 pm
Location: France
Model of CNC Machine: 3 axis Charlyrobot & Mecanumeric

Re: Import (teach-in) Positions into VCP?

Postby PaulRowntree » Wed Jul 06, 2016 5:23 pm

Roelli wrote:Hi Paul!
I tried it, and I can draw a line... but somehow I can't draw a circle.
I tried this, but it doesn't draw a circle... ?

Code: Select all
;
; INFO
; set !mm or !inch
; draw circles: x,y, radius
;
;
!mm
;
!Circle, 5,5,2


Hi Roelli!
Does the !Circle command do anything?

The 2D CSV gadget was updated in 2014 ... the top of the "CSV to 2D Vectors.lua" file should look like this :
Code: Select all
-- VECTRIC LUA SCRIPT
-- script originally written by paul rowntree february 2013
-- revised march 2014 to accept commands in CSV file; all commands start with '!' character
-- !Layer : changes the layer to the second field
--
local Verbose=false      -- used to restrict debug dialog boxes
local CodeVersion = "2014-05-26"
local ScaleFactor = 1.0
local Default_Layer = "CSV Loaded Vectors"


If not, please go to the DropBox site and grab a new copy. I'm having computer troubles, so I can't find the manual now, but it should show the revision history that includes commands.
Paul Rowntree
WarpDriver, StandingWave, Topo and gadgets available at PaulRowntree.weebly.com
PaulRowntree
Vectric Wizard
 
Posts: 1646
Joined: Sun Oct 24, 2010 7:28 pm
Location: Guelph, Ontario
Model of CNC Machine: homebuilt 4'x2' (Mach3+G540)

Re: Import (teach-in) Positions into VCP?

Postby Roelli » Wed Jul 06, 2016 7:12 pm

Hi.

Ah! I tried "CSV 20140526" now and that seems to work! (I used "CSV 20130717" before and that didn't worked somehow)

Cool! I'll experiment with it...

@LittleGreyMan: Thanks for the info. I'll try to check these functions in Notepad++.

Thanks guys! 8) 8) 8)

Roelli.
Vcarve PRO rocks!
...and now it rocks even more: http://paulrowntree.weebly.com/gadgets.html
Roelli
Vectric Craftsman
 
Posts: 139
Joined: Mon Sep 03, 2007 9:10 pm
Location: Germany


Return to Cut3D - General

Who is online

Users browsing this forum: No registered users and 3 guests