Invert inverted axes in symetrical components
-
Hello,
If the making process of a component is a duplication by symetrical operation, then "make unique", the axis are inverted.
(Sorry for this bad english!
)This is a problem for me for a plugin containing arcs exportation.
Do you know how to test the orientation of the axis and how to change it temporarely in my calculations if it's not direct (red, green, blue)?
I think it must be here in my code :
# Recursively export faces and exploding groups and components def self.write_content(file, selection, tform, z) # if z==1, it's a 3D export file, if z==0, it's a 2D export file (all the Z values are equal to "0.0" and the normal.z is equal to "1.0" selection.each do |entity| if entity.is_a?(Sketchup;;Face) transform_vector_of_group(entity.normal, tform) if z == 1 || (z == 0 && transform_vector_of_group(entity.normal, tform).parallel?(Z_AXIS) && transform_point_of_group(entity.vertices[0].position, tform).z.abs < 0.001 ) # Sketchup tolerance ; 0.0001 inch $number_of_exported_faces +=1 write_face(file, entity, tform, z) result = Sketchup.set_status_text $number_of_exported_faces.to_s, SB_VCB_VALUE end elsif entity.is_a?(Sketchup;;Group) || entity.is_a?(Sketchup;;ComponentInstance) if entity.is_a?(Sketchup;;Group) definition = entity.entities.parent else definition = entity.definition end write_content(file, definition.entities, tform * entity.transformation, z) end end endThank you very much.
Renaud.
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