Community
InfraWorks Forum
Welcome to Autodesk’s InfraWorks Forums. Share your knowledge, ask questions, and explore popular InfraWorks topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Match IW360 objects XY rotation to surface answer day

23 REPLIES 23
Reply
Message 1 of 24
blueping
1032 Views, 23 Replies

Match IW360 objects XY rotation to surface answer day

I would like to "mapexport" objects from Civil 3D to IW360, so that XYZ rotation information is getting mapped into IW360.

 

I managed to do that for the Z rotation. However, there is always an offset error of ~0.9 degrees.

 

What I did is "mapexport" in C3D, then in the data tab>source field I choose rotation. Then export as .shp.

In IW360 it will come in radians, so in the rotation Z is use the formula: "rotation*180/3.1415". The offset error is always been ~0.9 degrees for me. so I modify that into "(rotation*180/3.1415)+0.9)". This is working for me, but is that offset a bug or I did something wrong?

 

 

 

As for the XY rotation I've tried something fancy but failed.

 

 

 

If you're interested what I've tried:

I select my surface, then use add a slope label on the point I would like to match the XY values. Then I explode the slope text now has a rotation. I mapexport the "contents" of the text and the "angle" of the text. Going into IW360 I can extract the Euler angles (XY rotation) from it by doing a transformation:

 

Sin ( Atan ( (1/ToFloat ( Contents  ))*180/3.1415 ) )*Cos ( Rotation *180/3.14  )
Sin ( Atan ( (1/ToFloat ( Contents  ))*180/3.1415 ) )*Sin(Rotation *180/3.14)
Rotation *180/3.14

 

However, here is where I failed.

 

1. tan is a assymtotic function. for those values I would get an error. for all non-exploding value it's alright.

2. the angle of the text doesn't contain information of which of the 2 directions the "slope label"-arrow is pointing at

23 REPLIES 23
Message 21 of 24
blueping
in reply to: haik2

@haik2

thanks for the clarification. I actually never knew there is a small deviation of north between coordinate systems. I'll keep on using the +0.9 compensation as long it's consistant across the whole model.

 

The tan2 I'll look into it maybe someday. Even if the quadrant issue is fixed, the result really wouldn't be that great. but thx anyway.

Message 22 of 24
makebv
in reply to: haik2

This thread is a bit old now, but I finally have time to report back.

 

@haik2

 

Thank you for pointing out which way is North. I've been looking further into this problem and followed this thread, which lead me to find the answer why  North is not where I thought it was. It make sense, it totally does: the earth is round and model space is flat

 

I have a IC design background, unfornately something so basic was not included in my knowledge.

 

I've created a rough workflow to get to know what the deviation is at the AOI I would like to share:

 

-set your desired coordinate system in Toolspace> Settings tab

-go to layout, create a viewport

-layout tools tab, place a North Arrow, associated with the new the viewport

-draw a vertical line with ortho on, draw a line on top of your north arrow

-"dimang" the 2 lines you just drew

-make sure your dimstyle has a high enough precision

-the dimang value is your angle offset value

 

If your AOI is big, your offset value could have a relatively big difference, but most of the time it's neglectable

 

 

Why is this so important?

Because it allows you to: (do I sound a little bit like Eric C. ?)

 

1. use "mapexport" command in C3D with rotation data field and import objects in IW360 with the right location

2. use IW360 materials with "TexCoord anchor" turned on and have a perfectly matched angle: measure the angle between true north and the area you want a coverage on

 

This workflow got a little bit burried under another thread, maybe I'll create a new one later or Haik2 can create one for me if you think it's worthy enough

(the problem in OP still isn't addressed)

 

edit: woops, I logged in as my company's account, I'm Blueping

Message 23 of 24
haik2
in reply to: makebv

@blueping @makebv  Perfect! Nice workflow!

 

now let's see what we can do about those complete rotations. I did the derivation from a slope s plus an angle a. The angle is measured in degrees from the positive x axis counterclockwise and should contain that north deviation angle.

 

rotate x: 57.29578 * atan(s*sin(a*0.01745329))

rotate y: 57.29578 * asin(s/sqrt(1+s*s)*cos(a*0.01745329))

rotate z: 57.29578 * -atan2(sin(a*0.01745329),1/sqrt(1+s*s)*cos(a*0.01745329))

 

(0.01745329 is the conversion factor from deg to rad and 57.29578 from rad to deg)

 

I'm not perfectly sure if this works with your exact setting (maybe I got some signs wrong), but in my limited test it seemed to produce reasonable results.


Haik Lorenz
Software Developer

Message 24 of 24
blueping
in reply to: haik2

@haik2

thanks for working on my stupid idea to match a object to surface tilt. I'll be testing it out asap then report. Atm working on a project with a higher priority, got some new issue's again.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report