Skip to main content

Hello, I have a REVIT file which contains some cylindrical objects (e.g. pipes) and when I convert the model to cesium, it creates hexagonal shaped pipes instead of cylindrical ones. Is this intentional or can I bypass this behaviour somehow?

 

NOTE: The Revit model is offset according to it's Reference Point. Also, the Data Inspector shows the cylinders correctly where it is an aggregate geometry with with many many IFMEFaces.

 

image.png

HI @mrdado12345​,

If the cylinder looks correct in Data Inspector, then the culprit is likely coordinate rounding on the out to Cesium. The Cesium writer will reproject the output data to the geocentric coordinate system required by Cesium, so for good results, the source data should have a coordinate system set on it.

 

Does the Revit data show a coordinate system set when you view it in Data Inspector? You may need to change the Revit reader's Revit Coordinate System to Read to 'Georeferenced'.


Hi ​@daveatsafe,

I have a similar issue when writing to Revit. The 3D solids (in FFS) look just fine in the Data Inspector and are positioned in the Dutch RD coordinate system.

 

Input FFS in DI

 

When writting to Revit I am using the following target coordinate system XY-FT to reproject into feet (as stated in the article)

After writting and viewing the in the data inspector I see that the data is written into the XY-MM coordinate system and that the Revit features are not smooth as the input (see image below)

 

Revit output in DI

Which target coordinate system should be used in writting to Revit? and does the coordinate system in the Revit template has any effect on the output object coordinate system? How can I preserve the correct 3D object in the Revit output? 


FYI, I did try all the different Geometry Detail Level settings in the Revit reader, but the result are the same.


Hi Itay,

The XY-<unit> coordinate systems are non-earth coordinate systems, and don’t really convert to geographic or projected coordinate systems. Please use a LocalCoordinateSystemSetter to convert your data to a local foot based coordinate system centered around user chosen lat/long instead. This will also allow you to convert back to Dutch RD if you need to extract data from Revit, since you will know the origin lat/long.

Kind regards,

Dave


Hi ​@daveatsafe,

Thanks for getting back to me on this. I am a bit lost about the following: “local foot based coordinate system centered around user chosen lat/long instead.”

As far as I know there is not foot based Ducht RD coordinate system, can you specify a bit more what you mean by local foot based coordinate system? and what shoudl be the “user chosen lat/long”? I was thinking of using the lower left point of the boundingbox as the chosen XY (in RD) for the LocalCoordinateSystemSetter, is that the way to go about it? or do I need to reproject this point into LL? and then transform into a local coordinate system?

Thanks,

Itay


Revit uses 32 bit real coordinates internally, like most 3D applications, instead of the 64 bit real coordinates used by GIS systems. Because of this, coordinates in most coordinate systems will lose precision when used in Revit, leading to the results you see with the pipes.

The LocalCoordinateSystemSetter will create a local Azimuthal Equal Area coordinate system centered on the origin you choose and rep. If the origin is close to the data, the resulting coordinate values will be low enough to not suffer precision issues in Revit.

You are correct that this origin can be specified in any coordinate system you prefer - I just usually use lat/long. In your case, the lower left coordinate of the project in RD coordinates would work well.

The LocalCoordinateSystemSetter will not actually reproject the data, so please use the following technique to reproject the data:

  • Creator to create new feature
  • Send new feature to LocalCoordinateSystemSetter to create coordinate system
  • Next send it to CoordinateSystemExtractor to extract new coordinate system name to an attribute
  • Use FeatureMerger with Join On set to ‘1’ for both Supplier and Requestor to merge new feature with coordinate system attribute onto all data features 
  • Use Reprojector on data features, with destination coordinate system set to attribute holding new coordinate system name, to reproject all the data into the local coordinate system

HI ​@daveatsafe,

Thank you for the explanation and detalied instructions.

I have just a couple more questions:

  1. As states in the article, Revit expects the features in feet: “Also note that the Revit writer expects input features to have a coordinate system measured in Revit's internal units (feet).”Does that mean I need to scale my input data (meters) into feet before or after the reprojection into the  local coordinate system?
  2. and which coordinate system do I use in the Revit writer?

 

Thanks,

Itay

 


Hi Itay,

The XY-<unit> coordinate systems are non-earth coordinate systems, and don’t really convert to geographic or projected coordinate systems. Please use a LocalCoordinateSystemSetter to convert your data to a local foot based coordinate system centered around user chosen lat/long instead. This will also allow you to convert back to Dutch RD if you need to extract data from Revit, since you will know the origin lat/long.

Kind regards,

Dave

hi,If I change my coordinate system to WGS84, will this problem not occur?


I think this will take place with any coordinate system since the rounding, as ​@daveatsafe explains, does not have to do with the coordinate system of the features but the applications.


HI ​@daveatsafe,

Thank you for the explanation and detalied instructions.

I have just a couple more questions:

  1. As states in the article, Revit expects the features in feet: “Also note that the Revit writer expects input features to have a coordinate system measured in Revit's internal units (feet).”Does that mean I need to scale my input data (meters) into feet before or after the reprojection into the  local coordinate system?
  2. and which coordinate system do I use in the Revit writer?

 

Thanks,

Itay

 

I assume that you should be able to set the default units in a template file to something like meters. I also assume that the coordinate system will probably be ignored when writing. I suspect that reading the data back in you will need to undo your local projection.

What I usually do in 3D workflows is to use the boundingboxaccumulator and take the center point of this, project the point to LatLong.

I take this center point and reprojected to _AZMEA_ (equal area). The output coordinate system is dynamic based on the lat long of the centre point. 

You then use the coordinate system extractor to get the coordinate system as a name, Feature Merger to merge the coordiante system to the original 3D features, then use a reprojector using the _coordsys as the destination coordinate system.

Now you should have all the data in xyz relative to the mid point of the model. You can undo the opposite workflow if you know that lat-long. 

I guess with Revit it’s important to know where the origin of the RVT template file is (in the real world) you are writing to and make sure that the origin of your model matches. 


Hi ​@virtualcitymatt,

Thanks for your response. I am actually doing that but not in LL, since the reprojection to the local coordinate system can be done in the original coordinate system.

“I guess with Revit it’s important to know where the origin of the RVT template file is (in the real world) you are writing to and make sure that the origin of your model matches.”

That is very important but I cannot know that in advance, so the client needs to upload it's own template with these settings (SitePoints)


Hi ​@virtualcitymatt,

Thanks for your response. I am actually doing that but not in LL, since the reprojection to the local coordinate system can be done in the original coordinate system.

“I guess with Revit it’s important to know where the origin of the RVT template file is (in the real world) you are writing to and make sure that the origin of your model matches.”

That is very important but I cannot know that in advance, so the client needs to upload it's own template with these settings (SitePoints)

Yeah that is where I see the issue as well and likely that would be the workflow I would try and go with


Hi ​@virtualcitymatt,

The process you are using can be replaced by the CommonLocalReprojector, which does all those steps under the hood. I didn’t suggest it to Itay because it doesn’t let you control the origin location - that is just taken from the accumulated center point. However, the center point lat/long is included in the name of the new custom coordinate system, so you could extract it with some regex in the StringSearcher.

I think there is a process in Revit to set a Survey Point at the origin to a projected coordinate system location, which lets you map the local Revit coordinates to projection coordinates. Having a known point for the Revit origin would make this easier, so the extra transformers for the LocalCoordinateSystemSetter method are worthwhile.


Hi ​@daveatsafe,

I just wanted to confirm that setting the SitePoints value cannot be done in the workspace. All my expirements so far show that these values originate from the template, even when trying to overwrite them. Is this correct?


Hi ​@virtualcitymatt,

The process you are using can be replaced by the CommonLocalReprojector, which does all those steps under the hood. I didn’t suggest it to Itay because it doesn’t let you control the origin location - that is just taken from the accumulated center point. However, the center point lat/long is included in the name of the new custom coordinate system, so you could extract it with some regex in the StringSearcher.

I think there is a process in Revit to set a Survey Point at the origin to a projected coordinate system location, which lets you map the local Revit coordinates to projection coordinates. Having a known point for the Revit origin would make this easier, so the extra transformers for the LocalCoordinateSystemSetter method are worthwhile.

I think actually I remember you suggesting this workflow to me a couple of years ago 😂


Would anyone with some Revit writting via FME mind answering??

I just wanted to confirm that setting the SitePoints value cannot be done in the workspace. All my expirements so far show that these values originate from the template, even when trying to overwrite them. Is this correct?


Reply