I am having trouble converting sketch objects to walls, often there are walls missing or strange artefacts. I think the main issues occur when you convert a sketch that has a closed shape, plus extra bits, as in the attached file. When I attempt to convert this to a wall the wall object appears in the doc tree, but nothing appears on screen.
It seems sketches are first converted to a wire, then converted to walls. Perhaps conversion of a sketch to wire in this case does not make sense as the sketch is not be a closed shape?
A temporary workaround for me is to delve into the sketch, and get the underlying line elements like so:
Code: Select all
sketch = App.ActiveDocument.getObjectsByLabel('Sketch')
subobject = sketch.__getitem__(0)
sketchgeom = subobject.Geometry
for item in sketchgeom:
if isinstance (item, Part.Line):
shape = item.toShape ()
Part.show (shape)
However, this has it's own problems.