convert drawing lines to orthogonal

convert drawing lines to orthogonal

Postby nicolasweh » Sun Aug 02, 2020 1:21 pm

Hi, I don't know if it's the correct place to ask this, sorry if not.
The thing is that yesterday I was searching for more than 3 hours for a possible plugin to be able to convert a drawing that is not orthogonal to right angles.
And I'll need this, because I found a way to make the environment buildings when there's no an OpenStreetMap resource abailable, from capturing the footprint of the houses directly from Google Maps as a JPG and converting that image into a DWG (https://convertio.co/es/jpg-dxf/). So, the problem is that without the orthogonal edges, I can't make a succesful used of the plugin "Automatically create hip roof from a face" from 1001BitTools.
So, if someone know a way to transform the drawing from whatever angle to 90º right angles I'll be much more than grateful.
Regards and have a nice sunday.
Nicolás
0

nicolasweh 
 

Re: convert drawing lines to orthogonal

Postby Dave R » Sun Aug 02, 2020 2:46 pm

Interesting. I've never seen anything like that. I wonder if it is possible to do.

FWIW, Google's terms of use for Google Maps and Google Earth prohibit the kind of thing you are doing with their imagery.
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: convert drawing lines to orthogonal

Postby pilou » Sun Aug 02, 2020 8:40 pm

Have you Try Joint Push Push Interactive: Normal / Taper and some various parameters... by Fredo6 ?

Click on the 3 Green Arrows

roof1.jpg


But sorry i just understand your problem!
Convert an angle to 90° :oops:

Maybe Thomthom tools has a Snipset for that...
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: convert drawing lines to orthogonal

Postby Didier Bur » Mon Aug 10, 2020 10:06 am

Interesting idea... I'll investigate the feasibility.
There should be some parameters to drive the 'reshape' process (from where to start, what dimensions to maintain, etc).
2
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
User avatar
Didier Bur 
 

Re: convert drawing lines to orthogonal

Postby nicolasweh » Thu Aug 13, 2020 9:04 am

Hi Didier, that would be awesome, just the attempt already deserves my thanks, I appreciate :thumb:
0

nicolasweh 
 

Re: convert drawing lines to orthogonal

Postby Didier Bur » Mon Aug 24, 2020 11:22 am

Hi,

This idea is more complex than I though :D
I have writen some dirty code just to see if it is doable. It needs now heavy testing in various situations, with complex face shapes.

A threshold parameter (angle) tells the script in which range each angle at each corner of the face has to be 'orthogonalized' (or not).
For now, a face like on the left side of the image is reshaped to the one on the right ;)

orthoface.jpg


Click on the image to see it in action on a more complex face:
orthogonalizeFace_20d.gif
4
Last edited by Didier Bur on Mon Aug 24, 2020 1:58 pm, edited 2 times in total.
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
User avatar
Didier Bur 
 

Re: convert drawing lines to orthogonal

Postby pilou » Mon Aug 24, 2020 11:30 am

Bon courage! :fro:
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: convert drawing lines to orthogonal

Postby nicolasweh » Tue Aug 25, 2020 12:21 pm

Hi Didier Bur, this looks excellent!!! :thumb:
Thanks for your hard work and invested time, I hope one day see it as a plugin :D
0

nicolasweh 
 

Re: convert drawing lines to orthogonal

Postby rv1974 » Wed Aug 26, 2020 6:23 pm

Didier it could be important tool!
Please check if you could add to round the lengths values and unifying almost overlapping lines
0

rv1974 
 

Re: convert drawing lines to orthogonal

Postby Didier Bur » Sun Oct 11, 2020 10:25 am

Hi,

The future 'orthogonalize' plugin is on its way...
But I've encountered some problems to solve before reshaping a face: sometimes there are double points (especially when the face comes from an external content, such as an OSM map for instance), sometimes edges are reversed in the face record, sometimes there are colinear edges or overlapping edges, etc...

I've almost solved all of these and the script is under heavy testing ;)
Below is a preview of the interface: you'll choose between 3 options, preserve the global shape of the face, preserve the segments lengths, or click on the first segment of a single face to give the script a start.

Script will process a single face or a bunch of selected faces.

GIF.gif
1
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
User avatar
Didier Bur 
 

Re: convert drawing lines to orthogonal

Postby rv1974 » Sun Oct 11, 2020 11:53 am

Please grant ability to save current settings as default globally.
P.S. Would it be possible to implement coordinates rounding? (for instance: 1,5,10 cm?)
0

rv1974 
 

Re: convert drawing lines to orthogonal

Postby Didier Bur » Sun Oct 11, 2020 3:47 pm

@rv1974

Settings are remembered all along the session, but I can also save them saved in the skp file (as model attributes).

Concerning the rounding of coordinates, it's also an interesting idea that I will look into.
Regards
3
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
User avatar
Didier Bur 
 

Re: convert drawing lines to orthogonal

Postby rv1974 » Mon Oct 12, 2020 8:37 am

Yet another idea: arch\circle conversion (if some portions +\- resembles them)
I use curic's(?) one and it's super useful functionality, but conversion won't happen if sefments aren't equal. So implementing arc conversion with threshold would be awesome.
0

rv1974 
 

[Plugin] beta version of 'orthogonalize'

Postby Didier Bur » Sun Nov 08, 2020 5:20 pm

Hi everybody,

Below is the beta version of my Orthogonalize plugin.
I would have some feedback from the users, so I can enhance the plugin.

Install it the usual way, with the extensions manager.

First usage: select one or more faces in the model, righ-click on the selection and select 'Orthogonalize N faces'.
Please click on the Help button and read the PDF file to get information about how the script works.

Please report any bug you encounter, and feel free to report what's good and what is not convenient to you.


Best regards

DBUR_Orthogonalize.rbz
4
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
User avatar
Didier Bur 
 

Re: convert drawing lines to orthogonal

Postby pilou » Mon Nov 09, 2020 10:52 am

Hello

I have nothing! (with some parameters) Same no result in 2017, 2015 Make!
1 st segment is working
Help is well working! :fro:

My figure is too brutal ? (file linked)

ortho01.jpg
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: convert drawing lines to orthogonal

Postby rv1974 » Mon Nov 09, 2020 1:25 pm

Wow I very pleased :o with results, thank you so much Didier!
My observations:
*)Currently plugin keeps to pop up in default location. Could it memorize the last re-location?
*)In attached image, the plugin builds approx 90 degree angles (at least SU indicates ~90.
*) In case of multiple faces, could we have an option to select the general rectification edge (AB)? If the face is rotated less than user's angle threshhold, then it'd be rectified by this general AB direction
*) Currently, it leaves co-linear points (no problem- I can delete them Fredos 'remove lonely vertices)
*) Is rounding planned?
0

rv1974 
 

Re: convert drawing lines to orthogonal

Postby rv1974 » Mon Nov 09, 2020 1:37 pm

However "Preserve segment length" option delivers bizarre result. Faces get deleted, only 2 edges survive.
0

rv1974 
 

Re: convert drawing lines to orthogonal

Postby juju » Mon Nov 09, 2020 2:34 pm

pilou wrote:Hello

I have nothing! (with some parameters) Same no result in 2017, 2015 Make!
1 st segment is working
Help is well working! :fro:

My figure is too brutal ? (file linked)

ortho01.jpg

Hmmm, maybe try it in SU V6?
0
Save the Earth, it's the only planet with chocolate.
User avatar
juju 
Premium Member
Premium Member
 

Re: convert drawing lines to orthogonal

Postby Didier Bur » Wed Nov 11, 2020 9:58 am

@Pilou:

Your file is SU v6. This means the plugin isn't compatible with SU versions that use older releases of Ruby and API.
Below is your file 'orthogonalized' with SU2020, with the same parameters as yours.
pilou.jpg


BTW, your white dashed lines indicate a better way to preserve the global shape of the face than the one I've implemented, this will become an option in the next release (I hope).


Cordialement,
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
User avatar
Didier Bur 
 

Re: convert drawing lines to orthogonal

Postby Didier Bur » Wed Nov 11, 2020 10:14 am

@rv1974:

Thanks for reporting this bug, sort of.
I see on your image that you are in a group or component. The plugin behaves weirdly in such a context. I'll fix that.
Regards
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
User avatar
Didier Bur 
 

Re: convert drawing lines to orthogonal

Postby pilou » Wed Nov 11, 2020 4:05 pm

I have posted my file in "save as V6" but use these last Make (2017,2016,2015)all tested! ;)
See from your Doc that 2015 is out of use your plugin but must be fine for 2016 and uper...
I will try with your uper left selected as first segment...

Always not result when OK is pressed! :cry:
If that can help : verbose don't make nothing in the Ruby console opened! (tested in 2017)

Ruby Console works in 2016 but always no result :File linked (with no first segment selected)
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: bewbewx and 13 guests

Visit our sponsors: