Delete hidden geometry
-
Hi all,
After importing a dxf file (coming from an exported floorplan drawing) in sketchup2015, my model had a lot of X's. It looks like every endpoint of a surface/shape was joined by a line during the import. So I had to remove a lot, and a mean really a lot of those lines. Removing them was sometimes dangerous, deleting the wrong line could delete a part of a surface. So I used the smooth edges tool, clicking on the line and using the smooth edges, removed the line and the surface divided by the 'cross' became again a plain surface. But I didn't know I was not actually deleting the line, just hiding it. Using the show hidden geometry option makes them reappear, and I guess those lines have an impact on processing although they are useless. If using the "show hidden geometry" can show these lines again, I guess it must be possible to create a ruby script to only delete those lines? Anyone knows how?
Regards,
Boein -
Sounds like the faces are triangulated.
Get thomthom's CleanUp toolset from the PluginStore.
That has options to delete edges making coplanar in faces [merge-faces?].
Thus undoing any unnecessary triangulation.Alternatively switch on Hidden Geometry, Edit>Select-all, then copy+paste this snippet into the Ruby Console + <enter>
model=Sketchup.active_model edges=model.selection.grep(Sketchup;;Edge).find_all{|e| e.faces.length == 2 } togos=[] counter=0 model.start_operation("Delete Coplanar Edges") edges.each{|e| next unless e.valid? if e.faces[0].normal.dot(e.faces[1].normal)>0.9999999999999 && e.faces[0].material==e.faces[1].material && e.faces[0].back_material==e.faces[1].back_material togos << e counter+=1 Sketchup;;set_status_text(("Coplanar Edges Erased = #{counter}"),SB_PROMPT) end#if } model.active_entities.erase_entities(togos) model.commit_operationIt is one step undo-able...
-
Ok found it, I installed the thomthom's CleanUp toolset and using the "merge faces" did the trick (5119 faces merged). Saved me a lot of work thanks for the suggestion!
Regards,
Boein
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better đź’—
Register LoginAdvertisement