Align to terrain - OBJ

635
2
08-15-2016 10:11 AM
SheylaSantana
New Contributor III

Hello, Everyone.

I am facing a hard time to align an OBJ to the terrain.

I am importing a point feature dataset to Cityengine and align it to the terrain. And it is working. I can see the points.

Later I am applying the rule Insert_obj.cga

@Range(-360, 360)
attr Rotation = 0

@File
attr Model_File = "assets/yacht/Pershing_yacht.obj"

@Range(0.1,10.1)
attr Scale = 1

Shape -->
s(0,0,0)
center(xz)
i(modelFileChecked)
s('Scale,'Scale,'Scale)
center(xz)
r(scopeCenter,0,Rotation,0)

modelFileChecked = case fileExists(Model_File): Model_File else: "builtin:cube"

When I apply and generate the model, the yacht stays above the terrain and other layers.

Does anyone have any idea why it is happening?

Thank you all,

Sheyla Santana

Sending the screenshot too.

Tags (2)
0 Kudos
2 Replies
LR
by
Regular Contributor

Sounds like the model's origin is off. Try loading the model into the scene and then check it using the move tool. The axes and yellow circle should be in its center.

SheylaSantana
New Contributor III

Many Thanks!!!

0 Kudos