Why block is not with original 1:1 scale when export to su?

Hey, guys!

I defined a block in Rhino and then exported it to SU. It seems fine at first glance, but actually the block in SU has been applied a 25x scale. When I reset the scale, it becomes 25 times the original. I didn’t perform any scaling operation on the block in Rhino. Why is this happening, and is there a way to fix it?

block scale problem.skp (287.2 KB)

Could the scale possibly be exactly 25.4 ? ie: 1 inch = 25.4 mm.

yep, but I chose the mm template in rhino, why convert to inch when export?? mm=> inch => mm?

Hi,

I just created a block in Rhino and exported as a SketchUp file. It came into SU at the correct size, no scaling.

If you could run _SystemInfo and paste the complete text here and also post an original Rhino .3dm file with the block that rescales we might have a better chance to understand what is happening on your system.

Regards
Jeremy

Why do you think Rhino is “converting to inch” upon export rather than SU doing it upon import?

Hey,Jeremy,When you right-click on the block in SU and choose to reset the block scale, is it correct?

Yes, it could happen during import, or it could happen during export;, I am not sure.

If you right click & choose Reset Scale, Su will change a component that was imported and initially appeared correctly at an original size of 10 mm from 10 mm to 10 inches.

To stop Su from doing that, select the component, right click and choose Scale Definition before doing anything else. Having done that, Reset Scale will correctly reset the component to the imported size of 10mm whenever you use it.

It may be worth asking Trimble tech support about this - the initial resize might be a Su bug or it might be because there is some hidden rule about defining the Scale Definition that McNeel won’t have been aware of (coupled with a bizarre Su data model, but that’s another story).

Note: the .skp file format is proprietary to Trimble and is not publicly documented, so I have no insight into its internal workings.

Can we get both the Rhino file and the SKP file so we can compare how the units are getting confused?

Here are minimalist files that repeat the issue:

Rhino 8 file with 10mm cube as a block:
Sketchy.3dm (61.8 KB)

File saved as a SketchUp file:
SketchySaved.skp (6.0 KB)

Block instance exported as a SketchUp file:
SketchyBlockExported.skp (6.0 KB)

When Opened in SketchUp, the 10mm object in the Saved file rescales to 254mm on running Reset Scale.

When Imported into a file in Sketchup, the 10mm object from the Exported file also rescales to 254mm on running Reset Scale.

In both cases, running Scale Definition immediately on the 10mm object sets that as the base size and Reset Scale after any subsequent resizing will return the objects to 10mm.

Choice of units in SketchUp has no bearing on this.

I only have access to the free version of SketchUp so I can’t save you files as they are after SketchUp processing.

HTH
Jeremy

We are reaserching the state of SKP units in the file format. Thanks for the example files, we will see what is possible.

So the issue is not the initial import, but the Reset Scale command. Interesting. So this will take more research.

So the issue is not the initial import, but the Reset Scale command. Interesting.

My suspicion is that there may well be data in the skp file that records the scale baseline size distinct from the current size of the component and Rhino should set that to the same value as the current size (or perhaps the unscaled size of a block definition if the imported instance was scaled in Rhino) but that is either not being set or is set with the wrong, or no, units.

I guess the answer might be found by creating an equivalent component part in Sketchup and reverse engineering the skp file differences.

Makes sense. We are looking into it. Might take some time to figure it out.

Yes, scale definition can fix it, but it is not the most direct solution because you need one by one to fix it. I think it may be a Su bug if you export the block as 3ds file, it works well.

I asked Gpt and it said that It may be because SketchUp’s original unit system is based on the imperial system.

I do another test, create a block in rhino use the inch template, and export to su, it works well. So I think the sketchUp’s native unit system maybe based on the imperial system, and the bug happenned during import

This issue with blocks was logged earlier as https://mcneel.myjetbrains.com/issue/RH-74216

Side note: I’ve logged quite a few Sketchup related issues about two years ago. @tim managed to fix some of them. Others ended up being hard or impossible because of their api.

Given that .skp is SketchUp’s native format it would be pretty unlikely that such a bug would go unreported by the SketchUp community when importing their natively made components.

Indeed, if I make a 10mm cube in SketchUp, save it and import it into a new file it comes in at 10mm. More interestingly from a Rhino export perspective, with an imported SketchUp-made object the Reset Scale option is unavailable and remains so until you resize the object. This implies that SketchUp is putting information into the .skp file that Rhino is omitting.

Whether the boffins can work out what that data is and where it goes, given the unpublished file format, remains to be seen…