Duplicate Geometry Created by Script

Duplicate Geometry Created by Script

barryf1
Explorer Explorer
262 Views
2 Replies
Message 1 of 3

Duplicate Geometry Created by Script

barryf1
Explorer
Explorer

I created a script in Python to create a sketch on the largest face of a body.  The sketch is intersected with the body and the resulting sketch has duplicate geometry.  Can anybody tell me why?  To duplicate, create a sketch with a square and extrude to a cube.  Run the attached script, selecting the cube as the body.  The sketch will be created in a new component named DXF.  The script will be saved to disk as a DXF file, but it is the sketch that has duplicate geometry. 

I think the fact that there is projected geometry is causing the problem.  I see no way to prevent the duplicate geometry from being exported to the DXF file.  Any help would be appreciated.

--thanks, Barry

0 Likes
Accepted solutions (1)
263 Views
2 Replies
Replies (2)
Message 2 of 3

kandennti
Mentor
Mentor
Accepted solution

Hi @barryf1 -San.

 

Try using the addWithoutEdges method instead of the add method when creating a sketch.

kandennti_0-1745287028487.png

 

0 Likes
Message 3 of 3

barryf1
Explorer
Explorer

That worked.  Thank you!