Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
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.
Advertisement