Skip to main content

Hi people,

would anyone suggest how to output sketchup file with correct length units?

I recently managed to handle layers with the parameter "sketchup_layer_name". However, any model i produce has inches set as length units. I need to change it to meters.

Is there a similar parameter, such as "sketchup_length_unit" ?

Thanks,

Jaro

Hi Jaro,

You should set a coordinate system on your output features. Is it geo-referenced or not? In the latter case, you can set your coordinate system to XY-MT (Arbitrary XY Meters) using a CoordinateSystemSetter. Note that if your units are aren't actually metric, you should use a Scaler first.

If it does have an actual geographic location, it takes a bit more effort. In that case you should use the LocalCoordinateSystemSetter. Let me know when you need help with that.


Jaro,

Does the geometry measure correctly ???

When output, SketchUp always assumes you are working in inches.

............................

You could try the following which usually works when you want a model in metres

To convert to metres (see screen dump below).

Add scaler to your workbench with the following parameters

1000 / 25.4 = 39.370078

............

In sketchup, change your units to metres.

..............

Hope this helps

Cheers

Howard L'


Thanks for answers. I should have to mention that the model fits well in Sketchup, it sits exactly where it needs to sit over Google maps, so this is not a matter of coordinate system. This is well defined in meters. Even the buildings are as high as I defined them in meters.

However, if I want to push/pull them in sketchup, the measure is inches. I have to go to model info and change inches to meters.

So rather thannot working, this is just inconvenient.


Jaro,

Does the geometry measure correctly ???

When output, SketchUp always assumes you are working in inches.

............................

You could try the following which usually works when you want a model in metres

To convert to metres (see screen dump below).

Add scaler to your workbench with the following parameters

1000 / 25.4 = 39.370078

............

In sketchup, change your units to metres.

..............

Hope this helps

Cheers

Howard L'

"In sketchup, change your units to metres." - this is what I do. But I would like to make meters a default measure so that it does not need to be changed manualy.

 

 


Thanks for answers. I should have to mention that the model fits well in Sketchup, it sits exactly where it needs to sit over Google maps, so this is not a matter of coordinate system. This is well defined in meters. Even the buildings are as high as I defined them in meters.

However, if I want to push/pull them in sketchup, the measure is inches. I have to go to model info and change inches to meters.

So rather thannot working, this is just inconvenient.

Hi @jaro,

 

That's odd... Have you already tried reading your own SKP back in with FME, to see which units it sets?

 

Each SketchUp feature has a bunch of Model Info format attributes in FME, that are hidden by default. When you use a SketchUp reader, you can see these in the Data Inspector. There is a whole section called UnitsOptions.* that (for example) looks like this:

 

 

 

 

What does your UnitsOptions.LengthUnit say? It should be a value of 0 ~ 4, which corresponds to the following units:

 

0 = inch (default)

 

1 = foot

 

2 = mm

 

3 = cm

 

4 = m

 

 

So I'm curious if your file shows 1 or 4. Also curious what the UnitsOptions.ForceInchDisplay says. And do tell us what your coordinate system definition (not just the name) is by double-clicking on the coordinate system name of a selected feature in the Data Inspector.

 

By the way, you could try adding this UnitsOptions.LengthUnit yourself with an AttributeCreator/Manager and set it to 4, before you write the SketchUp features. However, I have once asked Safe about this and they said that these format attributes are read-only on the SketchUp reader/writer. But it never hurts to retry... :)

 

 

Also of interest: on your writer parameters, what does it say under "Move to Local Coordinate System"? Yes or No?

Thanks for answers. I should have to mention that the model fits well in Sketchup, it sits exactly where it needs to sit over Google maps, so this is not a matter of coordinate system. This is well defined in meters. Even the buildings are as high as I defined them in meters.

However, if I want to push/pull them in sketchup, the measure is inches. I have to go to model info and change inches to meters.

So rather thannot working, this is just inconvenient.

So... in FME Workbench I am reprojecting everything to WGS84

 

SKP writer has "Move to Local Coordinate System" set to Yes.

 

 

When the sketchup file is created, it has following parameters:

 

And it has a "SKP_COORDSYS_0" projection, which seems to be equal to WGS84.

 

 

Yes, I tried to output the parameter "UnitsOptions.LengthUnit". But even if I exposed it, removed and created new one, filled with value 4, it still shows inches.

 

It seems to be a hard coded default.

 

 

 

 


Hi @jaro,

Okay, thank you for sharing those screenshots. Very useful info.

 

Could you please (like I mentioned earlier) not use a CsmapReprojector, but a LocalCoordinateSystemSetter and set it to the following (based on your Coordinate System Properties screenshot):

Then, write it to a SketchUp file, but do not set a Coordinate System on the writer (it will read it from the feature) and set the "Move to Local Coordinate System" to No, since we've already done this ourselves now. Could you try this and let me know what happens? If nothing changes, try it again with "Move to Local Coordinate System" to Yes...

Either way, you shouldn't reproject using a (Csmap)Reprojector set to LL84, as it will reproject and set the X/Y units to degrees (because LL84 merely is a geographic coordinate system and not a projected coordinate system). When the features arrive at the writer, FME no longer knows anything about the original units anymore and since the "Move to Local Coordinate System" was set to Yes, it will reproject once again to a local coordinate system using the default SketchUp unit (this is set in the SketchUp API), which is inch.

Now, in my example above, I have set the Origin X/Y to a fixed value, but if you want, you can set it to a dynamic latitude (=Y)/longitude (=X) attribute value taken from the center point of your SketchUp file, for example. This center point should be reprojected to LL84 like you did before and its X/Y can then be used to set the LocalCoordinateSystemSetter origin (but first merge the center coordinates back on the features or use a GeometryExtractor/Replacer technique). Let me know if you need help with that.


Reply