I am not seeing this myself with SU 2026.0 on Win 11.
Also, the folders named "Materials" in %ProgramData% and %AppData% should only contain subfolders and not skm files.
I am not seeing this myself with SU 2026.0 on Win 11.
Also, the folders named "Materials" in %ProgramData% and %AppData% should only contain subfolders and not skm files.
You are confounding the calculated circumference of a circle, with the perimeter of a many sided polygon. They are distinct.
A circle (or an closed ArcCurve) is not a Drawingelement subclass object. They are virtual helper objects that are actually a series of edges with some extra data attached that is used by the GUI.
The main reason is that SketchUp does not have true arcs and circle objects like a Nurbs CAD application does. In SketchUp your circles are really many sided polygons, so πr² will never return the true area of the enclosing face.
The AI says:
If a regular polygon has
nsides of lengths, the area is:
A = (n * s²) / (4 * tan(π / n))Alternatively, if you know the radius
rof the circle that circumscribes the polygon:
A = (1/2) * n * r² * sin(2π / n)
The Gemini AI says:
The term "gobbledygook" was coined in 1944 by Maury Maverick, a congressman from Texas.
During World War II, Maverick was the chairman of the Smaller War Plants Corporation. Frustrated with the excessively long, vague, and pompous language of bureaucratic memos, he issued a memorandum to his staff telling them to "stay off gobbledygook language." He defined it as "talk or writing which is long, pompous, vague, involved, usually with Latinized words."
Maverick explained that he came up with the word by thinking of the sound a turkey makes—a "gobbledygobbling" sound. He felt that the pretentious and convoluted language of officialdom sounded just as ridiculous as a turkey's gobble.
@i5963c I would say it is a bug, although it is likely been this way forever.
Check the SketchUp API tracker at GitHub to see if it has been reported yet.
The GUI 3D Text tool puts the resultant text geometry within a component context.
This way it can be moved around, rotated, etc.
The API use of Entities.add_3d_text should also be inserting into a component or group context. This context can also have subgroups. So the workaround is to apply a transitional transform to the "g" subgroup and align it.
Unfortunately, the vertical text alignment constants are for drawing text to the view for tools and overlays. So they will not apply to 3D text.
@i5963c said in SVG or other vector file import WITH colors:
It should be possible to adapt the extension to translate these color names into equivalent RGB values, but this is currently not implemented, as I don't use SU2025.
To be specific, SketchUp 2025+ no longer comes "out of the box" with the "Colors-Named" W3C materials collection.
But, users may be able to import them from the new 3D Warehouse (it now has resources.)
However, for a Ruby extension this is not a problem as the SketchUp Ruby API still supports the color names. See: https://ruby.sketchup.com/Sketchup/Color.html#names-class_method
So your code just assigns one of the color names to a Drawingelement and SketchUp converts it into a material (and adds it to the "In Model" collection.)
See: https://ruby.sketchup.com/Sketchup/Drawingelement.html#material=-instance_method
The only caveat is that SketchUp does not support some of the gray/grey spellings variants, and may be missing a couple of the more obscure color names.
There is a commercial plugin called Many Importer that claims to import SVG (and other formats.) But it does not support textures.
There is a link to it's website on the Extension Warehouse store page. Search the EW for "SVG" and you'll find it.
There might have been some test done to see if importing SVG into SketchUp was feasible. I seem to recall someone opening a topic thread about it. (Cannot remember which forum.) Anyway, this could be a new topic for SVG.
The main challenge is that SVG is a 2D drawing format not a 3D model format. I.e., SketchUp has edges with 0 width. SVG has strokes with width. How would you want the 2D vector drawing objects to be converted into SketchUp geometry?
Another challenge (not unsurmountable) is that SketchUp 2025 discontinued the "out of the box" distribution of W3C colors which SVG still uses as it is a web XML format.
Aside: It might be more appropriate to import SVG into LayOut.
Looks sort of like the houses of refuge we used to have along the coast here. Not many left.
The easiest fix for Ruby 2 and higher, is to use a refinement that only that file can "see" and use.
I inserted the following at the top of the file (after deleting the Set reassignment):
require 'set'
# Create a refinement for the Set class:
module DBUR
module RefinedSet
refine ::Set do
alias :insert :add
alias :contains? :include?
end
end
end
# Use the refinement:
using DBUR::RefinedSet
By request from @paddyclown, here is the "fixed" file.
It still needs a drastic overhaul, but this will get it working (fingers crossed):
@Didier-Bur ping (I do not know how to send this by PM in this new forum interface.)
Please reorganize your extension as a TRUE SketchUp extension.
See: https://ruby.sketchup.com/file.extension_requirements.html
Also, take note of the various numeric conversion methods that the SketchUp API has added to the Numeric class. (You do not need to write your own conversion formulae.) Here is an example that will default to model units, if the unit argument is blank:
def convert_to_inches(value, unit = nil)
units = Sketchup.active_model.options["UnitsOptions"]
if unit.nil? # use model units
case units["LengthFormat"]
when Length::Architectural, Length::Fractional
return value.inch
when Length::Engineering
return value.feet
else # Length::Decimal
unit = units["LengthUnit"]
end
end
case unit
when :in, Length::Inches then value.inch
when :m, Length::Meter then value.m
when :cm, Length::Centimeter then value.cm
when :mm, Length::Millimeter then value.mm
when :ft, Length::Feet then value.feet
when :yd, 5
# NOTE: constant Length::Yard (5) was added for SU2020,
# use 5 to avoid NameError exception in older versions.
value.yard # yards to inches
else
value.inch # if inches or unknown
end
end
Also, this is a good read for dealing with units in SketchUp:
There are extensions to the base classes in SketchUp’s Ruby API which often new SketchUp plugin developers overlook. If you aren’t aware of them you might find yourself reinventing many…
Procrastinators Revolt! (www.thomthom.net)
FYI ... Julia Eneroth has released her own edition of this feature that uses the SketchUp 2023 (and later) Overlay feature. So, for those that despise popup windows, you can see the instance path as a text overlay upon the model view instead.
Eneroth Component Breadcrumbs
https://extensions.sketchup.com/extension/880e8e68-2bd1-4451-949b-44d23ce0e2c7/eneroth-component-breadcrumbs
@Dan-Rathbun said in C SDK save in 2022 or 2023 formats:
What is different in the v22 and v23 file formats that need to be maintained?
I took a quick look at the release notes and I see only 2 new features that would be saved into the SKP file data:
v23 : Added Ruby Overlays and the model now has a flag collection with a Boolean state for overlays.
v24 : Added the Ambient Occlusion style properties (a state flag and numeric setting.)
Opening a SKP file on any older version back to 21 would just ignore any unknown data. This is known as SketchUp's versionless format since v21.
So WHY would you need to backsave to what v22 or v23 saved as ?
Ie, v22 did not add any new features that made the SKP any different from what v21 saved.
And, v23 only adds the listing for the overlays collection and would just ignore the new AO style attributes (added in v24) it does not know about. It might leave the attributes as is within the model data but do nothing with them, OR ignore them so as to not write them out when it saves a v23 SKP.
I think it is expected that you use SUModelSaveToFileWithVersion() with a SUModelVersion_SU2021 constant.
What is different in the v22 and v23 file formats that need to be maintained?
The only other thing I can think of is to compile 2 external utilities with old versions of the SketchUp SDK and have these utilities backsave the SKP files using the SUModelVersion_Current constant.
If it does not work using onLButtonDown then try renaming the callback to onLButtonUp. I recall back in the v8 days there were some quirks with one or the other callback method (I think on Mac platform mostly.)
@robertWan said in AI-Created Extension for SketchUp – Issues with CTRL Modifier Functionality:
Using
Sketchup::InputModifier::CTRLto check if the CTRL key is pressed.
Where did you get Sketchup::InputModifier::CTRL from? This is NOT a constant defined by SketchUp's Ruby API. Nor is there an InputModifier submodule. Be careful as the AIs have been known to just "invent" coding objects or functions to satisfy themselves in providing "solutions" (which are not guaranteed to work.)
FYI, the toplevel constants defined by SketchUp's Ruby API are listed at: Top Level Namespace
In the tool's onLButtonDown callback method, I think you should be using COPY_MODIFIER_KEY or COPY_MODIFIER_MASK instead of MK_CONTROL to test the flags passed in by the SketchUp engine. See the Sketchup::Tool abstract class overview.
Also, your extension submodule should be wrapped within a unique top-level namespace module. Ie:
module RobertWan # top-level namespace
module CustomSelectionTool # extension submodule
class SelectPlaneTool
# ... the tool code ...
end
def self.activate_select_plane_tool
Sketchup.active_model.select_tool(SelectPlaneTool.new)
end
if !file_loaded?(__FILE__)
UI.menu('Plugins').add_item('Select Plane Tool') {
CustomSelectionTool.activate_select_plane_tool
}
file_loaded(__FILE__)
end
end # extension submodule
end # top-level namespace
I did search this category but got no hits.
Discourse forums allow setting a size for images via the addition of a pipe character and size following the image filename within the square brackets, viz:

But specifying size this way is not honored by SCF's forum software.
Is there some other way?
@Gábor ?
@Jorgensen said in Parametric Modeling - development?:
I've been jealous of the users of Rhino for some years - that they have the node based tool - grasshopper.
I think node based modeling could be a big think for Sketchup, but it seems development stopped back in 2021, witch I find sad....
Sorry, Cannot help with contact.
But SketchUp Live Components and the Trimble Creator have not been abandoned AFAIK.
Discussion is still happening in its SketchUp Labs subcatgeory.
Purpose: Brings together extension dialogs scattered on multiple screens or possibly lost offscreen. May be a benefit to users with notebook docks or who move their machine between locations with differing display setups.
Will not work on native web-based dialogs such as 3D Warehouse, Extension Manager, etc. (These windows are hidden from the API.)
NOTE: SketchUp 2024 has may have had some fixes that can natively detect lost dialogs and move them back onto an active display. This extension is meant for older versions that do not have this fix or possibly as a complement for when the native fix might fail.
Localization: localized for SketchUp supported languages (and nl & uk.)
Adds a menu item to the Window menu.
Provides a toolbar with a button: 

Tested on MS Windows platform. Version 2024, 2023, 2022, 2021, & 2017.
I tried to write this so it might possibly even load under Ruby 1.8 for versions prior to SU2014.
But no guarantees for such old versions. (I do not have a machine ready that can run these old versions and I'm not really interested in trying to test for them.)