Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
26990213
Commit
26990213
authored
Mar 28, 2015
by
unknown
Committed by
jean-pierre charras
Mar 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3ED viewer: added more support for the VRML2 parser
parent
ff154dba
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
10 deletions
+107
-10
.bzrignore
.bzrignore
+1
-0
modelparsers.h
3d-viewer/modelparsers.h
+1
-0
vrml_v2_modelparser.cpp
3d-viewer/vrml_v2_modelparser.cpp
+96
-9
pcb_module.cpp
pcbnew/pcad2kicadpcb_plugin/pcb_module.cpp
+3
-1
specctra.h
pcbnew/specctra.h
+6
-0
No files found.
.bzrignore
View file @
26990213
boost_root
boost_root
.downloads-by-cmake
.downloads-by-cmake
Build
Build
build
common/netlist_keywords.*
common/netlist_keywords.*
common/netlist_lexer.h
common/netlist_lexer.h
common/pcb_plot_params_lexer.h
common/pcb_plot_params_lexer.h
...
...
3d-viewer/modelparsers.h
View file @
26990213
...
@@ -179,6 +179,7 @@ private:
...
@@ -179,6 +179,7 @@ private:
int
read_DEF
();
int
read_DEF
();
int
read_DEF_Coordinate
();
int
read_DEF_Coordinate
();
int
read_Shape
();
int
read_Shape
();
int
read_appearance
();
int
read_Appearance
();
int
read_Appearance
();
int
read_material
();
int
read_material
();
int
read_Material
();
int
read_Material
();
...
...
3d-viewer/vrml_v2_modelparser.cpp
View file @
26990213
...
@@ -785,7 +785,7 @@ int VRML2_MODEL_PARSER::read_DEF()
...
@@ -785,7 +785,7 @@ int VRML2_MODEL_PARSER::read_DEF()
if
(
read_Transform
()
==
0
)
if
(
read_Transform
()
==
0
)
{
{
std
::
string
groupName
=
tagName
;
std
::
string
groupName
=
tagName
;
//m_defGroupMap.insert( std::make_pair( groupName, new_mesh_model ) );
m_defGroupMap
[
groupName
]
=
new_mesh_model
;
m_defGroupMap
[
groupName
]
=
new_mesh_model
;
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"Group %s: inserted model with %lu points, %lu coordIndex, %lu childs."
),
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"Group %s: inserted model with %lu points, %lu coordIndex, %lu childs."
),
...
@@ -808,8 +808,10 @@ int VRML2_MODEL_PARSER::read_DEF()
...
@@ -808,8 +808,10 @@ int VRML2_MODEL_PARSER::read_DEF()
}
}
else
else
{
{
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"DEF %s %s NotImplemented, skipping."
),
tagName
,
text
);
debug_exit
();
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"read_DEF %s %s NotImplemented, skipping."
),
tagName
,
text
);
Read_NotImplemented
(
m_file
,
'}'
);
Read_NotImplemented
(
m_file
,
'}'
);
return
0
;
}
}
}
}
...
@@ -878,12 +880,7 @@ int VRML2_MODEL_PARSER::read_Shape()
...
@@ -878,12 +880,7 @@ int VRML2_MODEL_PARSER::read_Shape()
if
(
strcmp
(
text
,
"appearance"
)
==
0
)
if
(
strcmp
(
text
,
"appearance"
)
==
0
)
{
{
//wxLogTrace( traceVrmlV2Parser, wxT( " \"appearance\" key word not supported." ) );
read_appearance
();
// skip
}
else
if
(
strcmp
(
text
,
"Appearance"
)
==
0
)
{
read_Appearance
();
}
}
else
if
(
strcmp
(
text
,
"geometry"
)
==
0
)
else
if
(
strcmp
(
text
,
"geometry"
)
==
0
)
{
{
...
@@ -899,7 +896,7 @@ int VRML2_MODEL_PARSER::read_Shape()
...
@@ -899,7 +896,7 @@ int VRML2_MODEL_PARSER::read_Shape()
}
}
else
else
{
{
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"%s NotImplemented"
),
text
);
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"
read_Shape
%s NotImplemented"
),
text
);
Read_NotImplemented
(
m_file
,
'}'
);
Read_NotImplemented
(
m_file
,
'}'
);
}
}
}
}
...
@@ -965,6 +962,96 @@ int VRML2_MODEL_PARSER::read_geometry()
...
@@ -965,6 +962,96 @@ int VRML2_MODEL_PARSER::read_geometry()
}
}
int
VRML2_MODEL_PARSER
::
read_appearance
()
{
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"read_appearance"
)
);
debug_enter
();
S3D_MATERIAL
*
material
=
NULL
;
char
text
[
BUFLINE_SIZE
];
while
(
GetNextTag
(
m_file
,
text
,
sizeof
(
text
)
)
)
{
if
(
*
text
==
']'
)
{
continue
;
}
if
(
*
text
==
'}'
)
{
debug_exit
();
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"read_appearance exit"
)
);
return
0
;
}
if
(
strcmp
(
text
,
"Appearance"
)
==
0
)
{
int
ret
=
read_Appearance
();
debug_exit
();
return
ret
;
}
else
if
(
strcmp
(
text
,
"DEF"
)
==
0
)
{
if
(
GetNextTag
(
m_file
,
text
,
sizeof
(
text
)
)
)
{
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"read_appearance adding new material %s"
),
text
);
wxString
mat_name
;
mat_name
=
FROM_UTF8
(
text
);
material
=
new
S3D_MATERIAL
(
m_Master
,
mat_name
);
m_Master
->
Insert
(
material
);
m_model
->
m_Materials
=
material
;
if
(
GetNextTag
(
m_file
,
text
,
sizeof
(
text
)
)
)
{
if
(
strcmp
(
text
,
"Appearance"
)
==
0
)
{
int
ret
=
read_Appearance
();
debug_exit
();
return
ret
;
}
}
}
// Exit loop with error
break
;
}
else
if
(
strcmp
(
text
,
"USE"
)
==
0
)
{
if
(
GetNextTag
(
m_file
,
text
,
sizeof
(
text
)
)
)
{
wxString
mat_name
;
mat_name
=
FROM_UTF8
(
text
);
for
(
material
=
m_Master
->
m_Materials
;
material
;
material
=
material
->
Next
()
)
{
if
(
material
->
m_Name
==
mat_name
)
{
m_model
->
m_Materials
=
material
;
debug_exit
();
return
0
;
}
}
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"read_appearance error: material not found"
)
);
}
// Exit loop with error
break
;
}
else
{
// Exit loop with error
break
;
}
}
debug_exit
();
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"read_appearance failed"
)
);
return
-
1
;
}
int
VRML2_MODEL_PARSER
::
read_Appearance
()
int
VRML2_MODEL_PARSER
::
read_Appearance
()
{
{
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"read_Appearance"
)
);
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"read_Appearance"
)
);
...
...
pcbnew/pcad2kicadpcb_plugin/pcb_module.cpp
View file @
26990213
...
@@ -431,6 +431,8 @@ void PCB_MODULE::Parse( XNODE* aNode, wxStatusBar* aStatusBar,
...
@@ -431,6 +431,8 @@ void PCB_MODULE::Parse( XNODE* aNode, wxStatusBar* aStatusBar,
}
}
lNode
=
lNode
->
GetParent
();
lNode
=
lNode
->
GetParent
();
if
(
lNode
)
lNode
=
FindNode
(
lNode
,
wxT
(
"layerContents"
)
);
lNode
=
FindNode
(
lNode
,
wxT
(
"layerContents"
)
);
while
(
lNode
)
while
(
lNode
)
...
...
pcbnew/specctra.h
View file @
26990213
...
@@ -3850,6 +3850,12 @@ public:
...
@@ -3850,6 +3850,12 @@ public:
modulesAreFlipped
=
false
;
modulesAreFlipped
=
false
;
SetSpecctraMode
(
true
);
SetSpecctraMode
(
true
);
// Avoid not initialized members:
routeResolution
=
NULL
;
sessionBoard
=
NULL
;
m_top_via_layer
=
0
;
m_bot_via_layer
=
0
;
}
}
virtual
~
SPECCTRA_DB
()
virtual
~
SPECCTRA_DB
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment