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
Hide 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
.downloads-by-cmake
Build
build
common/netlist_keywords.*
common/netlist_lexer.h
common/pcb_plot_params_lexer.h
...
...
3d-viewer/modelparsers.h
View file @
26990213
...
...
@@ -179,6 +179,7 @@ private:
int
read_DEF
();
int
read_DEF_Coordinate
();
int
read_Shape
();
int
read_appearance
();
int
read_Appearance
();
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()
if
(
read_Transform
()
==
0
)
{
std
::
string
groupName
=
tagName
;
//m_defGroupMap.insert( std::make_pair( 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."
),
...
...
@@ -808,8 +808,10 @@ int VRML2_MODEL_PARSER::read_DEF()
}
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
,
'}'
);
return
0
;
}
}
...
...
@@ -878,12 +880,7 @@ int VRML2_MODEL_PARSER::read_Shape()
if
(
strcmp
(
text
,
"appearance"
)
==
0
)
{
//wxLogTrace( traceVrmlV2Parser, wxT( " \"appearance\" key word not supported." ) );
// skip
}
else
if
(
strcmp
(
text
,
"Appearance"
)
==
0
)
{
read_Appearance
();
read_appearance
();
}
else
if
(
strcmp
(
text
,
"geometry"
)
==
0
)
{
...
...
@@ -899,7 +896,7 @@ int VRML2_MODEL_PARSER::read_Shape()
}
else
{
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"%s NotImplemented"
),
text
);
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"
read_Shape
%s NotImplemented"
),
text
);
Read_NotImplemented
(
m_file
,
'}'
);
}
}
...
...
@@ -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
()
{
wxLogTrace
(
traceVrmlV2Parser
,
m_debugSpacer
+
wxT
(
"read_Appearance"
)
);
...
...
pcbnew/pcad2kicadpcb_plugin/pcb_module.cpp
View file @
26990213
...
...
@@ -431,7 +431,9 @@ void PCB_MODULE::Parse( XNODE* aNode, wxStatusBar* aStatusBar,
}
lNode
=
lNode
->
GetParent
();
lNode
=
FindNode
(
lNode
,
wxT
(
"layerContents"
)
);
if
(
lNode
)
lNode
=
FindNode
(
lNode
,
wxT
(
"layerContents"
)
);
while
(
lNode
)
{
...
...
pcbnew/specctra.h
View file @
26990213
...
...
@@ -3850,6 +3850,12 @@ public:
modulesAreFlipped
=
false
;
SetSpecctraMode
(
true
);
// Avoid not initialized members:
routeResolution
=
NULL
;
sessionBoard
=
NULL
;
m_top_via_layer
=
0
;
m_bot_via_layer
=
0
;
}
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