• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Home and Gardening Guide

Home Improvement, Lawn & Gardening, Maintenance and Hiring Contractors

  • Home Improvement
    • Garage Conversion
    • Painting
    • Moving
    • Windows
    • Swimming Pool
    • Finances
  • Repairs & Maintenance
    • Interior
    • Exterior
    • Pest Control
    • Plumbing
    • Heating & Cooling
    • Fireplace
    • Scheduled Maintenance
  • Gardening & Landscaping
    • Garden Maintenance
    • Ideas
    • Lawn Care
    • Container Gardening
    • Shrubs
    • Trees
  • Decorating
    • Interior Design
    • Living Room
    • Bath
    • DIY

Sketchup 21.0.0 Now

model = face.model model.start_operation("Extrude", true) normal = face.normal offset_vector = normal.clone offset_vector.length = distance # Extrude: copy face, move it, then create side faces new_face = face.entities.add_face(face.vertices) new_face.material = face.material # Move the new face tr = Geom::Transformation.translation(offset_vector) new_face.transform!(tr) # Create side faces (simple version) face.loops.each do |loop| edges = loop.edges edges.each do |edge| v1 = edge.start.position v2 = edge.end.position v1_new = v1 + offset_vector v2_new = v2 + offset_vector face.entities.add_face(v1, v2, v2_new, v1_new) end end model.commit_operation end end unless file_loaded?( FILE ) cmd = UI::Command.new("Extrude by 10cm") do model = Sketchup.active_model sel = model.selection if sel.first.is_a?(Sketchup::Face) MyTools::ExtrudeByDistance.extrude(sel.first, 10.cm) else UI.messagebox("Select a single face") end end cmd.tooltip = "Extrude selected face" UI.menu("Plugins").add_item(cmd) file_loaded( FILE ) end end

Load in SketchUp: Extensions > Ruby Console > File > Open or paste code. This requires the SDK. A minimal main.cpp for a command that prints selection count:

SUEntitiesRef entities = SU_INVALID; SUModelGetEntities(model, &entities); sketchup 21.0.0

#include <SketchUpAPI/model/defs.h> #include <SketchUpAPI/initialize.h> #include <SketchUpAPI/application/application.h> #include <SketchUpAPI/model/model.h> #include <SketchUpAPI/model/entities.h> #include <iostream> void print_selection_count() SUModelRef model = SU_INVALID; SUApplicationGetActiveModel(&model); if (!model) return;

To develop a feature for (part of the 2021 release), you’ll work with the SketchUp C++ SDK or Ruby API , depending on what you need. model = face

int main() SUInitialize(); print_selection_count(); SUTerminate(); return 0;

size_t count = 0; SUEntitiesGetNumSelected(entities, &count); int main() SUInitialize()

std::cout << "Selected entities: " << count << std::endl;

# Extrude selected face by a distance (along normal) module MyTools class ExtrudeByDistance def self.extrude(face, distance) return unless face.is_a?(Sketchup::Face)

Primary Sidebar

Search Articles

Be Social & Join The Community

  • File
  • Madha Gaja Raja Tamil Movie Download Kuttymovies In
  • Apk Cort Link
  • Quality And All Size Free Dual Audio 300mb Movies
  • Malayalam Movies Ogomovies.ch
sketchup 21.0.0sketchup 21.0.0

Categories

  • Appliance
  • Bath
  • Container Gardening
  • Decorating
  • DIY
  • Exterior
  • Finances
  • Fireplace
  • Garage Conversion
  • Garden Maintenance
  • Gardening & Landscaping
  • Heating & Cooling
  • Home Improvement
  • Ideas
  • Interior
  • Interior Design
  • Lawn Care
  • Living Room
  • Moving
  • Painting
  • Pest Control
  • Plumbing
  • Repairs & Maintenance
  • Scheduled Maintenance
  • Shrubs
  • Swimming Pool
  • Trees
  • Windows

Copyright © 2025 · Home and Gardening Guide · All Rights Reserved

© 2026 Northern Leaf. All rights reserved.