Skip to content

Commit

Permalink
Merge branch 'release/0.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
HuguesDelorme committed Sep 9, 2022
2 parents 2f9229e + 40a3054 commit e55c5ee
Show file tree
Hide file tree
Showing 188 changed files with 10,829 additions and 3,900 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: CI

on: [push]

jobs:
ci:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
#os: [ubuntu-latest, macos-latest]

runs-on: ${{matrix.os}}

steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: 'source'
fetch-depth: 0
lfs: 'false'

- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-QtCache

- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
cached: ${{ steps.cache-qt.outputs.cache-hit }}

- name: Install OpenCascade[Ubuntu]
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get -y install libocct-data-exchange-dev libocct-draw-dev
GH_CASCADE_INC_DIR=`dpkg -L libocct-foundation-dev | grep -i "Standard_Version.hxx" | sed "s/\/Standard_Version.hxx//i"`
GH_CASCADE_LIB_DIR=`dpkg -L libocct-foundation-dev | grep -i "libTKernel.so" | sed "s/\/libTKernel.so//i"`
echo "GH_CASCADE_INC_DIR=$GH_CASCADE_INC_DIR" >> $GITHUB_ENV
echo "GH_CASCADE_LIB_DIR=$GH_CASCADE_LIB_DIR" >> $GITHUB_ENV
- name: Install OpenCascade[macOS]
if: startsWith(matrix.os, 'macos')
run: |
brew install opencascade
GH_CASCADE_BASE_DIR=`brew --cellar opencascade`
GH_CASCADE_VERSION=`brew info opencascade | grep -E --only-matching --max-count=1 "[0-9]\.[0-9]\.[0-9]"`
echo "GH_CASCADE_INC_DIR=$GH_CASCADE_BASE_DIR/$GH_CASCADE_VERSION/include/opencascade" >> $GITHUB_ENV
echo "GH_CASCADE_LIB_DIR=$GH_CASCADE_BASE_DIR/$GH_CASCADE_VERSION/lib" >> $GITHUB_ENV
- name: Get count of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores

- name: Create Build folder
run: mkdir ${{github.workspace}}/build

- name: QMake
working-directory: ${{github.workspace}}/build
run: |
echo CASCADE_INC_DIR=${{env.GH_CASCADE_INC_DIR}}
echo CASCADE_LIB_DIR=${{env.GH_CASCADE_LIB_DIR}}
qmake ../source CASCADE_INC_DIR=${{env.GH_CASCADE_INC_DIR}} CASCADE_LIB_DIR=${{env.GH_CASCADE_LIB_DIR}} CONFIG+=withtests
- name: Build
working-directory: ${{github.workspace}}/build
run: |
make -j${{steps.cpu-cores.outputs.count}}
- name: Execute Unit Tests[Ubuntu]
if: startsWith(matrix.os, 'ubuntu')
working-directory: ${{github.workspace}}/build
env:
DISPLAY: :0
run: |
Xvfb $DISPLAY -screen 0 1280x1024x24 &
sleep 5s
./mayo --runtests
- name: Execute Unit Tests[macOS]
if: startsWith(matrix.os, 'macos')
working-directory: ${{github.workspace}}/build
run: |
./mayo.app/Contents/MacOS/mayo --runtests
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ build-*
*.user.*
installer/setupvars.iss
installer/Output
custom.pri
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

141 changes: 85 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,97 @@
<p align="center">
<img src="images/appicon_256.png" width="200px" align="center" />
</p>

<div align="center">

[![CI](https://github.com/fougue/mayo/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/fougue/mayo/actions/workflows/ci.yml)
[![Build status](https://ci.appveyor.com/api/projects/status/6d1w0d6gw28npxpf?svg=true)](https://ci.appveyor.com/project/HuguesDelorme/mayo)
[![Build Status](https://img.shields.io/travis/fougue/mayo/develop.svg?logo=travis)](https://app.travis-ci.com/fougue/mayo)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d51f8ca6fea34886b8308ff0246172ce)](https://www.codacy.com/gh/fougue/mayo/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=fougue/mayo&amp;utm_campaign=Badge_Grade)
[![Downloads](https://img.shields.io/github/downloads/fougue/mayo/total.svg)](https://github.com/fougue/mayo/releases)
[![License](https://img.shields.io/badge/license-BSD%202--clause-blue.svg)](https://github.com/fougue/mayo/blob/develop/LICENSE.txt)
[![Version](https://img.shields.io/badge/version-v0.6.0-blue.svg?style=flat)](https://github.com/fougue/mayo/releases)

</div>

# What is Mayo
Mayo is an opensource 3D CAD viewer and converter

# Overview
* View and convert 3D files in different formats
* Explore assembly trees(product structure) and view properties
* Cross platform: runs on Windows, Linux and macOS
* Underlying toolkits: OpenCascade and Qt

# Current features
* 3D exploding of the model tree, allowing better exploration of complex designs
* 3D clip planes with configurable capping
* 3D view cube providing intuitive camera manipulation
* Save image(snapshot) of the current 3D view
* Quick access to the CAD files recently open thanks to thumbnails in the Home page
* Toggle visibility of any item from the Model tree(use checkbox)
* Customizable precision of the meshes computed from BRep shapes, affecting visualization quality and conversion into mesh formats
* Convert files to multiple CAD formats from command-line interface(CLI)

3D viewer operations :
* Rotate : mouse left + move
* Pan : mouse right + move
* Zoom : mouse wheel(scroll)
* Window zoom : mouse wheel + move
* Instant zoom : space bar
* Select Object: mouse left click
* Select Objects: SHIFT + mouse left clicks

# Supported formats
Formats | Import | Export | Notes
--------------------------|-----------|----------|------------------------------
STEP | &#10004; | &#10004; | AP203, 214, 242(some parts)
IGES | &#10004; | &#10004; | v5.3
OpenCascade BREP | &#10004; | &#10004; |
DXF | &#10004; | &#10060; |
OBJ | &#10004; | &#10004; | Import requires OpenCascade &#8805; v7.4.0<br>Export requires OpenCascade &#8805; v7.6.0
glTF | &#10004; | &#10004; | Import requires OpenCascade &#8805; v7.4.0<br>Export requires OpenCascade &#8805; v7.5.0<br>Supports 1.0, 2.0 and GLB
VRML | &#10060; | &#10004; | v2.0 UTF8
STL | &#10004; | &#10004; | ASCII/binary
AMF | &#10060; | &#10004; | v1.2 Text/ZIP<br>Requires [gmio](https://github.com/fougue/gmio) &#8805; v0.4.0

Mayo provides precise control over [import](https://github.com/fougue/mayo/wiki/Import-parameters-by-CAD-format) and [export](https://github.com/fougue/mayo/wiki/Export-parameters-by-CAD-format) with many parameters per format.

# Gallery

<img src="doc/screencast_1.gif"/>
<div align="center">
<img src="images/appicon_256.png" alt="Logo" width="128px" align="center" />
<p></p>
<p align="center"><strong>Mayo</strong> the opensource 3D CAD viewer and converter</9>
<p></p>
<img src="doc/screencast_1.gif"/>
</div>

<img src="doc/screencast_cli.gif"/>
## :eyeglasses: Overview
- **Convert 3D files** <br/>
Mayo can read/write 3D files from/to STEP, IGES, STL and many other [CAD formats](https://github.com/fougue/mayo/wiki/Supported-formats)

- **Visualize 3D files** <br/>
Mayo 3D viewer supports clip planes, exploding of assemblies, measurement of shapes, show/hide parts, ...

- **Cross platform** <br/>
Mayo runs on Windows, Linux and macOS

- **Solid foundations** <br/>
Mayo is developed in modern C++ with [Qt](https://www.qt.io) and [OpenCascade](https://dev.opencascade.org)

## :zap: Features
- **3D clip planes** with configurable capping

- **3D exploding of the model tree** allowing better exploration of complex designs

- **3D measure tools** for circles, angles, lengths, areas, ...

- **3D view cube** providing intuitive camera manipulation

- **Quick access to CAD files** recently open thanks to thumbnails in the [Home page](https://github.com/fougue/mayo/blob/develop/doc/screenshot_5.png)

- **Toggle item visibility** within the Model tree(use checkbox)

- **Customizable mesh precision** for BREP shapes, affecting visualization quality and conversion into mesh formats

- **Convert files** to multiple CAD formats from [command-line interface](https://github.com/fougue/mayo/blob/develop/doc/screencast_cli.gif):computer:

## :floppy_disk: Supported formats
Format | Import | Export | Notes
----------|--------------------|--------------------|------------------
STEP | :white_check_mark: | :white_check_mark: | AP203, 214, 242
IGES | :white_check_mark: | :white_check_mark: | v5.3
BREP | :white_check_mark: | :white_check_mark: | OpenCascade format
DXF | :white_check_mark: | :x: |
OBJ | :white_check_mark: | :white_check_mark: |
glTF | :white_check_mark: | :white_check_mark: | 1.0, 2.0 and GLB
VRML | :x: | :white_check_mark: | v2.0 UTF8
STL | :white_check_mark: | :white_check_mark: | ASCII/binary
AMF | :x: | :white_check_mark: | v1.2 Text/ZIP
PLY | :white_check_mark: | :white_check_mark: | ASCII/binary
Image | :x: | :white_check_mark: | PNG, JPEG, ...

See also this dedicated [wikipage](https://github.com/fougue/mayo/wiki/Supported-formats) for more details

## :mag: 3D viewer operations

Operation | Mouse/Keyboard controls
---------------|--------------------------
Rotate | mouseLeft + move
Pan | mouseRight + move
Zoom | mouseLeft + mouseRight + move
Zoom +/- | mouseWheel(scroll)
Window zoom | CTRL + mouseLeft + move
Instant zoom | spaceBar
Select Object | mouseLeft click
Select Objects | SHIFT + mouseLeft clicks

Mayo supports also multiple 3D viewer navigation styles to mimic common CAD applications(CATIA, SOLIDWORKS, ...)

## :hammer: How to build Mayo
[Instructions for Windows MSVC](https://github.com/fougue/mayo/wiki/Build-instructions-for-Windows-MSVC)
[Instructions for Debian](https://github.com/fougue/mayo/wiki/Build-instructions-for-Debian)
[Instructions for macOS](https://github.com/fougue/mayo/wiki/Build-instructions-for-macOS)

## :clapper: Gallery

<img src="doc/screencast_cli.gif"/>

<img src="doc/screenshot_2.png"/>

<img src="doc/screenshot_3.png"/>

<img src="doc/screenshot_4.png"/>

<img src="doc/screenshot_5.png"/>

# How to build Mayo
[Instructions for Windows MSVC](https://github.com/fougue/mayo/wiki/Build-instructions-for-Windows-MSVC)
[Instructions for Debian](https://github.com/fougue/mayo/wiki/Build-instructions-for-Debian)
23 changes: 4 additions & 19 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.5_build{build}
version: 0.6_build{build}

image: Visual Studio 2017
platform: x64
Expand Down Expand Up @@ -36,36 +36,21 @@ before_build:
- call "OpenCASCADE-%APPVEYOR_OCC_VERSION%-vc14-64\opencascade-%APPVEYOR_OCC_VERSION%\env.bat"
- set PATH=C:\Qt\5.13\msvc2017_64\bin;%PATH%
- set PATH=C:\Qt\Tools\QtCreator\bin;%PATH%
- set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
- qmake --version
- echo NUMBER_OF_PROCESSORS=%NUMBER_OF_PROCESSORS%

build_script:
- mkdir build-%APPVEYOR_OCC_VERSION%
- cd build-%APPVEYOR_OCC_VERSION%
- qmake ..\mayo.pro
- qmake ..\mayo.pro CONFIG+=withtests
- jom -j%NUMBER_OF_PROCESSORS%
- cd ..

test_script:
- mkdir build-tests-%APPVEYOR_OCC_VERSION%
- cd build-tests-%APPVEYOR_OCC_VERSION%
- qmake ..\tests\mayo_tests.pro
- jom -j%NUMBER_OF_PROCESSORS%
- release\mayo_tests.exe
- cd build-%APPVEYOR_OCC_VERSION%
- release\mayo.exe --runtests
- cd ..

after_test:
- if "%APPVEYOR_OCC_VERSION%"=="7.5.0" (
cd build-%APPVEYOR_OCC_VERSION%\installer &&
iscc setup.iss &&
cd ..\..
)

artifacts:
- path: build-%APPVEYOR_OCC_VERSION%\installer\Output\mayo_*_installer.exe
name: MayoInstallerWin64

on_success:
- ps: >-
if ($true)
Expand Down
Binary file modified doc/screencast_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions i18n/i18n.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ HEADERS += \
$$files(../src/io_dxf/*.h) \
$$files(../src/io_gmio/*.h) \
$$files(../src/io_image/*.h) \
$$files(../src/io_ply/*.h) \
$$files(../src/graphics/*.h) \
$$files(../src/gui/*.h) \
$$files(../src/app/*.h) \
Expand All @@ -15,6 +16,7 @@ SOURCES += \
$$files(../src/io_dxf/*.cpp) \
$$files(../src/io_gmio/*.cpp) \
$$files(../src/io_image/*.cpp) \
$$files(../src/io_ply/*.cpp) \
$$files(../src/graphics/*.cpp) \
$$files(../src/gui/*.cpp) \
$$files(../src/app/*.cpp) \
Expand Down
Binary file modified i18n/mayo_en.qm
Binary file not shown.
Loading

0 comments on commit e55c5ee

Please sign in to comment.