Can I align Construction Points to an axis?

Sorry about the vague title.

I am currently trialling Scan Essentials which seems to suit my workflow even better than my current Point Cloud plugin.

One task I have to do over and over is create a profile from an uneven surface (usually an old vertical stone or brick wall). Currently I create a mesh of the walls surface then take a section through the mesh and use ‘Create Group From Slice’ to get the profile which can be pretty long winded as I have to first isolate the wall with a clipping box to get a decent mesh.

With Scan Essentials I can literally click on every brick course or stone using the Construction Point feature which is much much quicker. If I then view the points from 90 degrees I can see the profile. What would be better is if I can join the points together but first I need to get them on the same plane.

So I wonder if there is a plugin where I could select all the points below and move them a variable distance along the red axis so they all line up vertically when viewed from the front?

Construction Points.skp (256.5 KB)

With Fredo Scale (type 0)
scn-02

1 Like

That’s clever - thank you mihai :+1:

I will download FredoScale now - in fact I will get the whole paid bundle as I want to try out Curviloft as well.

Thanks again.

1 Like

That works perfectly :smiley:

Interesting that when you put a zero into the standard scale tool it says ‘Invalid Scale!’

That’s why I recommended FredoScale.

1 Like

Great comment :rofl:

I bet there isn’t a plugin that joins the points up as well?

I wrote a small snippet of code.
If you select construction points and copy-paste the code snippet into the Ruby Console and hit Enter… it will create a curve according the cpoints z-cordinates order.
You can Undo it.
(No warranties, use your own risk as usual :wink: )

module Dezmo
module JoinCPointsZ
  extend self
  
  def join_cps(cps, ents)
    sort_by_z = cps.sort{|a, b| a.position.z <=> b.position.z}.map(&:position)
    ents.add_curve sort_by_z
  end
  
  def run
    model = Sketchup.active_model
    entities = model.active_entities
    sel = model.selection
    cps = sel.grep(Sketchup::ConstructionPoint)
    return "No ConstructionPoints selected" if cps.size < 2
    model.start_operation("Join CPoints by Z cords", true)
    join_cps(cps, entities)
    model.commit_operation
  end

end
end
Dezmo::JoinCPointsZ.run

joincpZ

2 Likes

@dezmo

Now THAT is seriously clever.

I bet I will use that ‘Snippet’ of code over and over and over again.

In all seriousness - I am well impressed.

Where do I send the beers?

1 Like

It was 10 minutes easy task…
You are welcome!
When you come to Hamburg or I go to Bristol, we can :beers:

1 Like

Thank you.

scn-03

or Eneroth Point Connector extension

You can install it as an extension. However it is not signed and not perfectly fit all the formal rules…
You will get a context (right click) menu, if you have minimum 2 cpoint in a selection.
Dezmo_Join_Cps_by_Z.rbz (544 Bytes)

joincpZ_rbz

2 Likes

@mihai.s

Thanks for your help but for some reason I still cannot get this to work properly - even using Fredo Scale - Box Scaling.

If I can go over the problem again: The red line in the following image is an accurate vertical section through a brick wall obtained using a Plugin I no longer use (Undet). The construction points are from Scan Essentials and are also completely accurate but I need to record their position after I have deleted them (basically I need to replicate the red line). My idea is to get them onto the same vertical plane then join them up using a plugin then delete them.

You can see from the the following images that they start off positioned accurately:

Front View

Left View

But as soon as I put them onto the same vertical plane in the Front View using Fredo Scale they also move in the Left View?

Front View After Fredo Scale

Left View After Fedo Scale

Basically I need the construction points in the left view to still match the Red Line.

The attached Pro 2021 file shows the red line and construction points in their original position.

Any ideas gratefully received.

Forum Question.skp (4.0 MB)

Aligns the bounding box to the x-axis
rda-03

1 Like

@mihai.s

Fantastic! :+1:

You make everything look so easy, yet I’ve been struggling with this issue all day :smiley:

I think going forward, and contrary to the official Scan Essentials video, I will set the point cloud to the default axis before modelling rather than adjusting the axis to the model which can cause confusion.

Thanks again.

1 Like

@mihai.s

My other mistake was grouping the construction points before scaling. Now everything works perfectly. :+1:

Use “align” tool from Sketch Plus (Mind.sight.Studios)
image

@RR13

Thanks for the suggestion. I have installed the plugin to see if it improves my current workflow, but it only seems to align groups or components whereas I need to align what are effectively guide points.

Am I missing something?

Okey.

You can use “Convert Construction Point” future in the extension “Point Gadget”. The you can align your guide points with SketchPlus.

1 Like