Commit ba3e69dd authored by jean-pierre charras's avatar jean-pierre charras

3D export: Added patch from Lorenzo Marcantonio. Fixed issue in VRML export...

3D export: Added patch from Lorenzo Marcantonio. Fixed issue in VRML export dialog.  Removed useless messages in debug mode.
parent 8ec67570
......@@ -427,7 +427,6 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c )
v_data[0] = zone_c->m_FilledPolysList[ii].x * g_Parm_3D_Visu.m_BoardScale;
v_data[1] = zone_c->m_FilledPolysList[ii].y * g_Parm_3D_Visu.m_BoardScale * -1;
v_data[2] = zpos;
D( printf( "Tess gluTessVertex(%f,%f,%f)\n", v_data[0], v_data[1], v_data[2] ); )
gluTessVertex( tess, v_data, &zone_c->m_FilledPolysList[ii] );
if( zone_c->m_FilledPolysList[ii].end_contour == 1 )
......@@ -643,19 +642,6 @@ void MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas )
{
D_PAD* pad = m_Pads;
#if 0
if( !DisplayOpt.Show_Modules_Cmp )
{
if( m_Layer == LAYER_N_FRONT )
return;
}
if( !DisplayOpt.Show_Modules_Cu )
{
if( m_Layer == LAYER_N_BACK )
return;
}
#endif
/* Draw pads */
glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
glNormal3f( 0.0, 0.0, 1.0 ); // Normal is Z axis
......@@ -1302,18 +1288,12 @@ static GLfloat Get3DLayerSide( int act_layer )
void CALLBACK tessBeginCB( GLenum which )
{
glBegin( which );
// DEBUG //
D( printf( "Tess glBegin()\n" ); )
}
void CALLBACK tessEndCB()
{
glEnd();
// DEBUG //
D( printf( "Tess glEnd()\n" ); )
}
......@@ -1325,9 +1305,6 @@ void CALLBACK tessVertexCB( const GLvoid* data )
glVertex3f( (*ptr).x * g_Parm_3D_Visu.m_BoardScale,
(*ptr).y * g_Parm_3D_Visu.m_BoardScale * -1,
g_Parm_3D_Visu.m_ActZpos );
// DEBUG //
D( printf( "TessVertex glVertex3d(%d,%d,%f)\n", (*ptr).x, (*ptr).y, g_Parm_3D_Visu.m_ActZpos ); )
}
......
......@@ -24,7 +24,7 @@ DIALOG_EXPORT_3DFILE_BASE::DIALOG_EXPORT_3DFILE_BASE( wxWindow* parent, wxWindow
m_staticText1->Wrap( -1 );
bUpperSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_filePicker = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Save VRML Board File"), wxT("*.wrl"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE|wxFLP_SAVE );
m_filePicker = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Save VRML Board File"), wxT("*.wrl"), wxDefaultPosition, wxDefaultSize, wxFLP_SAVE|wxFLP_USE_TEXTCTRL );
bUpperSizer->Add( m_filePicker, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_staticText3 = new wxStaticText( this, wxID_ANY, _("Vrml 3D footprints shapes subdir:"), wxDefaultPosition, wxDefaultSize, 0 );
......
......@@ -154,7 +154,7 @@
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style">wxFLP_DEFAULT_STYLE|wxFLP_SAVE</property>
<property name="style">wxFLP_SAVE|wxFLP_USE_TEXTCTRL</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="value"></property>
......
......@@ -1085,7 +1085,7 @@ static void export_vrml_module( BOARD* aPcb, MODULE* aModule,
-vrmlm->m_MatPosition.y - aModule->m_Pos.y,
vrmlm->m_MatPosition.z + layer_z[aModule->GetLayer()] );
fprintf( aOutputFile,
" children [\n Inline {\n url [ \"%s\" ]\n } ]\n",
" children [\n Inline {\n url \"%s\"\n } ]\n",
CONV_TO_UTF8( fname ) );
fprintf( aOutputFile, " }\n" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment