fablabnbg / inkscape-silhouette

An extension to drive Silhouette vinyl cutters (e.g. Cameo, Portrait, Curio series) from within inkscape.
GNU General Public License v2.0
498 stars 113 forks source link

Registration marks - enlarge cutting area?? #206

Open bianchifan opened 2 years ago

bianchifan commented 2 years ago

With Silhouette Studio it should be possible to enlarge the cutting area by setting smaller regmarks. The smallest workable option seem to be 0.25 inch.

Pics took from Silhouette School Blog Screen Shot 2019-05-06 at 1 23 39 PM silhouette studio print area

EtherGraf commented 2 years ago

The values depends on the settings in the plugin.

You are free to place the regmarks on the page where you want. I am not sure about the real min/maxlimits.

It is only important to set these very same distances in the regmarks page of the plugin to tell it where to search and how to correctly offset the cut from the documant borders. The given template of the regmarks svg has the values of 10mm/10mm.

EtherGraf commented 2 years ago

Sorry, above comment was not exactly for this thread.

You can move the position of the regmarks to some degree, this will increase your cutting area. Tell the position in your document on the regmarks page.

You can also reduce the size of the regmearks, but i don't see, where it icreases the cutting area?

Btw. I think the line width of the regmarks is hardcoded as 0.5 mm and should not be changed.

EtherGraf commented 2 years ago

While looking at the code, I think in Graphtec.py, (around line 1335 in my outdated version)

    # automatic regmark test
    # add a search range of 10mm
    self.send_command(self.automatic_regmark_test_mm_cmd(reglength, regwidth, regoriginy - 10, regoriginx - 10))

I think, the lowest minimum of the distances here is 10mm to avoid negative coordinates. You could try to vary this hardcoded vaue to lower your limits.

EtherGraf commented 2 years ago

Also seen in Graphtec.py

  self.send_command("TB52,2")     #type of regmarks: 0='Original,SD', 2='Cameo,Portrait'
  self.send_command("TB51,400")   # length of regmarks
  self.send_command("TB53,10")    # width of regmarks
  self.send_command("TB55,1")

Length and line with of the regmarks symbols is hardcoded (device unit seems to be 1/20 mm) to 20mm and 0,5mm in this extension. If you want to try smaller areas, try to change these values

mojoyup commented 1 year ago

Im actually interested in using a cameo 2 for parts to make a larger printing area. Do you think the extension will allow for any size cuts anytime, even sketching? I want to print on a 30 x 30 and Ive taken apart the cameo 2 and have it ready to test but making a 30 x 30 in inkscape, it will not cut or draw everything if I test at corners for example. It just comes up with an error: "The output from the extension could not be parsed". Is it limited somehow by 12 or 24 somewhere that can be manipulated for larger areas for projects like this?

t0b3 commented 1 year ago

@mojoyup FWICT you may look at Graphtec.py for how you can adapt it...

mojoyup commented 1 year ago

@mojoyup FWICT you may look at Graphtec.py for how you can adapt it...

Thank you Ill check that :)

mojoyup commented 1 year ago

So, Ive been playing around with Graphtec.py, and I made changes and tested, change...test, etc. It still seems to have some sort of limitations on movement. I don't believe it is landscape or portrait related but I don't know what else to change. In that script, Ive changed in DEVICE = [] :variables with "width_mm". "height_mm" (making sure it overrides the self.hardware settings, I've changed the clipping settings to False anywhere I could, such as in class SilhouetteCameo: "enable_sw_clipping", in def setup: made sure all the mediaHeight and mediaWidth were set to something constant (1016) which is like 40", passed that variable to the bottom and right variables in the matparams. So everthing width and height related are both 1016, even if you change the mattype or choose none. ALso, made sure sw_clipping = False. Changed the mediawidth and height in def plot().

And the only other thing I could think of is the bbox maybe? Its set to not use it so itll cut, and set to not use registrations either. So, I dont know that it has an affect on dimensional limits still? I see that things are ran (say moving and drawing for example) in their respective def functions and they have the mmx, mmy.

Im not sure what else to change yet. Hope anyone who understand the code as well can help. :) If not no worries

EtherGraf commented 1 year ago

Just to understand, what you are doing:

Ive taken apart the cameo 2 and have it ready to test

You have modified the hardware of the cameo2? Then I assume, the limits of the width are hardcoded in the firmware of the device. I think you are not able to override it. Length should be possible up to at least 1000mm ( I have not tried it myself.)

To see the error message, you can start the script sendto_silhouette.py at commandline outside inkscape. Then you will get the error stack. Maybe this helps you at finding the problem. sendto_silhouette.py your_file.svg

mojoyup commented 1 year ago

Just to understand, what you are doing:

Ive taken apart the cameo 2 and have it ready to test

You have modified the hardware of the cameo2? Then I assume, the limits of the width are hardcoded in the firmware of the device. I think you are not able to override it. Length should be possible up to at least 1000mm ( I have not tried it myself.)

To see the error message, you can start the script sendto_silhouette.py at commandline outside inkscape. Then you will get the error stack. Maybe this helps you at finding the problem. sendto_silhouette.py your_file.svg

Yes exactly, I was seeing if I could turn it into a larger plotter for some fun ideas I have :P. Yeah it may be unchangeable but if I find out how, Ill def post about it in case anyone else would be interested in doing it. My cameo 2 is old so its better than scrapping it :P Thank you for the insight

mojoyup commented 1 year ago

I did it with cmd and it printed out this: device lookup under windows not tested. Help adding code! device lookup under windows not tested. Help adding code! device lookup under windows not tested. Help adding code! device lookup under windows not tested. Help adding code! device lookup under windows not tested. Help adding code! Silhouette_Cameo2 found on usb bus=0 addr=1 device init under windows not implemented. Help adding code! Device Version: 'CAMEO 2 V1.60 ' Media=132, cap='blue', name='Print Paper Light Weight' toolholder: 1 speed: 10 pressure: 10 Loaded media is expected left-aligned. mediabox: (0,0)-(1016,3000) Final bounding box and point counts: {'clip': {'urx': 1016, 'ury': 0.0, 'llx': 0.0, 'lly': 1016, 'count': 0}, 'only': False, 'count': 90, 'llx': 0.1340889999999814, 'urx': 609.466089, 'lly': 609.466089, 'ury': 0.1339999999999577}

ANd even when it finished, nothing else popped up. I attached a photo of the test and youll see the boxes, and a circle. The circle is to verify that it understand the extensions dimensions for both x and y. It goes to the circle, but never cuts it.

In inkscape, that is when it errors. Not sure what to make of it yet but Thats a cool cmd trick Capture

Oh, and I hope I didnt jack the post, just the registration marks was one of the things I thought it might be at first until I seen you dont have to use them and can set to False, and its the only post relevant to enlarging the cutting area size :P I can post a new topic if needed.

t0b3 commented 1 year ago

you may want to try new features:

mofosyne commented 1 year ago

If you determined a new viable size of the registration mark, the two varibles to change at the same time is REG_LINE_MM and REG_SAFE_AREA_MM. As of current, it is both set to 20mm.

(Arguably REG_LINE_MM and REG_SAFE_AREA_MM should be the same. But that's a story for a future refactor)