lairdubois / lairdubois-opencutlist-sketchup-extension

OpenCutList is a SketchUp Extension for automating the generation of cut lists for woodworking projects.
https://extensions.sketchup.com/extension/00f0bf69-7a42-4295-9e1c-226080814e3e/opencutlist
GNU General Public License v3.0
436 stars 55 forks source link

Depth looks reversed when exporting SVG #645

Closed labelxyz closed 1 month ago

labelxyz commented 5 months ago

When I export an object to SVG, the depth/height of the paths are in reversed order. (I import the SVG file in Easel) Is there a way to reverse this?

I have tried all kind of things but nothing works...

First image in sketchup, second in easel...

image image

bbeaulant commented 5 months ago

Hi,

What Merging Mode option did you use ?

labelxyz commented 5 months ago

Hi Boris, I am not aware of using a merging mode. Is this in sketchup or in OpenCutlist?

bbeaulant commented 5 months ago

Hi, I'm talking about this parameter :

Capture d’écran 2024-05-23 073243

As you can read in the documentation here, it changes the way depths of cut are exported.

Can you share your SVG ?

labelxyz commented 5 months ago

Thank you!

Aha, merging mode is called "ontleding" in the Dutch version. I've tried about everything to get the right file but without luck...

I must say that I am using OpenCutlist in a wrong way probably: I want to use my CNC to cut out one object only....

But, after a lot of trial and error I figured out that Easel uses the greycolor as depth indicator. This is interesting because than there are 256 depth levels. These levels are not absolute but always depending on the total height of je object.

Somehow the greytones from OpenCutlist are exactly the opposite of the sketchup heights. I don't know if the greytones are related to the height of the faces in sketchup?

The top level face color should be #ffffff and the floorlevel = #000000. boris

If the object is 40 mm high a face at 20 mm: (25 / 40) 256 = 128 hence the color must be #808080 If the object is 50 mm high a face at 15 mm: (15 / 40) 256 = 96 hence the color must be #606060

I keep searching for solution.

I have example files attached Boris.zip

bbeaulant commented 5 months ago

Hi,

Curently the depth color is from given part color in export form to white. Code.

This is mainly beause it's the way the Shaper Origin color encoding works.

labelxyz commented 5 months ago

Thank you so much! I can work with that.

Greetings Eric Lugtigheid

Op vr 24 mei 2024 14:46 schreef Boris Beaulant @.***>:

Hi,

Curently the depth color if from given part color in export form to white. Code https://github.com/lairdubois/lairdubois-opencutlist-sketchup-extension/blob/e35d93fdefdb13bf5f053cb3987fc81e8d1512ee/src/ladb_opencutlist/ruby/helper/svg_writer_helper.rb#L176 .

This is mainly beause it's the way the Shaper Origin color encoding https://support.shapertools.com/hc/en-us/articles/115002721473-Cut-Type-Encoding works.

— Reply to this email directly, view it on GitHub https://github.com/lairdubois/lairdubois-opencutlist-sketchup-extension/issues/645#issuecomment-2129450877, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOE4SPEMSF5RSWSHNXVRZWDZD4ZBRAVCNFSM6AAAAABIEBIINOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRZGQ2TAOBXG4 . You are receiving this because you authored the thread.Message ID: <lairdubois/lairdubois-opencutlist-sketchup-extension/issues/645/2129450877 @github.com>