Solved

Efficient creation of cylinders in Autocad output files?


Badge

Hi, you lovely fellow FME-people! I have a question that I have tried in this forum before but I really didn't get help so now I'm trying it again. I use FME to create earth samples speedy and elegantly in an output DWG-file using the DWGStyler. I point out a cylinder block in a template file and then use it in the output REALDWG (after inputting x,y and z and length to each individual sample). The challenge is that I also want to use FME to add tilt and rotation to the block in the output file. Is this possible? Or do you have other suggestions. It is important for me that the geometry can hold attributes and that the output file size is kept to an absolute minimum.

icon

Best answer by daveatsafe 13 May 2020, 18:16

View original

6 replies

Userlevel 2
Badge +17

Hi @peteralstorp,

You can use the feature attributes:

  • autocad_extrusion_x
  • autocad_extrusion_y
  • autocad_extrusion_z

to set the tilt of the block.

The attributes describe the vector to use as the Z axis of the block, and should have values between 0 and 1. You can rotate around this axis using the attribute autocad_rotation.

Badge

Hi @peteralstorp,

You can use the feature attributes:

  • autocad_extrusion_x
  • autocad_extrusion_y
  • autocad_extrusion_z

to set the tilt of the block.

The attributes describe the vector to use as the Z axis of the block, and should have values between 0 and 1. You can rotate around this axis using the attribute autocad_rotation.

Interesting, will try this out NOW! Thanks, @daveatsafe!!

 

Badge

Hi @peteralstorp,

You can use the feature attributes:

  • autocad_extrusion_x
  • autocad_extrusion_y
  • autocad_extrusion_z

to set the tilt of the block.

The attributes describe the vector to use as the Z axis of the block, and should have values between 0 and 1. You can rotate around this axis using the attribute autocad_rotation.

@daveatsafe do you have any suggestions on where I can find formulas or how to think to get from known insertion point/inclination/rotation to the extrusion vectors?

Userlevel 2
Badge +17

@daveatsafe do you have any suggestions on where I can find formulas or how to think to get from known insertion point/inclination/rotation to the extrusion vectors?

Hi @peteralstorp,

I would use some variation of the following process:

  • Store original feature geometry in attribute using GeometryExtractor.
  • Use VertexCreators to replace geometry with line from 0,0,0 to 0,0,1
  • Apply space rotations around 0,0,0 with series of 3DRotators
  • Get new location of second point using CoordinateExtractor
  • Restore original geometry with GeometryReplacer

The coordinates of the second point will give you the x,y,z of the extrusion vector.

Badge

Hi @peteralstorp,

I would use some variation of the following process:

  • Store original feature geometry in attribute using GeometryExtractor.
  • Use VertexCreators to replace geometry with line from 0,0,0 to 0,0,1
  • Apply space rotations around 0,0,0 with series of 3DRotators
  • Get new location of second point using CoordinateExtractor
  • Restore original geometry with GeometryReplacer

The coordinates of the second point will give you the x,y,z of the extrusion vector.

That makes sense, thank you for these tips. Very helpful!

Badge

@daveatsafe do you have any suggestions on where I can find formulas or how to think to get from known insertion point/inclination/rotation to the extrusion vectors?

@daveatsafe​ 

The thing is this script I'm trying to finish will be used many many times with much data. So I need it to be suuuuuuper fast. Hence I would like to calculate the extrusion parameters from a known ground insertion point/inclination/azimuth to get the extrusion vectors faster than having to create a geometry first to get them. There must be a smart mathematical way to calculate this, don't you agree?

Reply