Wednesday, December 6, 2023
Home3D ModelingArc Section Difficulty - Ruby API

Arc Section Difficulty – Ruby API


Fast query. I generated an arc in SketchUp utilizing some Ruby code. I used to be bug testing, and once I modified the segments within the entity panel, I bought some very bizarre outcomes. The arc generates with 12 segments and generates appropriately; it’s only till I modify the segments that issues begin to break.

Earlier than (12 segments):

After the section change (24 segments):

I can verify the unusual habits when manually change Segments of Arc created by code.
I used to be capable of reproduce it in SU2017 Make, SU 2023, and SU 2022 as proven within the animation. (I drawn two edges upfront to assist figuring out what is going on)

The code I’m used is the instance from Ruby API doc:
Entities #add_arc occasion methodology

mannequin = Sketchup.active_model
entities = mannequin.active_entities
center_point = Geom::Point3d.new
# Create an arc perpendicular to the traditional or Z axis
regular = Geom::Vector3d.new(0, 0, 1)
xaxis = Geom::Vector3d.new(1, 0, 0)
edges = entities.add_arc(center_point, xaxis, regular, 10, 15.levels, 135.levels)

arc_seg_issue

Fascinating. I’m glad you have been capable of reproduce it. Any concepts as to what causes it?

I do not know. It’s a bug in SketchUp code, and must be investigated by SketchUp devs.

The error has been there for a very long time, however till now nobody actually seen it. I don’t know when or if it is going to be fastened…
Till that, I like to recommend that you simply specify the “correct variety of section” when creating the Arc by code :wink:

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments