Issues exporting a red colour filled triangle as a datum in shaper origin

I am experiencing issues getting my datum where I want when I export simple 2d geometry as an SVG file for the shaper origin.

Shaper origin used SVG’s which is not great but I need to be able to adapt and sort this one way or another.

Shaper origin needs to see a red triangle as a custom anchor, which should be simple..

the info says:
“To add a custom anchor, create a right-angled triangle that’s a closed shape and contains a red fill with no stroke. The right angle vertex defines the location of the anchor point. The shorter leg of the right angle defines the X-axis and the longer leg defines the Y-axis.”

I have tried a solid fill hatch and a surface, but I keep getting errors on the origin saying:
“unable to place design, check that your file is formatted properly”
and it is all to do with the red triangle…

if I omit the triangle the simple 2d gemotry loads up ok on the shaper origin..

on the shaper help forum someone has pointed out the colours are exported as Hex and need to be RGB??

does anyone use the shaper origin or know why I am getting this issue?

Note

I can export the 2d geometry and import it into something like Inkscape then add the red triangle and export again as an SVG and it works fine.

So there must be something going on with the red triangle in Rhino.

Note

I can export the 2d geometry and import it into something like Inkscape then add the red triangle and export again as an SVG and it works fine.

So there must be something going on with the red triangle in Rhino.

Hi Adrian,

When you use a solid hatch, are you deleting the triangle curve that you use to set its boundaries?

If you’ve tried deleting the curve and that doesn’t work, it may be because Shaper expects the triangle to be defined using the svg polygon construct whereas Rhino creates it using the path construct.

Are you aware that Brian Gillespie created a Rhino plugin for Shaper Origin svg export? I don’t know whether he’s got as far as including custom anchors but worth a look. It is available in the Package Manager and is called TunaHalf. There is also a discourse thread which may have helpful tips at Shaper Origin SVG Export

Regards
Jeremy

2 Likes

Hi Jeremy

Thankyou for your reply.
I have tried with and without the curve. I have also tried using a surface, a bigger surface trimmed to the curve, and a few other things.

If I export the SVG with a curve only, bring it into inkscape then add the fill then export as an SVG, this works in shaper but is a bit of hassle and errors could creep in…
But if I then import the file from inkscape back into rhino the fill is a surface in rhino?
however I cant use rhinos surface to get it working.

i have seen the post and info on Tunahalf and it is aimed at / looks like more of a 2.5D programming of shaper using shapes and using 3d faces etc..
This might be good and I will look into it more and perhaps try it but I do need to be able to construct simple 2d geometry using basic lines / curves etc.. and I do need to find a way of controlling the datum from Rhino if I can..

regards Adrian

Adrian,

Could you post a svg file created in Rhino, with one simple straight toolpath as you would normally produce it? And include a layer called Custom Anchors with an unfilled triangle where you want an anchor to appear.

Regards
Jeremy

Hi Jeremy

I think I have sorted this now. and the answer was in the comments on the “Tuna_Half” post but not in the actual Tuna-Half plugin..

basically i need to create the triangle as a curve and place it in rhino where I want the datun. then export as an SVG.
then open the SVG file in a text editor I used visual Studio code, locate the fill and change it to red in lower case .
This seems to work well.

And I am sure something Rhino could easily add if it was required by others.

I have uploaded a test set of files if your interested.

this was the test file created: “test file for ref ORIG.svg” and it looks like this “test file for ref ORIG.jpg” you can see the small red triangle placed.

I then edit it see this file: “test file for ref MODIFY FILL.svg” and this is the screen shot where I made edits: “test file for ref MODIFY FILL.jpg”
to make it easier to see I place the triangle on a layer called “shaper_origin_datum” shown by the green arrow and I edited the fill that I circled in green. it has to be lower case.

I also included my original attempt where I filled the triangle in rhino with a solid fill but it does not alter the triangle fill? see “test file for ref RHINO solid hatch FILL.svg”

hopefully this might help someone, or perhaps Rhino guy might be able to add the fill colour when a solid fill is used?

it will test over time to see how it goes / how accurate it is..


test file for ref MODIFY FILL

test file for ref ORIG
test file for ref RHINO solid hatch FILL

Hi Adrian,

I see your screenshots but I don’t see the file uploads. Could you have another go at uploading them - I’m intrigued because it looks like what you are doing is different from what Shaper say to do!

Regards
Jeremy

FWIW the SVG standard specifically says that the basic colour keywords are ASCII case insensitive so provided Shaper conform to the standard you should be able to use “red”, “Red” or “RED”. You can also specify the colour in hex - “#FF0000” - which is what they use in their own example.

Incidentally, what surprises me is that your screenshot example works as you have left in several stroke related attributes and Shaper say that your triangle should not have a stroke (“To add a custom anchor, create a right-angled triangle that’s a closed shape and contains a red fill with no stroke. The right angle vertex defines the location of the anchor point. The shorter leg of the right angle defines the X-axis and the longer leg defines the Y-axis.”). Perhaps they have relaxed the requirement?

test file for ref MODIFY FILL
test file for ref ORIG
test file for ref RHINO solid hatch FILL

Hi Jeremy

I just uploaded them again, however they are not showing but i think this is because they are SVG’s and the forum is trying to show them as an image but only showing a white space.
i you hover over the white space you will see a small visual search box appear like this:
image

when move my mouse so it is below this i am over the white image and when i right click my mouse on this white image and choose save as i can save it as an SVG on the pc and then can open it ok.

i assume this is an issue on the forum?

I exported the data as an SVG in Rhino i didn’t change any settings, if i load it into the shaper origin as it is, it all comes up as usable line geometry but the datum is based on a bounding box with 9 box nodes.

when i change the fill in code to “red” then the datum works ok.
i did try it on one attempt as “RED” and it didn’t work so i changed it to “red” and it did work.

I have just tried again and on “red” and “#FF0000” works
“Red” and “RED” do not work.

Thanks Adrian, I used your “save as” to download them. Could I ask you to try the svg file I am attaching to this post in your Shaper Origin (sadly I don’t have access to one to test)? I’m looking at a couple of possible ways of circumventing the need to use a text editor.
vvvvvvvvvvvvvvvv svg here vvvvvvvvvvvvvvvv
test file for ref CUSTOM ANCHORS
^^^^^^^^^^^^^^^^^ svg here ^^^^^^^^^^^^^^^^^

Regards
Jeremy

Hi Jeremy
yes that works.

A

Hi Adrian,

I have made some progress and produced a test plugin for Rhino 8 that creates the SVG file for Shaper Origin with Custom Anchors conforming to their requirements without the need to run it through a text editor.

However, the Rhino programming interfaces I can use do not seem to extend to the SVG Export dialog that appears after you have selected a SVG file destination.

These settings appear to be sticky, so if you use the same settings for all your output, that should not be a problem, But if you tweak them every time then this isn’t going to work. Let me know what you think.

Regards
Jeremy

Hi Jeremy

Thank you.
I am not a great fan of plugins on software as I use them commercially and have had issues in the past with software upgrades, glitches, and for a few other reasons…

Also, I do not use the origin router that often, as I have other CNC machines programed via cad cam and it is used for special jobs. So to add the 2fill" in the code is not an issue.

regards Adrian